-
Notifications
You must be signed in to change notification settings - Fork 132
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
search parent dirs for workspace #1253
base: master
Are you sure you want to change the base?
Conversation
1afe463
to
00d3951
Compare
a94939f
to
d2e22e9
Compare
@f-f , please review It does work. It should stop searching at the directory which contains |
I think the feature to stop at .git is broken. The use of Glob is probably incorrect. |
My understanding of this patch is that it adds functionality for finding the workspace if it's reasonably close - I have read through the code but won't review it further until we add a few important test cases that might prompt for a redesign of the patch. In particular, there are two situations that we should cover - these are good starting points to add as tests:
Both of these suggest that a good course of action might be to:
That's what I would try, and I think it will solve most of our issues, but there might be corner cases that we'll need to address then |
cd252d1
to
2119d76
Compare
@peterbecich anything I can do to help move this forward? |
cdb39bd
to
f9d156a
Compare
I have fixed this: #1253 (comment) The
Regarding the improvements to be done,
I can't figure out how to implement this. The PR does not fix the two cases you have identified. However it does cover the simplest case, where the workspace is several levels up from the Thanks |
f9d156a
to
7dba16c
Compare
The two tests I mention are in fact potential regressions that I believe this patch can trigger, and we will not know if these regressions can happen until we explicitly test for them. |
02e0982
to
3d1c212
Compare
a0a2994
to
232b417
Compare
#1237
Description of the change
Search up to 4 levels up the file tree for a
workspace
Stop at
.git
This search only happens if a
workspace
not found in current working directoryTest of finding a
workspace
in parent dir successfullyexample/spago.yaml
has no workspaceexample/../spago.yaml
has a workspaceTest of failing to find a workspace in parent directories
example/spago.yaml
andexample/../spago.yaml
have no workspaceI have not carefully tested the search stops at
.git
.Checklist:
README
P.S.: the above checks are not compulsory to get a change merged, so you may skip them. However, taking care of them will result in less work for the maintainers and will be much appreciated 😊