Skip to content

Allow clean with invalid module graphs - #8640

Open
fhammerschmidt wants to merge 3 commits into
fix/gentype-windows-pathsfrom
fix/clean-invalid-projects
Open

Allow clean with invalid module graphs#8640
fhammerschmidt wants to merge 3 commits into
fix/gentype-windows-pathsfrom
fix/clean-invalid-projects

Conversation

@fhammerschmidt

@fhammerschmidt fhammerschmidt commented Sep 10, 2026

Copy link
Copy Markdown
Member

Summary

rescript clean constructed the build graph before removing generated JavaScript. Duplicate module names or another invalid source state could therefore abort cleanup and leave files behind.

Derive both in-source and out-of-source outputs directly from discovered package source files so cleanup does not require compiler discovery or a valid module graph.

Validation

  • make test-rewatch
  • cargo test --manifest-path rewatch/Cargo.toml
  • cargo clippy --manifest-path rewatch/Cargo.toml --all-targets --all-features
  • make checkformat

@fhammerschmidt
fhammerschmidt marked this pull request as ready for review September 10, 2026 09:25
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-11T19:29:54.556737Z a32a29e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f1c1a738fb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rewatch/tests/clean/05-clean-invalid-module-graph.sh Outdated
@pkg-pr-new

pkg-pr-new Bot commented Sep 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

rescript

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

@rescript/belt

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

@rescript/darwin-arm64

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

@rescript/darwin-x64

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

@rescript/linux-arm64

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

@rescript/linux-x64

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

@rescript/runtime

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

@rescript/win32-x64

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

commit: a32a29e

@github-actions

Copy link
Copy Markdown

@fhammerschmidt
fhammerschmidt force-pushed the fix/clean-invalid-projects branch from f1c1a73 to 96c35a5 Compare September 10, 2026 10:58
@fhammerschmidt
fhammerschmidt changed the base branch from master to fix/gentype-windows-paths September 10, 2026 10:59
@fhammerschmidt
fhammerschmidt added this pull request to stack #8642 September 10, 2026 10:59
@fhammerschmidt
fhammerschmidt force-pushed the fix/clean-invalid-projects branch 6 times, most recently from 766e69a to 35b5524 Compare September 11, 2026 13:46
@fhammerschmidt
fhammerschmidt force-pushed the fix/clean-invalid-projects branch from 35b5524 to 60b4bb6 Compare September 11, 2026 13:49
@fhammerschmidt
fhammerschmidt force-pushed the fix/clean-invalid-projects branch from 60b4bb6 to 5cea2cf Compare September 11, 2026 14:03
@fhammerschmidt
fhammerschmidt force-pushed the fix/clean-invalid-projects branch from 5cea2cf to 7132187 Compare September 11, 2026 15:38
Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
@fhammerschmidt
fhammerschmidt force-pushed the fix/clean-invalid-projects branch from 7132187 to a32a29e Compare September 11, 2026 16:41
@fhammerschmidt

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: a32a29e022

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@fhammerschmidt
fhammerschmidt removed this pull request from stack #8642 September 11, 2026 20:25
@fhammerschmidt
fhammerschmidt added this pull request to stack #8650 September 11, 2026 20:25
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

Successfully merging this pull request may close these issues.

1 participant