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

Fix URL to file path conversion for GenIdea command #1587

Merged
merged 1 commit into from
Nov 24, 2021

Conversation

yakivy
Copy link
Contributor

@yakivy yakivy commented Nov 24, 2021

PR fixes artifacts resolving from private repos for GenIdea command.

Problem description:
Coursier caches private repos under the .../user@organization/... path, for unix systems it translates to .../user%40organization/... path, and in turn java.net.URL translates it to .../user%2540organization/..., so when GenIdea constructs buildDepsPaths with OS independent java.net.URL#getFile call, double escaping breaks pathes for private repos.

Fix description:
OS idependent URL to file path conversion java.net.URL#getFile was replaced with OS dependent java.nio.file.Paths#get(java.net.URI)

Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR description. Thanks for this PR! LGTM.

@lefou lefou merged commit e1ebf4c into com-lihaoyi:main Nov 24, 2021
@lefou lefou added this to the after 0.10.0-M4 milestone Nov 24, 2021
pbuszka pushed a commit to pbuszka/mill that referenced this pull request Dec 26, 2021
Fixes artifacts resolving from private repos for GenIdea command.

**Problem description**:
Coursier caches private repos under the `.../user@organization/...` path, for unix systems it translates to `.../user%40organization/...` path, and in turn `java.net.URL` translates it to `.../user%2540organization/...`, so when GenIdea constructs `buildDepsPaths` with OS independent `java.net.URL#getFile` call, double escaping breaks pathes for private repos.

**Fix description**:
OS idependent URL to file path conversion `java.net.URL#getFile` was replaced with OS dependent `java.nio.file.Paths#get(java.net.URI)`

Pull request: com-lihaoyi#1587
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.

2 participants