Skip to content

Fix subproject discovery #82

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

Merged
merged 4 commits into from
Dec 2, 2020
Merged

Fix subproject discovery #82

merged 4 commits into from
Dec 2, 2020

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Dec 1, 2020

No description provided.

@per1234 per1234 requested a review from silvanocerza December 1, 2020 04:21
Previously, the subprojects parent folder was searched for subprojects. Due to the recursive search setting, that still
found library example sketches (after unnecessarily checking the examples folder itself for a sketch). However, the
subproject search of platform bundled libraries is not recursive (because the libraries must be directly under the
libraries folder), meaning these subprojects were not discovered.
Previously, project.findProjectsUnderPath() searched for projects and subprojects under the given path. The problem with
this is that project.findSubprojects() uses project.findProjectsUnderPath() to detect subprojects, which resulted in
subproject duplicates. Making the project and subproject discovery distinct steps fixes this and also makes the code
easier to follow.
Although not a problem for normal usage, the previous behavior of appending target paths on each call to
configuration.Initialize() interfered with the ability to use this function in multiple tests.
@per1234 per1234 force-pushed the per1234/fix-subproject-discovery branch from fac4e74 to ba5c3cb Compare December 1, 2020 16:29
@per1234 per1234 merged commit 41fc8f9 into main Dec 2, 2020
@per1234 per1234 deleted the per1234/fix-subproject-discovery branch December 2, 2020 02:07
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Sep 29, 2021
@per1234 per1234 self-assigned this Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants