Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update docs for how to test the Filament installation #451

Open
CrepeGoat opened this issue Sep 2, 2024 · 4 comments
Open

update docs for how to test the Filament installation #451

CrepeGoat opened this issue Sep 2, 2024 · 4 comments

Comments

@CrepeGoat
Copy link

CrepeGoat commented Sep 2, 2024

problem

the "getting started" page says to run cargo run -- tests/compile/par.fil to test the build.

doing so I get a few errors:

$ cargo run -- ./tests/compile/par.fil
error: `cargo run` could not determine which binary to run. Use the `--bin` option to specify a binary, or the `default-run` manifest key.
available binaries: fil-gen, filament
$ cargo run --bin=filament -- ./tests/compile/par.fil
warning: ...
warning: ...

Error: invalid file: Failed to read ./tests/compile/par.fil: No such file or directory (os error 2): 
Compilation failed with 1 errors.
Run with --show-models to generate assignments for failing constraints.

I can't find a file named ./tests/compile/par.fil either.

the request

it seems that the docs should:

  1. include the --bin=filament flag, and
  2. list a working test file (or set of test files)
    • it would be great too if there were a command to run all tests at once, to make the process as simple as possible
@CrepeGoat
Copy link
Author

as mentioned in #447 (comment), I'm asking for this specifically because I'm trying to write a nix derivation to build and install filament (in my case, specifically on macOS, but this would be applicable to linux builds as well). generally it's good practice to provide tests for a nix build to validate the install, and it's not clear to me what that would look like for Filament.

-> this docs fix (in addition to providing better documentation) would also enable a potential nix build definition to include tests, making the build more resilient to introducing build errors.

@CrepeGoat
Copy link
Author

@rachitnigam re: #447 (comment), my understanding is that I am free to add code to nixpkgs, the package store for nix's package manager, which would enable folks to install Filament from nix.

@rachitnigam
Copy link
Member

generally it's good practice to provide tests for a nix build to validate the install, and it's not clear to me what that would look like for Filament.

Filament has a runt test suite which is executed using the following steps (after Filament has been configured):

  • cargo install runt to install the latest runt binary
  • Typing runt in the root of the directory

If it is allowed, I would recommend running the runt test suite for the nix package.

@CrepeGoat
Copy link
Author

side note: running runt for tests produces test errors. I made a separate issue for this: #452

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

No branches or pull requests

2 participants