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

Unable to select aliases when importing deps project #2285

Closed
cursive-ide opened this issue Dec 16, 2019 · 5 comments
Closed

Unable to select aliases when importing deps project #2285

cursive-ide opened this issue Dec 16, 2019 · 5 comments
Labels
new Marks issues describing new features released Marks issues which have had the fixes released in a stable build released-eap Marks issues which have had the fixes released in an EAP build
Milestone

Comments

@cursive-ide
Copy link
Owner

When importing a deps project, sometimes it's necessary to select an alias for the project to even resolve correctly. This can happen when using :override-deps or :default-deps. Without the alias applied, the project is essentially invalid and will not resolve. Cursive should probably present the aliases during project import so that the user can select them for the first project resolution.

@cursive-ide cursive-ide added this to the 1.9.1 milestone Dec 16, 2019
@favila
Copy link

favila commented Dec 16, 2019

One minimal reproducer:

mkdir -p project/foo project/bar
echo '{:deps {}}' > project/bar/deps.edn
echo '{:deps {bar {}} :aliases {:default {:override-deps {bar {:local/root "../bar"}}}}}' > project/foo/deps.edn

(Other variants: use :deps {bar nil}, use :default-deps, define the :default alias in a $CLJ_CONFIG-accessible file instead of foo's deps.edn.)

If the default alias is unchecked in the clojure deps tool window, you will get this error when importing or syncing:
Coordinate type not loaded for library bar/bar in coordinate {}

If the default alias is checked, you get a different error:
Manifest type not detected when finding deps for bar/bar in coordinate {:local/root "../bar"}

clojure -Stree -A:default from foo works

@favila
Copy link

favila commented Dec 16, 2019

A workaround for the "Manifest type not detected" error is explicitly note the manifest type in your :default-deps or :override-deps, e.g. {:default-deps {bar {:local/root "../bar" :deps/manifest :deps}}}

@cursive-ide cursive-ide modified the milestones: 1.9.1, 1.10.0 Mar 20, 2020
@cursive-ide cursive-ide modified the milestones: 1.10.0, 1.10.1 Dec 10, 2020
@cursive-ide cursive-ide modified the milestones: 1.10.1, 1.10.2 Mar 1, 2021
@cursive-ide cursive-ide modified the milestones: 1.10.2, 1.11 Apr 16, 2021
@cursive-ide cursive-ide modified the milestones: 1.11, 1.11.1 Sep 17, 2021
@cursive-ide cursive-ide modified the milestones: 1.12.0, 1.12.1 Nov 29, 2021
@cursive-ide cursive-ide modified the milestones: 1.12.3, 1.12 Apr 13, 2022
@cursive-ide cursive-ide modified the milestones: 1.12, 1.13 Mar 28, 2023
@cursive-ide cursive-ide modified the milestones: 1.13, 1.13.1 Jul 17, 2023
@cursive-ide cursive-ide added the new Marks issues describing new features label Jul 17, 2023
@cursive-ide
Copy link
Owner Author

The approach that I've taken for this differs from what I expected to do. I had planned to show the available aliases during import and allow them to be selected, but this doesn't work with the quick project import which doesn't show a UI. So what I have done is to allow the invalid project to be imported, but ensure that the project's aliases are shown in the deps tool window even if the project resolution fails, which means the alias can be selected and the project refreshed to fix the problem.

@cursive-ide
Copy link
Owner Author

Fix released in 1.13.1-eap1 on 2023-07-24.

@cursive-ide cursive-ide added the released-eap Marks issues which have had the fixes released in an EAP build label Oct 30, 2023
@cursive-ide
Copy link
Owner Author

Fix released in 1.13.1 on 2023-12-07.

@cursive-ide cursive-ide added the released Marks issues which have had the fixes released in a stable build label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new Marks issues describing new features released Marks issues which have had the fixes released in a stable build released-eap Marks issues which have had the fixes released in an EAP build
Projects
None yet
Development

No branches or pull requests

2 participants