rhysd / hgrep

Grep with human-friendly search results

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v0.1.6: compilation error with Rust 1.56.0

herbygillot opened this issue · comments

Compilation failed on macOS Catalina 10.15.7 when trying to compile hgrep v0.1.6 using Rust 1.56.0:

error: couldn't read src/../assets/bat/assets/syntaxes.bin: No such file or directory (os error 2)
  --> src/syntect.rs:27:31
   |
27 | const SYNTAX_SET_BIN: &[u8] = include_bytes!("../assets/bat/assets/syntaxes.bin");
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)

error: couldn't read src/../assets/bat/assets/themes.bin: No such file or directory (os error 2)
  --> src/syntect.rs:28:30
   |
28 | const THEME_SET_BIN: &[u8] = include_bytes!("../assets/bat/assets/themes.bin");
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `hgrep` due to 2 previous errors

I think it was already fixed on the head of main branch. Which revision did you try?

Did 0.1.6 break macports build? If it's necessary to release new version, please let me know. I'll make a new release.

No, no need to revert - MacPorts is still on version v0.1.5 - this is simply a result of trying to build v0.1.6.

Let me try HEAD and I'll let you know

OK so I just confirmed the current master (specifically commit SHA 295ec21704f6e06c7cb93f5cf1ae4df5056bd170) builds just fine. I think a new release would be best, and you can create one at your leisure. Thank you.

Sure. Since I already added some features and fixes today, I will make a new release tomorrow. It should fix the build. I apologize for the inconvenience.

No worries and very much appreciated. Many thanks.

commented

I get the same error on NetBSD building with rust-1.56.

Compiling hgrep v0.1.6 (/usr/pkgsrc/wip/hgrep/work/hgrep-0.1.6)
error: couldn't read src/../assets/bat/assets/syntaxes.bin: No such file or directory (os error 2)
  --> src/syntect.rs:27:31
   |
27 | const SYNTAX_SET_BIN: &[u8] = include_bytes!("../assets/bat/assets/syntaxes.bin");
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)

error: couldn't read src/../assets/bat/assets/themes.bin: No such file or directory (os error 2)
  --> src/syntect.rs:28:30
   |
28 | const THEME_SET_BIN: &[u8] = include_bytes!("../assets/bat/assets/themes.bin");
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `hgrep` due to 2 previous errors
*** Error code 101

Stop.
bmake[1]: stopped in /usr/pkgsrc/wip/hgrep
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/wip/hgrep
error: External command failed
   ┌─ shell:63:1
   │
63 │ bmake
   │ ^^^^^ command failed


Guess I'll just wait :)

@herbygillot @0323pin v0.1.7 was released. Would you check your builds?

Thanks @rhysd, v0.1.7 builds perfectly. I've updated the MacPorts port, and this should begin to reflect in the MacPorts port page for hgrep, as well as MacPorts mirrors soon. Thank you.

I'll leave this open until @0323pin gets a chance to verify as well.

I'm closing this since it was fixed by the new release.

commented

@rhysd, @herbygillot that's fine. Thanks for the new release.
I've been busy all day with real life :)
I'll try to manage the update tonight, else I should be able to fix it tomorrow.

If I hit any issues, I'll open a new issue here.

commented

@rhysd All good, it builds just fine.
Thank you once again. I'll merge it soon, just need to update a few other packages.

@herbygillot @0323pin Thank you for confirming the fix.