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

Warning parsing valid Cargo.toml #167

Closed
Pombal opened this issue Aug 24, 2023 · 5 comments · Fixed by squirrelchat/smol-toml#8 or #172
Closed

Warning parsing valid Cargo.toml #167

Pombal opened this issue Aug 24, 2023 · 5 comments · Fixed by squirrelchat/smol-toml#8 or #172

Comments

@Pombal
Copy link

Pombal commented Aug 24, 2023

Hi, here is an example run https://github.com/AmbientRun/Ambient/actions/runs/5954923040/job/16152476085#step:6:13

that shows the warning:
Warning: Error parsing Cargo.toml manifest, fallback to caching entire file: Error: Invalid TOML document: expected key-value, found comma
because of ambient_model = { path = "../model" , version = "0.3.0-dev" }

Is this preventing caching from working? Does the Cargo.toml parsing need to be updated to account for this?

Thanks.

@NobodyXu
Copy link
Contributor

I've changed the toml parser to the one that is claimed to be toml 1.0 compliant can you try the latest release pls?

@Pombal
Copy link
Author

Pombal commented Aug 24, 2023

Hey @NobodyXu, thanks for the reply. I ran it locally with act and got this error:

/run/act/actions/Swatinem-rust-cache@v2.6.2/dist/restore/index.js:63792
| if ((hasOwn = Object.hasOwn(t, k)) && m[k]?.t === 0 /* Type.DOTTED / && m[k]?.d) {
| ^
|
| /run/act/actions/Swatinem-rust-cache@v2.6.2/dist/restore/index.js:63792
| SyntaxError: Unexpected token '.'
| if ((hasOwn = Object.hasOwn(t, k)) && m[k]?.t === 0 /
Type.DOTTED */ && m[k]?.d) {
| at wrapSafe (internal/modules/cjs/loader.js:915:16)
| ^
| at Module._compile (internal/modules/cjs/loader.js:963:27)
|
| at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
| SyntaxError: Unexpected token '.'
| at Module.load (internal/modules/cjs/loader.js:863:32)
| at wrapSafe (internal/modules/cjs/loader.js:915:16)
| at Function.Module._load (internal/modules/cjs/loader.js:708:14)
| at Module._compile (internal/modules/cjs/loader.js:963:27)
| at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
| at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
| at internal/main/run_main_module.js:17:47
| at Module.load (internal/modules/cjs/loader.js:863:32)
| at Function.Module._load (internal/modules/cjs/loader.js:708:14)
| at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
| at internal/main/run_main_module.js:17:47

@Pombal
Copy link
Author

Pombal commented Aug 24, 2023

And running in the cloud with the latest version still shows the original error:
https://github.com/AmbientRun/Ambient/actions/runs/5962761043/job/16174576829#step:4:16

@NobodyXu
Copy link
Contributor

Seems like the toml parse we use is still not toml 1.0 compliant

Why is it so hard to get a toml 1.0 compliant parser in Javascript...

@NobodyXu
Copy link
Contributor

NobodyXu commented Sep 9, 2023

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

Successfully merging a pull request may close this issue.

2 participants