Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Independence from the user toolchain (#32)
## What Changed? Sets the `SYSROOT` env variable for plugin execution so that we link against the `std` lib that the tool was compiled against. This fixes the "invalid metadata file" errors we were getting when tryin got run on projects using a different toolchain version than the one we use. Much of the "heavy lifting" is done by my `rustc_plugin` fork and not in the prettiest way. A PR to push those changes upstream is coming. ## Why Does It Need To? This creates a larger degree of independence from a user's toolchain. Now a user of `dfpp` doesn't have to use the same toolchain version and can e.g. use `stable`. It is now possible to run `cargo dfpp` straight out of the box with no configuration on any project using "not quite totally recent" rust versions. Note that this only means the user no longer has to explicitly configure their project to use the nightly toolchain that dfpp uses, but it is still implicitly compiled against e.g. `nightly-2023-04-12`. As such "missing feature annotations" can still happen, but this also gives us a path forward to handle them but implicitly enabling them. ## 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 - [x] Tests for new behaviors are provided - [x] 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