Comments (6)
@DougAnderson444 I encountered similar errors and submitted #247 to fix them.
from cargo-component.
I'll release a patch release shortly, but in the meantime I've posted a workaround to disable formatting of the bindings to the release notes of 0.9.0
.
from cargo-component.
After implementing this, I discovered that prettyplease
doesn't preserve whitespace (specifically new lines between items), which makes sense since it's going off of a syn::File
.
That's relatively unimportant for something like bindings.rs
, but more important for lib.rs
.
Given that the code generated from the --target
option is relatively uncomplicated, I think we can keep using rustfmt
for now.
from cargo-component.
@peterhuene I am trying to migrate to v0.9.0
but I keep getting rustfmt
errors on the libraries I am converting:
error[internal]: left behind trailing whitespace
--> <stdin>:575:575:1
|
575 |
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:599:599:1
|
599 |
| ^^^^^^^^^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:1188:1188:1
|
1188 |
| ^^^^^^^^^^^^^^^^^^^^
|
Full Log
left behind trailing whitespace
--> <stdin>:575:575:1
|
575 |
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:599:599:1
|
599 |
| ^^^^^^^^^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:1188:1188:1
|
1188 |
| ^^^^^^^^^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:1194:1194:1
|
1194 |
| ^^^^^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:1200:1200:1
|
1200 |
| ^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:1240:1240:1
|
1240 |
| ^^^^^^^^^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:1246:1246:1
|
1246 |
| ^^^^^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:1263:1263:1
|
1263 |
| ^^^^^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:1269:1269:1
|
1269 |
| ^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:1294:1294:1
|
1294 |
| ^^^^^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:1300:1300:1
|
1300 |
| ^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:1312:1312:1
|
1312 |
| ^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:1892:1892:1
|
1892 |
| ^^^^^^^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:1898:1898:1
|
1898 |
| ^^^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:1904:1904:1
|
1904 |
| ^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:2510:2510:1
|
2510 |
| ^^^^^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:2516:2516:1
|
2516 |
| ^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:2522:2522:1
|
2522 |
| ^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:3163:3163:1
|
3163 |
| ^^^^^^^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:3169:3169:1
|
3169 |
| ^^^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:3175:3175:1
|
3175 |
| ^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:3701:3701:1
|
3701 |
| ^^^^^^^^^^^^^^
|
error[internal]: left behind trailing whitespace
--> <stdin>:3733:3733:1
|
3733 |
| ^^^^^^^^
|
This was the only relevant issue I found, but it doesn't look like it was implemented, was it? If not, any idea where this fmt
issue is originating?
from cargo-component.
@sunfishcode so glad to not be alone! So does that mean we simply await a release patch then?
from cargo-component.
0.9.1 has now been released.
from cargo-component.
Related Issues (20)
- `cargo component check --workspace` should not generate bindings for workspace members without `[package.metadata.component]` set HOT 2
- `cargo-component` is not acquring a file lock for componentization
- Document the schema of the cargo-component Cargo.toml configuration HOT 3
- Hello world example fails when project name contains underscore HOT 1
- Add a `cargo component serve` subcommand that uses a default runner of `wasmtime serve`
- wit pubilsh --init fails to register the WIT package to wa.dev, while it successfully create a pacakge on the registry HOT 4
- Build fails with 'failed to create a target world for package ...' HOT 2
- Use something like nightly.link or a non-re-published release to avoid excess notifications
- Build error: `error: string size out of bounds (at offset {offset})` HOT 10
- Additional `import`s in generated component HOT 2
- Resource Static Methods Cause Build Failure When Imported HOT 5
- Wit package name/version validated against registry publishes
- Some wasi imports added per default into wit HOT 2
- cargo install cargo-component error HOT 5
- Compile error when installing cargo component HOT 7
- Minimum Supported Rust Version (MSRV)
- Bindings are sometimes incorrectly generated type + `Borrow` suffix vs `&` type HOT 2
- `cargo component add` not producing runnable/usable binaries
- Cargo Component install give error in RPI 4 (ARM CORTEX-A72) HOT 3
- Update to `-S cli` instead of `-S common` for wasmtime commands
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cargo-component.