-
Notifications
You must be signed in to change notification settings - Fork 471
Keep track of compiler info during build #7889
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
base: master
Are you sure you want to change the base?
Conversation
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
ee36a77
to
bbaf9e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements compiler tracking functionality during builds to detect compiler changes and trigger necessary package cleaning. It adds compiler metadata including version, BSC path/hash, and runtime path to facilitate build invalidation when the compiler environment changes.
Key changes:
- Introduces a
CompilerInfo
struct containing BSC path, hash, and runtime path - Adds compiler verification logic that compares current compiler info with stored metadata
- Implements automatic package cleaning when compiler changes are detected
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
rewatch/src/build/compiler_info.rs | New module implementing compiler info verification and metadata file writing |
rewatch/src/build/build_types.rs | Adds CompilerInfo struct and updates BuildState to use it |
rewatch/src/build.rs | Integrates compiler verification into build initialization |
rewatch/src/build/packages.rs | Adds method to get compiler info file path |
rewatch/src/build/parse.rs | Updates AST generation to use compiler info |
rewatch/src/build/compile.rs | Refactors runtime path handling and updates compilation |
rewatch/src/build/clean.rs | Updates cleaning logic and adds compiler info cleanup |
Comments suppressed due to low confidence (1)
rewatch/src/build/compiler_info.rs:1
- This TODO comment appears to be in the wrong location. It's placed in the compile.rs diff but seems unrelated to the compiler info functionality being added.
use crate::helpers;
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Fixes #7436
It produces a
lib/bs/compiler-info.json
file which contains:"runtime_path"
and"bsc_path"
might be interesting for tooling to pick up.That hash compare is also really useful when working with a local compiler.