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

JsCopyString expected 5 parameters #18

Closed
ctaggart opened this issue Aug 23, 2017 · 5 comments
Closed

JsCopyString expected 5 parameters #18

ctaggart opened this issue Aug 23, 2017 · 5 comments

Comments

@ctaggart
Copy link

Looks like there may be a breaking change in JsCopyString.
chakra-core/ChakraCore#3433

C:\Users\camer\rs\chakracore-rs\chakracore-sys>cargo test -vv
       Fresh bitflags v0.9.1
       Fresh cfg-if v0.1.2
       Fresh void v1.0.2
       Fresh vec_map v0.8.0
       Fresh bitflags v0.8.2
       Fresh winapi-build v0.1.1
       Fresh rustc-serialize v0.3.24
       Fresh glob v0.2.11
       Fresh unicode-xid v0.0.4
       Fresh lazy_static v0.2.8
       Fresh strsim v0.6.0
       Fresh pkg-config v0.3.9
       Fresh utf8-ranges v1.0.0
       Fresh unicode-width v0.1.4
       Fresh peeking_take_while v0.1.2
       Fresh winapi v0.2.8
       Fresh log v0.3.8
       Fresh regex-syntax v0.4.1
       Fresh libc v0.2.29
       Fresh unicode-segmentation v1.2.0
       Fresh ansi_term v0.9.0
       Fresh unreachable v1.0.0
       Fresh syntex_pos v0.58.1
       Fresh memchr v1.0.1
       Fresh thread_local v0.3.4
       Fresh aho-corasick v0.6.3
       Fresh nom v3.2.0
       Fresh kernel32-sys v0.2.2
       Fresh regex v0.2.2
       Fresh cexpr v0.2.2
       Fresh term_size v0.3.0
       Fresh atty v0.2.2
       Fresh libloading v0.4.0
       Fresh term v0.4.6
       Fresh env_logger v0.4.3
       Fresh textwrap v0.7.0
       Fresh clang-sys v0.18.0
       Fresh syntex_errors v0.58.1
       Fresh clap v2.26.0
       Fresh syntex_syntax v0.58.1
       Fresh aster v0.41.0
       Fresh quasi v0.32.0
       Fresh syntex v0.58.1
       Fresh quasi_codegen v0.32.0
       Fresh bindgen v0.25.5
   Compiling chakracore-sys v0.2.2 (file:///C:/Users/camer/rs/chakracore-rs/chakracore-sys)
     Running `rustc --crate-name chakracore_sys src\lib.rs --emit=dep-info,link -C debuginfo=2 --test -C metadata=7017975e9837d42b -C extra-filename=-7017975e9837d42b --out-dir C:\Users\camer\rs\chakracore-rs\chakracore-sys\target\debug\deps -L dependency=C:\Users\camer\rs\chakracore-rs\chakracore-sys\target\debug\deps --extern libc=C:\Users\camer\rs\chakracore-rs\chakracore-sys\target\debug\deps\liblibc-275c4a96a27a8a7e.rlib -L native=C:\Users\camer\rs\ChakraCore\Build\VcBuild\bin\x64_release\lib -l dylib=ChakraCore`
error[E0061]: this function takes 5 parameters but 4 parameters were supplied
    --> src\lib.rs:70:30
     |
70   |               js!(JsCopyString(result_as_string,
     |                                ^^^^^^^^^^^^^^^^ expected 5 parameters
     |
    ::: C:\Users\camer\rs\chakracore-rs\chakracore-sys\target\debug\build\chakracore-sys-60176a7cbd0e748e\out/ffi.rs
     |
3607 | /     pub fn JsCopyString(value: JsValueRef, buffer: *mut libc::c_char,
3608 | |                         bufferSize: usize, writtenLength: *mut usize,
3609 | |                         actualLength: *mut usize) -> JsErrorCode;
     | |_________________________________________________________________- defined here

error: aborting due to previous error(s)

error: Could not compile `chakracore-sys`.

Caused by:
  process didn't exit successfully: `rustc --crate-name chakracore_sys src\lib.rs --emit=dep-info,link -C debuginfo=2 --test -C metadata=7017975e9837d42b -C extra-filename=-7017975e9837d42b --out-dir C:\Users\camer\rs\chakracore-rs\chakracore-sys\target\debug\deps -L dependency=C:\Users\camer\rs\chakracore-rs\chakracore-sys\target\debug\deps --extern libc=C:\Users\camer\rs\chakracore-rs\chakracore-sys\target\debug\deps\liblibc-275c4a96a27a8a7e.rlib -L native=C:\Users\camer\rs\ChakraCore\Build\VcBuild\bin\x64_release\lib -l dylib=ChakraCore` (exit code: 101)

C:\Users\camer\rs\chakracore-rs\chakracore-sys>rustup show
Default host: x86_64-pc-windows-msvc

installed toolchains
--------------------

stable-i686-pc-windows-gnu
stable-x86_64-pc-windows-gnu
stable-x86_64-pc-windows-msvc (default)
beta-x86_64-pc-windows-gnu
nightly-x86_64-pc-windows-gnu
nightly-x86_64-pc-windows-msvc

active toolchain
----------------

stable-x86_64-pc-windows-msvc (default)
rustc 1.19.0 (0ade33941 2017-07-17)
@ctaggart
Copy link
Author

It is mentioned in the Release Notes for 1.7.1. I'll try a previous tag.
https://github.com/Microsoft/ChakraCore/wiki/Roadmap#v171

@ctaggart
Copy link
Author

ctaggart commented Aug 24, 2017

It builds just fine with ChakraCore v1.7.0.

git clone https://github.com/Microsoft/ChakraCore.git
cd ChakraCore
git checkout tags/v1.7.0
set VSCMD_START_DIR="%CD%"
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars64.bat"
msbuild /m /p:Platform=x64 /p:Configuration=release Build\Chakra.Core.sln /v:m 

@rhuanjl
Copy link

rhuanjl commented Sep 23, 2017

@ctaggart I'm also a user of chakracore I stumbled upon this thread whilst googling something - there was indeed a breaking change to JSCopyString in 1.7.1 BUT it was reverted in 1.7.2

@ctaggart
Copy link
Author

Thanks @rhuanjl, I'll try it out.

@ctaggart
Copy link
Author

Thanks @rhuanjl. It works again with 1.7.2.

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