Closed kayac-chang closed 2 years ago
MacOS Monterey version 12.4
Model Name: MacBook Pro Chip: Apple M1 Memory: 16 GB
deno_bindgen
ffi
deno run --allow-all --unstable main.ts
Hello, world
src/lib.rs
Hello, kirby
$ deno run --allow-all --unstable main.ts [1] 11128 killed deno run --allow-all --unstable main.ts
Link to code example: https://github.com/kayac-chang/test-deno-bindgen
I think because of this line, but I don't know the reason why need to use system cache, because there's no useful document to point out intention.
Currently, I fork plug and add the following code to skip the cache, this will solve the issue temporarily.
... if (options.policy === CachePolicy.NONE) { return new URL(url).pathname; } const file = await plug.cache(url, policy); return file.path; }
I'm facing this problem too. When cache policy is NONE, x/cache will always copy ./target/debug/*.lib to cache directory. So the lib in cache will always have a new but Deno.dlpopen didn't work.
NONE
x/cache
./target/debug/*.lib
Deno.dlpopen
Environment:
OS:
MacOS Monterey version 12.4
Hardware:
Model Name: MacBook Pro Chip: Apple M1 Memory: 16 GB
Steps To Reproduce
deno_bindgen
to build firstffi
deno run --allow-all --unstable main.ts
, we can getHello, world
print outsrc/lib.rs
source code, like changeHello, world
toHello, kirby
deno_bindgen
againdeno run --allow-all --unstable main.ts
will crash without any errorLink to code example: https://github.com/kayac-chang/test-deno-bindgen
Problem
I think because of this line, but I don't know the reason why need to use system cache, because there's no useful document to point out intention.
Temporary Solution
Currently, I fork plug and add the following code to skip the cache, this will solve the issue temporarily.