-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Added hg source and Unit test cases #23
base: main
Are you sure you want to change the base?
Conversation
$ make && bin/crystal2nix
Initialized empty Git repository in /tmp/1000/git-checkout-tmp-zg8UAFIG/spectator/.git/
From https://gitlab.com/arctic-fox/spectator
* tag v0.10.5 -> FETCH_HEAD
Switched to a new branch 'fetchgit'
removing `.git'...
git revision is cbe05cd637c14387df553b0ea8f0a879c732c5fd
path is /nix/store/k3rpnb9la3isz6y2zfs9wmcd7k7268q5-spectator
git human-readable version is -- none --
Commit date is 2022-01-27 13:04:03 -0700
hash is 1fgjz5vg59h4m25v4fjklimcdn62ngqbchm00kw1160ggjpgpzw2
Initialized empty Git repository in /tmp/1000/git-checkout-tmp-ULSYFdrK/version_from_shard/.git/
From https://github.com/hugopl/version_from_shard
* tag v1.2.5 -> FETCH_HEAD
Switched to a new branch 'fetchgit'
removing `.git'...
git revision is 1affb5ccf3b366e113c0ec290ffb5d8b85de8494
path is /nix/store/8y7fql6yph5xj0v874kn8i7zyngyf4hr-version_from_shard
git human-readable version is -- none --
Commit date is 2022-01-19 20:09:27 -0300
hash is 0xizj0q4rd541rwjbx04cjifc2gfx4l5v6q2y7gmd0ndjmkgb8ik
Unhandled exception: Error renaming file: '/tmp/1000/vzgz5o75shards' -> 'shards.nix': Invalid cross-device link (File::Error)
from /nix/store/r5ar6blzgbjm4958hzfpmz52v0ksvr28-crystal-1.11.2-lib/crystal/file.cr:878:7 in 'rename'
from src/worker.cr:91:7 in 'run'
from src/cli.cr:29:7 in 'run'
from src/runner.cr:4:1 in '__crystal_main'
from /nix/store/r5ar6blzgbjm4958hzfpmz52v0ksvr28-crystal-1.11.2-lib/crystal/crystal/main.cr:129:5 in 'main_user_code'
from /nix/store/r5ar6blzgbjm4958hzfpmz52v0ksvr28-crystal-1.11.2-lib/crystal/crystal/main.cr:115:7 in 'main'
from /nix/store/r5ar6blzgbjm4958hzfpmz52v0ksvr28-crystal-1.11.2-lib/crystal/crystal/main.cr:141:3 in 'main'
from /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libc.so.6 in '??'
from /nix/store/k7zgvzp2r31zkg9xqgjim7mbknryv6bs-glibc-2.39-52/lib/libc.so.6 in '__libc_start_main'
from bin/crystal2nix in '_start'
from ??? |
The following issue has been resolved by using File.copy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an enormous diff for what is essentially a one-line fix.
As this change is effectively part of your feature work, this commit should be squashed into the relevant feature commit.
You don't have to copy and delete. There is FileUtils.mv
that can do that.
The extra exception handling for this case seems superflous.
At the end, you do if
, else
but as you are exiting due to errors with exit 1
we don't need the else part.
Also, the file isn't formatted with crystal tool format
.
At the end, you do if, else but as you are exiting due to errors with exit 1 we don't need the else part (resolved ) |
The most recent commits still need to be squashed as mentioned above. There are leftovers from a merge conflict in README.md |
Features added in this PR:-