Repository navigation
Follow up the project discovery change of #4421 - #4468
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up of #4421, which stopped project discovery from descending into the folders that are links or whose name starts with a dot, to fix the endless search on a cyclic link. This PR cleans up the code around that rule and documents what it changes for users.
Code
Utils.isDotDirectoryis the ruleisSkippedSearchDirectoryandNuGetConvert.findLinkedFoldersnow share, so the convert-from-nuget warnings about linked folders keep matching the folders the searches skip. It uses the ordinalStartsWith '.'instead of the culture-sensitive string overload.isSkippedSearchDirectoryandSearchAllProjectRelatedFilessay which folders each search skips. Beyond the shared rule, project discovery also skipspackagesandnode_modules, thepaket-filesfolder of the root, the folders with their ownpaket.dependencies, and the Linux system roots when searching from/.NugetEnv.readNuGetPackagesno longer filters out the projects below a link.FindAllProjectsnever descends into a linked folder, whichreadalready warns about, so only the project files that are links are left to skip. TheNugetConvertSpecstests on linked folders and cycles cover it.Documentation
references-files.md: the Location section says that Paket does not look into the dot folders or the links, and lists the commands that leave their projects out.template-files.md:paket packstill finds the templates of these folders, asTemplateFile.FindTemplateFilesfollows links and enters dot folders, but not their projects. Aprojecttemplate there is packed without the assemblies and dependencies of its project, and pack fails when the folder holds more than one project. A cyclic link can also keep that search from finishing.Aligning
FindTemplateFiles, and theobjcleanup ofpaket install, which also follows links, onisSkippedSearchDirectoryis left for a separate PR.