Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nojaf merged 4 commits intorescript-lang:masterfromnojaf:compiler-info
Sep 19, 2025

Conversation

@nojaf
Copy link
Member

@nojafnojaf commentedSep 15, 2025
edited
Loading

Fixes#7436

It produces alib/bs/compiler-info.json file which contains:

{"version":"12.0.0-beta.12","bsc_path":"/Users/nojaf/Projects/vrindelycker/node_modules/@rescript/darwin-arm64/bin/bsc.exe","bsc_hash":"7d113813ca550965be97771da2ce2d47f85d297eda9e568763e54d31e0b8098d","rescript_config_hash":"226055db0876bea957f7b3b597478f95fdaefb4547704d6557c5dceb64772a1b","runtime_path":"/Users/nojaf/Projects/vrindelycker/node_modules/@rescript/runtime","generated_at":"1757936814848"}

"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.

mediremi, fhammerschmidt, cknitt, and tsnobip reacted with hooray emoji
@pkg-pr-new
Copy link

pkg-pr-newbot commentedSep 15, 2025
edited
Loading

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript-lang/rescript@7889

@rescript/darwin-arm64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-arm64@7889

@rescript/darwin-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-x64@7889

@rescript/linux-arm64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-arm64@7889

@rescript/linux-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-x64@7889

@rescript/runtime

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/runtime@7889

@rescript/win32-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/win32-x64@7889

commit:bef0e40

@nojafnojaf marked this pull request as ready for reviewSeptember 15, 2025 12:11
Copy link
Contributor

CopilotAI left a 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 aCompilerInfo 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
FileDescription
rewatch/src/build/compiler_info.rsNew module implementing compiler info verification and metadata file writing
rewatch/src/build/build_types.rsAdds CompilerInfo struct and updates BuildState to use it
rewatch/src/build.rsIntegrates compiler verification into build initialization
rewatch/src/build/packages.rsAdds method to get compiler info file path
rewatch/src/build/parse.rsUpdates AST generation to use compiler info
rewatch/src/build/compile.rsRefactors runtime path handling and updates compilation
rewatch/src/build/clean.rsUpdates 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 orlearn how to get started.

@nojaf
Copy link
MemberAuthor

We are going to merge this, as it is a nice step in the right direction towards release candidate. Someone (@jfrolich or@rolandpeelen) do please take a look at the code here.

@nojafnojaf merged commit1d0166b intorescript-lang:masterSep 19, 2025
36 of 37 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@cknittcknittcknitt approved these changes

@jfrolichjfrolichAwaiting requested review from jfrolich

@rolandpeelenrolandpeelenAwaiting requested review from rolandpeelen

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Rewatch: detect changes to config and compiler version

2 participants

@nojaf@cknitt

[8]ページ先頭

©2009-2025 Movatter.jp