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

Added a fix to handle sub dependencies inside the same mono repo #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CrochetFeve0251
Copy link

@CrochetFeve0251 CrochetFeve0251 commented Dec 15, 2024

Q A
Branch? main for features / current stable version branch for bug fixes
Bug fix? yes
New feature? no
Deprecations? yes/no
Tickets Fix #4
License MIT
Doc PR api-platform/docs#...

See that message to understand more what is done inside that PR: #4 (comment)

@soyuka
Copy link
Owner

soyuka commented Dec 16, 2024

I don't understand, this should work just fine as the reference is in the configuration:

  "extra": {
    "pmu": {
        "projects": ["./packages/*/composer.json"]
    }

I can therefore have packages/A/composer.json that depends on packages/B and packages/B that depends on C you'll get:

A
	vendor
    	B => ../B 
B
	vendor
		C => ../C 

Because these are symlinks we shouldn't need to change the sub dependencies. Can you send me your repository that has an issue or create a test in this repository?

@CrochetFeve0251
Copy link
Author

CrochetFeve0251 commented Dec 16, 2024

I don't understand, this should work just fine as the reference is in the configuration:

  "extra": {
    "pmu": {
        "projects": ["./packages/*/composer.json"]
    }

I can therefore have packages/A/composer.json that depends on packages/B and packages/B that depends on C you'll get:

A
	vendor
    	B => ../B 
B
	vendor
		C => ../C 

Because these are symlinks we shouldn't need to change the sub dependencies. Can you send me your repository that has an issue or create a test in this repository?

The symlinks are working as you said, but the lock file wants something different than what the symlink has to offer, which breaks the installation process.

My repository is this one: https://github.com/wp-launchpad/launchpad-develop.
Please note I am using the fork, so you will have to come back to using the main lib to see the issue.

To do so :

  • Change the version from pmu to 0.0.15.
  • Remove the repositories key from the composer.json.
  • Run composer update
  • Run composer wp-launchpad/uninstaller update

Then you should see this:

composer wp-launchpad/uninstaller update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires wp-launchpad/core @dev -> satisfiable by wp-launchpad/core[dev-enhancement/add-front-take-off, 3.1.x-dev].
    - wp-launchpad/core[dev-enhancement/add-front-take-off, 3.1.x-dev] require wp-launchpad/dispatcher ^3.1 -> found wp-launchpad/dispatcher[3.1.x-dev] but it does not match your minimum-stability.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

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

Successfully merging this pull request may close these issues.

Find a way to avoid @dev || xx constraint for local packages
2 participants