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

Specify git clone path #1780

Open
Kurren123 opened this issue Jul 1, 2016 · 4 comments
Open

Specify git clone path #1780

Kurren123 opened this issue Jul 1, 2016 · 4 comments

Comments

@Kurren123
Copy link

Kurren123 commented Jul 1, 2016

Description

Can we specify in the paket.dependencies file what path we want a git repo to be cloned into?

We're using some internal git repos. The URL of these are quite long. If repo A references repo B which references repo C, paket clones the repos in to a path which matches the URL. When its nested like A -> B -> C, we run into trouble because it exceeds the windows path size limit.

Repro steps

  1. Have projects A B and C in repos with a long URL
  2. Set up a git dependency from A -> B -> C, with a build script on each
  3. Clone repo A and do a paket install

Expected behavior

Build scripts should execute, git repos should download

Actual behavior

Build scripts and other things fail due to the path exceeding the windows limit

Known workarounds

None. We can't change the URL of the git repos unfortunately.

Related information

  • Operating system: Windows 10
  • Branch: latest
  • .NET Runtime: 4.5.2
@Kurren123
Copy link
Author

Kurren123 commented Jan 31, 2017

Hi @forki and @inosik . I'd like to have a crack at this if possible. I'm new to open source but have been a dev for 9 years. My attempt would be to:

  1. Amend extractUrlParts to allow another argument for a git dependency in the paket.dependencies file. This will be the relative path to download into. Call it download-path or something.
  2. For all download-paths specified in the paket.dependencies file, check that they are all unique
  3. Amend the computeFilePath function to accept a downloadPath : Maybe<String> argument. If it has a value then dir becomes downloadPath otherwise it continues as usual.

Please let me know if I'm on the right track, and any other procedures I should follow (if you want me to add some tests for example).

Kind regards,
Kurren

@forki
Copy link
Member

forki commented Feb 1, 2017

Sounds like a plan

@inosik
Copy link
Contributor

inosik commented Feb 1, 2017

Build scripts and other things fail due to the path exceeding the windows limit

Where does this happen? During the first cloning (into ~/.paket/git/db/) or the second (into paket-files/)?

It might also make sense to make Pakets global Git cache directory configurable, because ~/ tends to be pretty long on Windows.

@Kurren123
Copy link
Author

Kurren123 commented Feb 1, 2017

Where does this happen? During the first cloning (into ~/.paket/git/db/) or the second (into paket-files/)?

Only paket-files/ for now but I see no reason why it wouldn't fail for ~/.paket/git/db/if the folder to be cloned into exceeded 260 chars.

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

No branches or pull requests

4 participants