Skip to content

fasm: patch ignored runtime dependency warnings#8

Open
jleightcap wants to merge 1 commit into
openXC7:mainfrom
ngi-nix:moss/fasm
Open

fasm: patch ignored runtime dependency warnings#8
jleightcap wants to merge 1 commit into
openXC7:mainfrom
ngi-nix:moss/fasm

Conversation

@jleightcap

@jleightcap jleightcap commented Oct 7, 2023

Copy link
Copy Markdown
Contributor

see:
ngi-nix/projects#5 (comment)

fasm provides two options for runtime parsing: textx and ANTLR4.

ANTLR4 is:

  • not immediately in nixpkgs as a C++ runtime with compatible CMake
    hooks
  • not easily exposed in the fasm build scripts.

There is an Arch Linux specific workaround on an unmerged branch.

For the time being, fall back to the flower textx parser and patch out
the runtime warning:

RuntimeWarning: Unable to import fast Antlr4 parser implementation.
      ImportError: cannot import name tags

      Falling back to the much slower pure Python textX based parser
      implementation.

      Getting the faster antlr parser can normally be done by installing the
      required dependencies and then reinstalling the fasm package with:
        pip uninstall
        pip install -v fasm

      warn(

Thanks for the tip @fricklerhandwerk!

Signed-off-by: Jack Leightcap jack@leightcap.com

see:
https://github.com/ngi-nix/ngipkgs/issues/7#issuecomment-1751297679

fasm provides two options for runtime parsing: `textx` and ANTLR4.

ANTLR4 is:

- not immediately in nixpkgs as a C++ runtime with compatible CMake
  hooks
- not easily exposed in the fasm build scripts.

There is an Arch Linux specific workaround on an unmerged branch.

For the time being, fall back to the flower `textx` parser and patch out
the runtime warning:

```
RuntimeWarning: Unable to import fast Antlr4 parser implementation.
      ImportError: cannot import name tags

      Falling back to the much slower pure Python textX based parser
      implementation.

      Getting the faster antlr parser can normally be done by installing the
      required dependencies and then reinstalling the fasm package with:
        pip uninstall
        pip install -v fasm

      warn(
```

Thanks for the tip fricklerhandwerk!

Signed-off-by: Jack Leightcap <jack@leightcap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant