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

add subdir functionality #1422

Merged
merged 3 commits into from
Apr 8, 2020
Merged

add subdir functionality #1422

merged 3 commits into from
Apr 8, 2020

Conversation

KristofferC
Copy link
Member

@KristofferC KristofferC commented Sep 25, 2019

julia> Pkg.add(PackageSpec(path="MainRepo", subdir="SubDir.jl"))
  Updating git-repo `/home/kc/Documents/JuliaTests/MainRepo`
 Resolving package versions...
  Updating `~/Pkg.jl/Project.toml`
  [900e8cb0] + SubDir v0.1.0 #master (/home/kc/Documents/JuliaTests/MainRepo[/SubDir.jl])
  Updating `~/Pkg.jl/Manifest.toml`
  [900e8cb0] + SubDir v0.1.0 #master (/home/kc/Documents/JuliaTests/MainRepo[/SubDir.jl])

@codecov
Copy link

codecov bot commented Sep 25, 2019

Codecov Report

Merging #1422 into master will decrease coverage by 27.33%.
The diff coverage is 79.75%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1422       +/-   ##
===========================================
- Coverage   87.29%   59.95%   -27.34%     
===========================================
  Files          25       25               
  Lines        5445     5396       -49     
===========================================
- Hits         4753     3235     -1518     
- Misses        692     2161     +1469
Impacted Files Coverage Δ
src/Display.jl 80.46% <ø> (-12.5%) ⬇️
src/GitTools.jl 86.33% <100%> (-6.7%) ⬇️
src/manifest.jl 89.51% <100%> (+0.17%) ⬆️
src/Types.jl 75.76% <75.83%> (-7.55%) ⬇️
src/Operations.jl 83.96% <83.33%> (-8.26%) ⬇️
src/API.jl 81.43% <88.88%> (-13.07%) ⬇️
src/Artifacts.jl 0% <0%> (-91.61%) ⬇️
src/BinaryPlatforms.jl 0.37% <0%> (-91.43%) ⬇️
src/Resolve/maxsum.jl 0% <0%> (-90.1%) ⬇️
src/REPLMode/completions.jl 0% <0%> (-86.96%) ⬇️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 53b3580...356dd7f. Read the comment docs.

@fingolfin
Copy link
Member

This is something we are rather interested in and would love to have.

However, it seems this PR has stalled for now. I was wondering if there is any interest in / need for help from outsiders? I may have some time in a few weeks to dig into this, but obviously I don't want to step on any toes or waste time in case somebody is actually working on this elsewhere, or perhaps there are reasons for the stall (e.g. perhaps problems where discovered with the approach, or further design discussions are needed, or ...)

Anyway, just wanted to say I'd be interested in chipping in, but of course I understand you guys may have other priorities.

@KristofferC
Copy link
Member Author

IIRC, this PR was pretty much done, with the exception of the Pkg REPL implementation of it, and bashing my head against

r"((git|ssh|http(s)?)|(git@[\w\-\.]+))(:(//)?)([\w\.@\:/\-~]+)(\.git)(/)? | [^@\#\s]+\s*=\s*[^@\#\s]+ | \#\s*[^@\#\s]* | @\s*[^@\#\s]* | [^@\#\s]+"x
made me kind of lose my interest in the whole thing.

I do think we could just punt on supporting this from the REPL though.

Help to get this rebased and a bit more tested would be appreciated because I think it is a good feature to have.

@KristofferC
Copy link
Member Author

I rebased this, should be good to go. It doesn't include any REPL syntax but that can be added later.

@KristofferC KristofferC closed this Apr 7, 2020
@KristofferC KristofferC reopened this Apr 7, 2020
Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

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

Thank you so much! Looks pretty good to me. I am an outsider, but since I am excited about this feature, I had a look at the changes, and found them quite clean and pleasant to read. I left a few comments, which of course you are completely free to ignore.
Thanks again!

project_file === nothing && pkgerror(string("could not find project file in package at ",
pkg.repo.source !== nothing ? pkg.repo.source : (pkg.path)))
project_file === nothing && pkgerror(string("could not find project file in package at `",
pkg.repo.source !== nothing ? pkg.repo.source : (pkg.path)), "` maybe `subdir` needs to be specified")
Copy link
Member

Choose a reason for hiding this comment

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

Nice detail!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants