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

Demo example doesn't build #165

Closed
kilimnik opened this issue Jan 2, 2021 · 3 comments
Closed

Demo example doesn't build #165

kilimnik opened this issue Jan 2, 2021 · 3 comments

Comments

@kilimnik
Copy link

kilimnik commented Jan 2, 2021

Expected Behavior

I tried to build the demo example. If I just clone the repository everything works.
I would expect the same behavior when using the remote dependencies instead of the local ones.

Actual Behavior

The build crashes with the following error message

  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseError(MacroParseFail(Parsing(Error("expected identifier"))))', demo/build.rs:20:63
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:483
     1: core::panicking::panic_fmt
               at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/panicking.rs:85
     2: core::option::expect_none_failed
               at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/option.rs:1234
     3: core::result::Result<T,E>::unwrap
               at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/result.rs:973
     4: build_script_build::main
               at ./build.rs:20
     5: core::ops::function::FnOnce::call_once
               at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/ops/function.rs:227
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Steps to Reproduce the Problem

  1. Clone the repository
  2. Edit the demo/Cargo.toml file and replace the local dependencies in lines 23 and 26 with remote dependencies
  3. Execute cargo build

Specifications

  • Version: Rust 1.48.0
  • Platform: Arch Linux
@adetaylor
Copy link
Collaborator

Thanks for the report!

There's been a breaking change between the last release (0.4.1) and the version currently in the main branch. Remove the unsafe keyword from demo/src/main.rs and it will build. Version 0.4.1 does not allow that keyword; the next version (likely 0.5) will allow it and possibly even require it.

I want to do a little bit more thinking about the unsafe keyword before making that 0.5 autocxx release.

@adetaylor
Copy link
Collaborator

I wrote up #166 to explain myself here :) (i.e. why there isn't yet a 0.5 release)

@adetaylor
Copy link
Collaborator

I released 0.5 which should resolve this. However, #168 could still present problems - working on that now.

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

No branches or pull requests

2 participants