Comments (13)
@melMass I am seeing this bug on my mac Apple M1 Pro Ventura. @amtoine told me you had a mac (I think) so I would be curious to know if you are seeing the bug as well...
Thanks ! ๐
from nu-git-manager.
@melMass Thanks for testing it out when you get some free time...
If we can get confirmation that it happens on your mac as well then we will have more information
and I will know its just not my machine or some weird configuration on my machine.
from nu-git-manager.
@melMass @amtoine Ok so I spent awhile going over all of this stuff again and going with the default configuration etc...
What I did was install nupm and setup nupm as advertised first prior to installing nu-git-manager.
That may have been the magic sauce.
And the cache is now being created fine without crashing nushell...
The following sequence all works fine prior to cloning any repos
nupm install --path --force .
use nu-git-manager *
gm list
gm update-cache
gm list
gm status
At this point in time the cache exists....
However, when I
gm clone <some github repo>
and then run the command
gm update-cache
It crashes nushell at the same line of code as before
gm status
Shows the cache as false
~/.cache/nu-git-manager>
is still there as before but cache.nuon is not there
from nu-git-manager.
Let me do some more work on my end chasing down possibly what is going on ๐
from nu-git-manager.
@stormasm
thanks for reporting this ๐
can you confirm you can reproduce, after updating nu-git-manager
, when following the steps below? ๐
- define the reproduction environment
const REPRO_ENV = { GIT_REPOS_HOME: /tmp/repos/, GIT_REPOS_CACHE: /tmp/repos.cache }
- clean the repro
with-env $REPRO_ENV {
gm status | select root.path cache.path | values | each {
if ($in | path exists) { rm --recursive --force --verbose $in }
}
}
- clone a repo
> with-env $REPRO_ENV { gm clone https://github.com/amtoine/nu-git-manager }
Cloning into '/tmp/repos/github.com/amtoine/nu-git-manager'...
remote: Enumerating objects: 513, done.
remote: Counting objects: 100% (186/186), done.
remote: Compressing objects: 100% (87/87), done.
remote: Total 513 (delta 109), reused 133 (delta 81), pack-reused 327
Receiving objects: 100% (513/513), 125.76 KiB | 2.37 MiB/s, done.
Resolving deltas: 100% (235/235), done.
Error: ร cache_not_found:
โ please run `gm update-cache` to create the cache
- update the cache as proposed
> with-env $REPRO_ENV { gm update-cache }
updating cache... done
Note
there a deprecation warning from Nushell in the output of the command above, but that's expected and can be ommitted
- it works on my side
> with-env $REPRO_ENV { gm list }
โโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
0โgithub.com/amtoine/nu-git-manager
โโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
from nu-git-manager.
@amtoine I followed the above steps as you proposed and here is what happens...
bottom line is that it crashes nushell ๐
in the exact same line of code as my previous attempt yesterday.
~/j/tmp17/nu-git-manager> use nu-git-manager *
~/j/tmp17/nu-git-manager> const REPRO_ENV = { GIT_REPOS_HOME: /tmp/repos/, GIT_REPOS_CACHE: /tmp/repos.cache }
~/j/tmp17/nu-git-manager> with-env $REPRO_ENV {
::: gm status | select root.path cache.path | values | each {
::: if ($in | path exists) { rm --recursive --force --verbose $in }
::: }
::: }
โญโโโโโโโโโโโโโฎ
โ empty list โ
โฐโโโโโโโโโโโโโฏ
~/j/tmp17/nu-git-manager> with-env $REPRO_ENV { gm clone https://github.com/amtoine/nu-git-manager }
Cloning into '/tmp/repos/github.com/amtoine/nu-git-manager'...
remote: Enumerating objects: 574, done.
remote: Counting objects: 100% (247/247), done.
remote: Compressing objects: 100% (107/107), done.
remote: Total 574 (delta 139), reused 210 (delta 115), pack-reused 327
Receiving objects: 100% (574/574), 136.27 KiB | 2.57 MiB/s, done.
Resolving deltas: 100% (265/265), done.
Error: ร cache_not_found:
โ please run `gm update-cache` to create the cache
~/j/tmp17/nu-git-manager> with-env $REPRO_ENV { gm update-cache }
updating cache... Error: ร Deprecated option
โญโ[/Users/ma/j/tmp17/nu-git-manager/nu-git-manager/fs/store.nu:41:1]
41 โ cd (get-repo-store-path)
42 โ let heads: list<string> = glob "**/HEAD" --not [
ยท โโโฌโ
ยท โฐโโ `glob --not {list<string>}` is deprecated and will be removed in 0.88.
43 โ **/.git/**/refs/remotes/**/HEAD,
โฐโโโโ
help: Please use `glob --exclude {list<string>}` instead.
thread 'main' panicked at 'attempt to add with overflow', crates/nu-command/src/filters/range.rs:108:58
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
from nu-git-manager.
Maybe the exclude/not change is more than a future deprecation and is already defunct?
I will try to repro on windows.
from nu-git-manager.
@melMass I am seeing this bug on my mac Apple M1 Pro Ventura. @amtoine told me you had a mac (I think) so I would be curious to know if you are seeing the bug as well...
Thanks ! ๐
Yep I will properly test it out tomorrow I have the exact same config.
But I think that a panic should never happen so I wonder if this did not reveal a "bug" in nu itself
from nu-git-manager.
@stormasm thanks for checking with the blank $REPRO_ENV
๐
Maybe the exclude/not change is more than a future deprecation and is already defunct?
i don't think this is an issue with the deprecation of glob --not
=> i cannot reproduce this on my machine yet i see the deprecation warning
Yep I will properly test it out tomorrow I have the exact same config.
amazing ๐
But I think that a panic should never happen so I wonder if this did not reveal a "bug" in nu itself
yup, i think this is a bug from Nushell, we don't even use range
at all ๐
from nu-git-manager.
I started off by running
gm clone https://github.com/amtoine/nu-git-manager
Is this an example after having done all the install steps of gm and you used the gm repo url as an example?
I don't really understand the repro there.
For me after following the install instructions on mac I don't even get the update-cache
command exposed:
![image](https://private-user-images.githubusercontent.com/7041726/279057455-8e0b964d-966d-4fcb-b0eb-016da43bc403.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg4NTI4MjgsIm5iZiI6MTcxODg1MjUyOCwicGF0aCI6Ii83MDQxNzI2LzI3OTA1NzQ1NS04ZTBiOTY0ZC05NjZkLTRmY2ItYjBlYi0wMTZkYTQzYmM0MDMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjBUMDMwMjA4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDc1NDRiNjE2NjEwNjA4ZmRlNGQyMjcyOWVjMmQwMjBiM2Y3MGYzYjdjNGQ2OTYzOTZjZDFlMjRhMTVmZmNiOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.ni42III0mIHA_3xggVocYY0R-Ehe9HAFlibCKhwbNDU)
![image](https://private-user-images.githubusercontent.com/7041726/279057533-5298aef4-f1b8-4744-9e7f-6756b632e6bb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg4NTI4MjgsIm5iZiI6MTcxODg1MjUyOCwicGF0aCI6Ii83MDQxNzI2LzI3OTA1NzUzMy01Mjk4YWVmNC1mMWI4LTQ3NDQtOWU3Zi02NzU2YjYzMmU2YmIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjBUMDMwMjA4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDMwYzQ3OWJhNTYzYjFjNjE0YTc5MmYwM2VjOTc3NzlkMGJjZGY0YWYxNjg4YTZiYTU1MzZhNTBiZGJmYTliMCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.aNjMj0xGYdq5N3T31jG61ZQEAn4VpVBgYpmC9juduN8)
from nu-git-manager.
Ok I talked to @amtoine, the imports in the readme aren't up to date so I wasn't installing gm properly, my bad.
Now that I did it all works and I don't get any panic, I tried a few things to be sure.
I'm on nushell 0.86.0 on macOS Ventura 13.3.1
In config.nu
:
use modules/nu-git-manager/nu-git-manager *
(this is just where I store my modules you path should be different)
@stormasm Do you by any chance use custom locations for the cache or the store? (GIT_REPOS_CACHE
, GIT_REPOS_HOME
)
from nu-git-manager.
Ok I talked to @amtoine, the imports in the readme aren't up to date so I wasn't installing gm properly, my bad.
Now that I did it all works and I don't get any panic, I tried a few things to be sure.
I'm on nushell 0.86.0 on
macOS Ventura 13.3.1
Inconfig.nu
:use modules/nu-git-manager/nu-git-manager *(this is just where I store my modules you path should be different)
@stormasm Do you by any chance use custom locations for the cache or the store? (
GIT_REPOS_CACHE
,GIT_REPOS_HOME
)
No I am not setting either of those environment variables
from nu-git-manager.
it turns out the issues comes from the build of @stormasm: it was in debug mode rather than in release mode ๐ฎ
hopefully this will be catch in the future as we ask for the Nushell version
in the bug report template ๐ค
as this is not an issue with nu-git-manager
, i'll close it.
thanks y'all for looking into this and finally cracking the nut ๐
from nu-git-manager.
Related Issues (20)
- squashing forks with remotes already setup fails
- clean up `sugar`
- make documenting modules more systematic and reproducible
- `gm repo branches --clean` fails on checked out branch
- modules are missing extra usage in the documentation HOT 1
- cannot remove a repo when inside of it
- a bit of design: namespace and imports HOT 5
- cannot clone *Suckless* software HOT 3
- add diff when updating cache manually
- detect when cloning a fork of a local repo HOT 16
- add a command to get the version of `nu-git-manager` HOT 5
- use a single test location
- fix `path join`s
- split the tests
- fatal: --bare and --origin foo options are incompatible. HOT 1
- `gm remove` does not remove empty directories HOT 2
- refactor duplicate root stripping
- the tests do not make sure users will be able to import `nu-git-manager`
- `unfold` is deprecated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nu-git-manager.