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

Paket Install and Large Sub-directories #1782

Closed
nickbabcock opened this issue Jul 1, 2016 · 6 comments
Closed

Paket Install and Large Sub-directories #1782

nickbabcock opened this issue Jul 1, 2016 · 6 comments

Comments

@nickbabcock
Copy link
Contributor

nickbabcock commented Jul 1, 2016

Description

paket.exe install does not finish when invoked in a directories with large sub-directories

Repro steps

cd /
sudo touch paket.dependencies
sudo /paket.exe install

Known workarounds

cd into /tmp and everything works fine 😛

Related information

  • Operating system: 14.04.4 LTS, Trusty Tahr (but should effect all systems)
  • Branch: Paket 3.4.0
  • Mono Version: 4.4.1
@forki
Copy link
Member

forki commented Jul 2, 2016

Making this up-for-grabs since I think it will be probably easy to fix if one has a repro.

@nickbabcock
Copy link
Contributor Author

The issue is ProjectFile.FindAllProjects (profiled through mono). It recursively searches all directories, which is not good when the directories are huge (and potentially irrelevant to the install).

Are the project files that make up a solution not known through some other file?

I'll edit the title and description to be a little less sensationalist 😉

@nickbabcock nickbabcock changed the title Paket Install Infinite Loop in Root Directory Paket Install and Large Sub-directories Jul 8, 2016
@baronfel
Copy link
Contributor

baronfel commented Jul 8, 2016

It's important to note that paket doesn't require, and in fact never assumes, the presence of a solution file. It's entirely fixated around projects. Now, that said, it would be possible augment the existing FindAllProjects code to have an optional hot-path if it finds a .sln file to read that file and take the project list from there, but continue to support the search-based method.

@nickbabcock
Copy link
Contributor Author

A hot path is fine, but the worst case is still pretty bad. I have a node.js project with a node_modules directory of >6k sub-directories, >60k files and paket install won't return after a minute. This could put a limitation on .net/node.js cross applications without a re-org of the project structure.

Also consider the use case when there are no projects (Paket from F# interactive). How could we implement a hot path?

@cdrnet
Copy link
Member

cdrnet commented Jul 9, 2016

Note that the presence of a solution file does not guarantee that it contains a complete list of all projects. I typically have multiple solution files, each of them covering a subset of projects only.

@forki
Copy link
Member

forki commented Jul 11, 2016

Mhm we probably can black list parts of the tree. Like we don't need to look into packages folder. And we probably don't need to look into node folders.

PRs welcome

@forki forki closed this as completed in c79c9ce Jul 14, 2016
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