Skip to content
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

Merged
merged 1 commit into from May 10, 2020
Merged

oq: init at 1.0.2 #75042

merged 1 commit into from May 10, 2020

Conversation

Br1ght0ne
Copy link
Member

@Br1ght0ne Br1ght0ne commented Dec 5, 2019

Motivation for this change

https://github.com/Blacksmoke16/oq/releases/tag/v1.0.2

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This change is Reviewable

Copy link
Member

@stigtsp stigtsp left a 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

@Br1ght0ne
Copy link
Member Author

@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.

Copy link
Member

@stigtsp stigtsp left a 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

@Br1ght0ne Br1ght0ne force-pushed the oq-0.2.1 branch 2 times, most recently from 9c5453c to ec44c1c Compare December 5, 2019 20:35
Copy link
Member

@stigtsp stigtsp left a 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.

pkgs/development/tools/oq/default.nix Outdated Show resolved Hide resolved
pkgs/development/tools/oq/default.nix Show resolved Hide resolved
pkgs/development/tools/oq/default.nix Show resolved Hide resolved
@Br1ght0ne
Copy link
Member Author

@stigtsp Thanks a lot for your help! I'm still learning these things.

Copy link
Member

@stigtsp stigtsp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Result of nix-review pr 75042 1

1 package were build:
  • oq

@Br1ght0ne
Copy link
Member Author

@stigtsp Is anything impeding this PR from being merged?

@stigtsp
Copy link
Member

stigtsp commented Dec 19, 2019

@stigtsp Is anything impeding this PR from being merged?

Not AFAIK, need someone with merge access to review.

@stigtsp
Copy link
Member

stigtsp commented Dec 19, 2019

@filalex77 Version 1.0.0 has been released, consider bumping to this version.

Copy link
Member

@stigtsp stigtsp left a 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";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
version = "0.2.1";
version = "1.0.2";

owner = "Blacksmoke16";
repo = pname;
rev = "v${version}";
sha256 = "0wc1wdvqybgybq09dr78b93mdyvr7avya5w8kffbv8p4i9yyrfn4";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sha256 = "0wc1wdvqybgybq09dr78b93mdyvr7avya5w8kffbv8p4i9yyrfn4";
sha256 = "0sf6rb5b6g7gzyq11l5868p3a1s5z8432swlpv457bfbbnbg6j6q";

@Br1ght0ne Br1ght0ne changed the title oq: init at 0.2.1 oq: init at 1.0.2 Apr 20, 2020
@Br1ght0ne
Copy link
Member Author

@GrahamcOfBorg eval

Copy link
Member

@stigtsp stigtsp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Result of nixpkgs-review pr 75042 1

1 package built:
  • oq

@stigtsp
Copy link
Member

stigtsp commented Apr 20, 2020

Cc @etu

@stigtsp stigtsp requested a review from etu May 6, 2020 13:28
@etu
Copy link
Contributor

etu commented May 10, 2020

Looks reasonable enough, thanks @stigtsp 🙂

@etu etu merged commit 192c150 into NixOS:master May 10, 2020
@stigtsp
Copy link
Member

stigtsp commented May 10, 2020

@filalex77 thx for the pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants