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

Force user to specify single version of a dependency if it is requested by multiple packages #867

Closed
minhqdao opened this issue Apr 7, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@minhqdao
Copy link
Contributor

minhqdao commented Apr 7, 2023

Description

If we have a dependency, let's say toml-f, and then we have another dependency, e.g. jonquil, that imports toml-f, we might have the case where two different versions of toml-f are requested within the same project. Since we currently haven't implemented version constraints, the default way is to specify a sha or tag. If two different versions of a dependency are requested within a project, I'd expect an error message, forcing the user to use the same version, but that is currently lacking in fpm.

To reproduce:

  • Checkout main.
  • Remove build folder to make sure.
  • Add dependency:
jonquil.git = "https://github.com/toml-f/jonquil"
jonquil.rev = "05d30818bb12fb877226ce284b9a3a41b971a889"
  • Run fpm install
  • Run ~/.local/bin/fpm build

You will get:

# Dependency change detected: toml-f
# Dependency change detected: toml-f

There are obviously conflicts, but these aren't resolved but more or less ignored.

It's also a follow-up to #843. @perazz

Expected Behaviour

Display error message and inform user which are the conflicting dependencies. The best case would be to also inform the user which versions (sha, tag) are currently requested for which dependency so the user can copy/paste to resolve the problem.

Version of fpm

main, 55d94b0

Platform and Architecture

MacOS/ARM

Additional Information

No response

@minhqdao minhqdao added the bug Something isn't working label Apr 7, 2023
@perazz perazz closed this as completed Jun 17, 2023
@perazz
Copy link
Contributor

perazz commented Jun 17, 2023

Superseded by #870 and closed by #871, #873, #875.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants