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
oq: init at 1.0.2 #75042
oq: init at 1.0.2 #75042
Conversation
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.
Things tested:
- Builds on x86_64-linux (NixOS) OK
- Tested basic usage of
oq
binary : Fails at parsing xml:
echo -e "person:\n name: Sandy\n number: 42\n" | ./oq/bin/oq -i yaml -o xml --xml-root person .person | ./oq/bin/oq -i xml -o json
Invalid input format: 'xml'
Failed to raise an exception: END_OF_STACK
[0x456bd6] ???
[0x4077fb] __crystal_raise +43
[0x420525] ???
[0x40a2b3] main +147
[0x7f225f1b8b8e] __libc_start_main +238
[0x40483a] _start +42
[0x0] ???
Result of nix-review pr 75042
1
1 package were build:
- oq
@stigtsp I think that XML deserialization is implemented in Blacksmoke16/oq@960e10e, which was later than the last release. Help text doesn't reflect the actual capabilities at the moment of the release. When the new release comes out, I'll update it. |
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.
oq
fails to build on darwin. Not sure how critical this is, One option is setting meta.platform = plaforms.linux
.
Tested on a local darwin build box, which gave the following output
$ nix build --no-link --keep-going --max-jobs 4 --option build-use-sandbox true -f /Users/user/.cache/nix-review/pr-75042/build.nix
builder for '/nix/store/ixr2816qj3jinmx817i14affjqcf6awz-crystal-0.30.1.drv' failed with exit code 2; last 10 log lines:
Using /nix/store/g8w64ax6s3lzv1kpwq38r1cgpayxqh7k-llvm-6.0.1/bin/llvm-config [version=6.0.1]
clang++ -c -o src/llvm/ext/llvm_ext.o src/llvm/ext/llvm_ext.cc -I/nix/store/g8w64ax6s3lzv1kpwq38r1cgpayxqh7k-llvm-6.0.1/include -stdlib=libc++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -O3 -DNDEBUG -fno-exceptions -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
./bin/crystal docs -b https://crystal-lang.org/api/latest src/docs_main.cr
make: Nothing to be done for 'docs'.
clang -fPIC -c -o src/ext/sigfault.o src/ext/sigfault.c
ar -rcs src/ext/libcrystal.a src/ext/sigfault.o
CRYSTAL_CONFIG_PATH="/private/var/folders/g1/y968ywwx2s9c016g26_dbpcm0000gn/T/nix-build-crystal-0.30.1.drv-0/source/src" CRYSTAL_CONFIG_LIBRARY_PATH="/nix/store/ikhr2c3zqdjljry2y9rhwc0k1z8k1iy5-crystal-0.30.1/lib/crystal:/nix/store/pr6crirn4s0bamk4ygh8mddz8kb95dw0-crystal-binary-0.29.0/embedded/lib" CRYSTAL_CONFIG_BUILD_COMMIT="" ./bin/crystal build --release --single-module -D preview_overflow -D compiler_rt -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib
Assertion failed: (cast<DISubprogram>(Scope)->describes(MF->getFunction())), function getOrCreateRegularScope, file /var/cache/omnibus/src/llvm/llvm-3.9.1.src/lib/CodeGen/LexicalScopes.cpp, line 159.
/nix/store/pr6crirn4s0bamk4ygh8mddz8kb95dw0-crystal-binary-0.29.0/bin/crystal: line 103: 17491 Abort trap: 6 "$INSTALL_DIR/embedded/bin/crystal" "$@"
make: *** [Makefile:132: .build/crystal] Error 134
cannot build derivation '/nix/store/4qgjmgazkd159wd4ihjfnhybxn71ich2-crystal-0.31.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/v9kycmclaglmdi9i375qc6i5w59s2a2k-oq-0.2.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/qncdf8xv0xnr1pwf6v0ksfn2f90cra12-env.drv': 1 dependencies couldn't be built
[3 built (1 failed), 160 copied (1734.3 MiB), 342.9 MiB DL]
error: build of '/nix/store/qncdf8xv0xnr1pwf6v0ksfn2f90cra12-env.drv' failed
https://github.com/NixOS/nixpkgs/pull/75042
1 package failed to build:
oq
9c5453c
to
ec44c1c
Compare
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.
It seems a wrapper is needed for oq
to find jq
when it's not in the environments path. I've added code suggestions.
@stigtsp Thanks a lot for your help! I'm still learning these things. |
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.
@stigtsp Is anything impeding this PR from being merged? |
Not AFAIK, need someone with merge access to review. |
@filalex77 Version 1.0.0 has been released, consider bumping to this version. |
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.
Update to 1.0.2 tested with:
$ echo -e "person:\n name: Sandy\n number: 42\n" | ./oq -i yaml -o xml --xml-root person .person | ./oq -i xml -o json | ./oq .person.number
"42"
Also needs a rebase
|
||
crystal.buildCrystalPackage rec { | ||
pname = "oq"; | ||
version = "0.2.1"; |
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.
version = "0.2.1"; | |
version = "1.0.2"; |
owner = "Blacksmoke16"; | ||
repo = pname; | ||
rev = "v${version}"; | ||
sha256 = "0wc1wdvqybgybq09dr78b93mdyvr7avya5w8kffbv8p4i9yyrfn4"; |
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.
sha256 = "0wc1wdvqybgybq09dr78b93mdyvr7avya5w8kffbv8p4i9yyrfn4"; | |
sha256 = "0sf6rb5b6g7gzyq11l5868p3a1s5z8432swlpv457bfbbnbg6j6q"; |
@GrahamcOfBorg eval |
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.
Cc @etu |
Looks reasonable enough, thanks @stigtsp 🙂 |
@filalex77 thx for the pr |
Motivation for this change
https://github.com/Blacksmoke16/oq/releases/tag/v1.0.2
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)This change is