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

Limitations using Github dependencies #2114

Closed
imyrke opened this issue Jan 19, 2017 · 9 comments
Closed

Limitations using Github dependencies #2114

imyrke opened this issue Jan 19, 2017 · 9 comments

Comments

@imyrke
Copy link

imyrke commented Jan 19, 2017

Description

We are using a github repository to collect some dependencies in our project. We have encountered two separate issues related to this:

  • Fetching whole repo
    paket downloads a zip-file, unzips this to a temporary folder and then copies to the target folder. Our particular use of github requires a particular folder structure and rather long file names. We run into a problem that the unzip fails due to some file names exceeding the maximum og 260 chars length. We have so far been able adjust the structure so that we get under the limit, but only just. And it seems awkward that this is caused by the unzip and the fact that it uses a temp folder which adds 50 chars to the name. Unless this can be solved so that unzip works without length limitation, would it be possible to use a short name for the temp-folder? Or why not just unzip into the destination folder without going via a temp?
  • Fetching single files
    As an alternative to the above approach we have tried to fetch single files. This works fine, except it does not at all support file names with spaces. Again, in this particular project, it is not trivial to change file names since file names are hard related to concepts inside the file. Would it be possible to optionally enclose file names in quotes so that files with space (and other chars) can be referenced?

Repro steps

  • Can be seen with any github-repo since the temp folder stays in the structure. Resolve into a deep folder to provoke the length problem.
  • Reference some file with space in filename.

Expected behavior

  • There should be no length limitation of files referenced from github.
    At least paket should not restrict this further by adding a long temp-folder name.
  • It should be possible to reference file names with space.

Actual behavior

See description.

  • paket fails to download (actually unzip) repos containing files where the total name of the file in the temp folder on the target computer exceeds 260 chars.
  • paket fails to resolve singe file github dependencies where the file name contains spaces.

Known workarounds

  • Can to some extent adjust folder structure in github-repo to reduce length.
  • No workaround for single files with space.
@inosik
Copy link
Contributor

inosik commented Jan 25, 2017

paket fails to resolve singe file github dependencies where the file name contains spaces.

Can't reproduce this. Do you enclose the file name with quotes in paket.dependencies?

github org/repo "foo bar.txt"

@imyrke
Copy link
Author

imyrke commented Jan 26, 2017

I am pretty sure I tried this, but I will try again.

@imyrke
Copy link
Author

imyrke commented Jan 26, 2017

I have now retried and the download actually works (as it probably did last time as well). It is the restore step that fails because these quoted files gets into the paket.lock file without quotes. It is then unable to parse paket.lock.

Paket failed with:
Error during parsing of D:\git-cp\TestProduct_Ivar\paket.lock.
Message: invalid file source details.

inosik added a commit to inosik/Paket that referenced this issue Jan 28, 2017
Also, test the new behavior.

References fsprojects#2114.
@inosik
Copy link
Contributor

inosik commented Jan 28, 2017

See #2127.

@imyrke
Copy link
Author

imyrke commented Jan 29, 2017

Splendid! We will probably use this in our project in stead of full branch download then. However, I still think the length restriction imposed by the temporary unzip folder is worth considering.

@imyrke imyrke closed this as completed Jan 29, 2017
@imyrke imyrke reopened this Jan 29, 2017
@inosik
Copy link
Contributor

inosik commented Jan 29, 2017

You could also try direct Git dependencies.

@Kurren123
Copy link

With regards to the 260 character limit problem that exists with git and github dependencies, the same problem has been mentioned by me here and by another user here. I may decide to look into this as it makes using git references on windows impossible.

@imyrke
Copy link
Author

imyrke commented Feb 1, 2017

Specifying the path could be nice, but still I think you need to get rid of the temporary sub-folder used during unzip as i basically add 50'ish chars to all files in the repos on its way out.

@enricosada
Copy link
Collaborator

Closing because original issue was fixed

About path length is tracked by #1780

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

No branches or pull requests

4 participants