-
Notifications
You must be signed in to change notification settings - Fork 5.4k
feat: add warning for package in a workspace not listed as member #7123
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
Thanks for the contribution! Before we can merge this, we need @khayss to sign the Fuel Labs Contributor License Agreement. |
@IGI-111 Since this is inspired by Cargo design, I have studied how Cargo achieves this feature, and I have the following questions that will be helpful in completing this feature.
Anticipating your response 🫡 |
@IGI-111 any update? |
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.
Thanks for the PR, we seem to have lots of cargo references here in the code, I haven't checked the overall code but this seems to me either fully LLM generated or copy pasted from cargo, which probably won't be working if we push it like this :) I can help out if you need pointers but this PR as it is not seem to be going in a correct direction.
First of all we need to be re-using availble stuff from forc-pkg
and forc-util
, in forc
side you need to check if we are in a workspace, in new
and init
commands, if so we should add ourselves (the package we are processing) to the workspace.
If we invoked forc build, we should again check if we are in a workspace, if so we should warn and say that this appears to be in a workspace but not listed as a member, this check probably needs to happen on forc-pkg side.
To summarize we need to ensure we can do this check on forc-pkg side, and invoke this check for new
, init
and build
. Simply consume it differently on new
, init
and build
scenerios
Thanks for the update @kayagokalp |
Also, for my question, I'd like to know if there's a logic to locate a workspace manifest from a sub-directory? |
Hello @kayagokalp |
I understand where the feature is to be implemented. For now, the most important thing is having a way to find the workspace manifest from the current directory. This current draft aims to solve that, as there's no such functionality yet. If this is reviewed, and it's cool, I can proceed to finish up the feature |
Description
This PR closes #4451
Checklist
Breaking*
orNew Feature
labels where relevant.