-
Notifications
You must be signed in to change notification settings - Fork 148
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
Update Dataform CLI npm installs to best-effort #1649
Conversation
I think the top-left of the table has incorrect semantics. I think that if both files exist, |
This issue with that in the CLI is that compilation isn't stateless, so we don't delete A workaround could be making it stateless, and updating the package manager to Let's decide on this in the UX review though, to avoid doing work that might not be needed. |
OK, but we did already discuss this point! |
// If there are other packages already in the package.json, specifying a specific package to | ||
// install will trigger the other packages to be installed too. |
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.
are you sure about this? it seems very surprising to me, and it does not seem to be in the docs: https://docs.npmjs.com/cli/v10/commands/npm-install
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.
I was surprised too, but it happened when I tried it!
It's true - but it's a pretty terrible UX when using it in practice. In any case, the code fix if we do decide to do this is trivial. |
OK - I'll say:
|
I agree with this, extending it even to be the only location that open source packages configure versions - it's a bit weird having two ways of doing things.
I'm not sure that's true, because it's fairly common to run the Dataform CLI as part of CI/CD in a GitHub action from PRs - which gets run on the version of code on Google Cloud. I'll have a think about the different user journeys, but atm this is the most versatile option! |
But GCP should follow the same logic: i.e. if both files provide versions, it should throw. Therefore: in all environments, either you are setting it in one place or the other, but never both. |
* Update Dataform CLI npm installs to best-effort * Tidy logic * Prevent errors when package.json already present * Fix lint
General UX: