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

Cannot publish a project that is referenced by other projects in the workspace #1307

Open
fsoikin opened this issue Dec 25, 2024 · 0 comments

Comments

@fsoikin
Copy link
Collaborator

fsoikin commented Dec 25, 2024

When checking dependencies, spago publish checks dependencies of all packages in the workspace, not just the one being published.

The culprit line is:

let allCoreDependencies = Fetch.toAllDependencies $ dependencies <#> _ { test = Map.empty }

It smooshes all dependencies in a single bucket before checking them.

Repro

./spago.yaml

package: 
  name: project-a
  publish: ...
workspace:
  ...

./b/spago.yaml

package: 
  name: project-b
  dependencies:
    - project-a

Try to publish:

> spago publish -p project-a

Your package "project-a" is not ready for publishing yet, encountered 1 error:

✘ Some of the packages you specified as `extraPackages` do not point to the Registry.
To be able to publish a package to the registry, all of its dependencies have to be packages registered on the Registry.
Please replace the following packages with versions that are present in the Registry:
  - project-a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant