-
Notifications
You must be signed in to change notification settings - Fork 471
Be more aware of the workspace during clean #7752
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
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.
Let me know if something doesn't make any sense.
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/win32-x64
commit: |
I think it might make sense to rethink the format command as well. Would it not be more consistent if we format either:
The |
Agreed, defaulting to all / keeping args similar to build/clean definitely makes sense! |
There still is more work to do here.
Running
I also think that if there is no link with package and repository rescript, For the time being if there is a workspace rescript.json, that "suffix" is primary. Post v12 we can explore the option to override suffix in child packages, but it is my understanding that it doesn't work that way today. I'm also in favour of renaming |
This is an attempt to drive the conversation at #7707
In case of clean, we already do an upward traversal to find a root rescript json.
I'm adding some logic to check if the parent rescript json contains the current rescript json in "dependencies" (or "dev-dependencies").
If we did find a link, we would only remove the files from the current project and not everything.
Consider https://github.com/nojaf/rescript-kaplay/blob/main/packages/rescript-kaplay/rescript.json
We already find https://github.com/nojaf/rescript-kaplay/blob/d38649fcd409c174c39b31488f790e036f3b0a20/rescript.json#L8
If that name matches
root_package
(in the code, a bit confusing name) is"@nojaf/rescript-kaplay"
, so we only need to remove those files.Files from https://github.com/nojaf/rescript-kaplay/blob/main/packages/samples/rescript.json are unaffected.
If we were to clean from the repo root,
root_config
would be the well the root package and everything gets cleaned.