Skip to content
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

Add a way to run pub and simulate 1+ packages are already published. #2795

Open
kevmoo opened this issue Dec 9, 2020 · 2 comments
Open

Add a way to run pub and simulate 1+ packages are already published. #2795

kevmoo opened this issue Dec 9, 2020 · 2 comments
Labels
type-enhancement A request for a change that isn't a bug

Comments

@kevmoo
Copy link
Member

kevmoo commented Dec 9, 2020

I'm hacking on package abc. I'm about ready to publish it.

I depend on abc from xyz.

I can put abc in the dependency_overrides section of xyz as a path dependency, but that misses things.

Did I mess up an SDK constraint? Another package constraint? etc etc

It'd be AWESOME if I could have the pub client simulate that a set of things I have locally are already published and then do it's thing.

cc @jakemac53 @natebosch

@kevmoo kevmoo added the type-enhancement A request for a change that isn't a bug label Dec 9, 2020
@kevmoo
Copy link
Member Author

kevmoo commented Dec 9, 2020

I'm trying to think of a way to do this without touching pubspec.yaml ... but it'd be nice to point to git repos as well. 🤷

@sigurdm
Copy link
Contributor

sigurdm commented Dec 9, 2020

This will be somewhat mitigated if/when we have staged publishing. You would be able to test out the package before fully publishing.

That said, I also think something like this would be really cool.
It would improve the workflow of mono-repos.

One issue is that we probably want to put this in a file somewhere. Flags are too ephemeral, eg. pub run will first check if the pubspec.lock is up-to-date, and without the flag it would not be able to confirm this.

See more discussions in this direction in: #2161 . Here we consider a separate override file. But I think the point of not overriding the solver completely, but rather treating the package as published in the solver is an important missing piece.

@kevmoo kevmoo changed the title Add a --treat-as-published [path_to_package1,path_to_package2...] flag Add a way to simulate one or more packages is published Jul 22, 2021
@kevmoo kevmoo changed the title Add a way to simulate one or more packages is published Add a way to run pub and simulate 1+ packages are already published. Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants