-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow for dependency-specific build configuration (#52)
## What Changed? The analyzer now reads a `Paralegal.toml` file in which you can provide additional build configuration. At the moment this consists of dependency-specific rust features you can enable. For instance ```toml [dep.cfg-if] rust_features = ["is_terminal"] ``` It also changes the structure if arguments a bit, now the arguments read from the command line (`ClapPargs`) are converted into a compressed, enriched `Args` struct for use internally. During the conversion we read the env variable for dump options, compress dump option, resolve the logging configuration and read the `Paralegal.toml` configuration file. ## Why Does It Need To? Because we are on nightly the default features enabled in rustc are not the same as they are on stable. Therefore we need a way to pass those features is. I tried doing this with `RUSTFLAGS=-Zcrate-attr=feature(my_feature)` before but that doesn't work because these flags are global is a dependency compiles with `no-std` and the feature is a library feature then we get an "unknown feature" error which fails the build. ## Checklist - [x] Above description has been filled out so that upon quash merge we have a good record of what changed. - [x] New functions, methods, types are documented. Old documentation is updated if necessary - [x] Documentation in Notion has been updated - [ ] Tests for new behaviors are provided - [ ] New test suites (if any) ave been added to the CI tests (in `.github/workflows/rust.yml`) either as compiler test or integration test. *Or* justification for their omission from CI has been provided in this PR description.
- Loading branch information
1 parent
0e6881b
commit 96bc5bf
Showing
3 changed files
with
124 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters