jtojnar / nixpkgs-hammering

Beat your package expressions into a shape
MIT License
245 stars 14 forks source link

'position' missing #72

Closed rmcgibbo closed 3 years ago

rmcgibbo commented 3 years ago

Unfortunately, there are still a few of these lingering.

$ nixpkgs-hammer -f . --json xlibsWrapper
error: --- EvalError ------------------------------------------------------------------------------------------------------------- nix-instantiate
at: (11:17) from stdin

    10|             if result.success && result.value != null then
    11|                 result.value.meta.position
      |                 ^
    12|             else

attribute 'position' missing
(use '--show-trace' to show detailed location information)
Traceback (most recent call last):
  File "/nix/store/f0c3n210hc2xknvn3ymcwxxdbhmhzjz6-nixpkgs-hammer/bin/.nixpkgs-hammer-wrapped", line 315, in <module>
    main(args)
  File "/nix/store/f0c3n210hc2xknvn3ymcwxxdbhmhzjz6-nixpkgs-hammer/bin/.nixpkgs-hammer-wrapped", line 235, in main
    overlay_data = nix_eval_json(all_messages_nix, args.show_trace)
  File "/nix/store/f0c3n210hc2xknvn3ymcwxxdbhmhzjz6-nixpkgs-hammer/bin/.nixpkgs-hammer-wrapped", line 66, in nix_eval_json
    result = subprocess.check_output(args, encoding="utf-8", input=expr)
  File "/nix/store/wkw6fsjasr7jbbrlakxxpbiapa8hws42-python3-3.8.7/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/nix/store/wkw6fsjasr7jbbrlakxxpbiapa8hws42-python3-3.8.7/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['nix-instantiate', '--strict', '--json', '--eval', '-']' returned non-zero exit status 1.
jtojnar commented 3 years ago

Weirdly, nix edit works for that derivation.

rmcgibbo commented 3 years ago

This was fixed in #67.