-
Notifications
You must be signed in to change notification settings - Fork 13
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
Rokit panics when running rokit install
or rokit add
#11
Comments
I think the initial idea here was to use I think keeping |
Should we keep the same way of computing the depth then (
I think we should subtract one from manifest depth and swap the order of subtraction (
Alternatively, we could just subtract one from the manifest depth and keep the order the same, if you want to count up instead? |
Thinking about it some more, yeah, it actually makes sense as a Rokit should never discover a manifest like |
I think that makes sense - but if manifest paths will always have fewer or the same number of components as cwd (except for the case where manifest is a direct child of cwd), and we want depth to count up, then we should continue using a usize and keep the same order, but use the manifest path's parent for its depth. Maybe "height" would be a better name? And should we worry about users running Rokit in directories that are shallower than the Rokit/Aftman/Foreman home directories? |
I fairly regularly run tools in the root of my drive, but I'm not sure if a toolchain manager should actually work there. Feels like there's arguments in both directions and I cannot imagine people being too mad as long as we clearly document the behavior. |
Hmm. I'm not really sure what
Maybe this |
Right now, Rokit panics when I run
rokit install
orrokit add
:Here's the code in question:
https://github.com/filiptibell/rokit/blob/d41b102f40cb7d58c083803d540d154a7e4ea645/lib/discovery/mod.rs#L130-L139
cwd will almost always be shallower than the manifest path, in which case this code will panic.
DiscoveredManifest.path
is unused except for in this function. I'm not sure what purpose it serves, but it seems like we can safely remove it, or else use a signed integer type.The text was updated successfully, but these errors were encountered: