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

Workflow for prepping to publish multiple independent packages in one commit #68

Open
jakemac53 opened this issue Feb 15, 2023 · 4 comments
Labels
package:firehose type-enhancement A request for a change that isn't a bug

Comments

@jakemac53
Copy link
Contributor

In the test repo we have 3 packages, test -> test_core -> test_api. Where a dependency exists between them they pin exact versions. We typically use the pubspec_overrides.yaml file to override the deps so that version solves work

It looks like pub lish --dry-run does not use the pubspec_overrides.yaml overrides though, so the validation step fails when we go to publish the versions (with a bad version solve).

@jakemac53
Copy link
Contributor Author

@devoncarew
Copy link
Member

Great, thanks for the info. I imagine - due to the dependencies above - that you publish them in the reverse order? So, test_api, then test_core, then test?

@jakemac53
Copy link
Contributor Author

Correct, so we can get a valid version solve prior to publishing each (for non-dev deps at least). So the actual publish workflow should work fine, its just the validation step that validates all of them prior to any being published that fails.

@natebosch
Copy link
Member

natebosch commented Feb 15, 2023

One way I can imagine handling this is to parse the errors and understand when an error is specifically for a missing package which is also one that is marked as publishable in the same action.

I'm not sure if that way would be brittle, but it wouldn't give the full safety that a pub feature like dart-lang/pub#2795 would

If we had the ability to simulate already published packages, we could have a very robust check for packages that are safe to publish in a mono-repo by iteratively running the check and treating publishable packages as published.

@devoncarew devoncarew added the type-enhancement A request for a change that isn't a bug label Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:firehose type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants