Skip to content

swc update seems to have broken build #531

Open
@BakerNet

Description

@BakerNet

Previous builds not failing have swc_config v3.0.0
Current failing builds are using swc_config v3.1.1 (PR that added enum value: swc-project/swc#10600)

Probably just need to update swc dependencies to fix?

#11 90.58    Compiling swc_compiler_base v20.0.0
#11 90.72 error[E0004]: non-exhaustive patterns: `IsModule::CommonJS` not covered
#11 90.72   --> /usr/local/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/swc_compiler_base-20.0.0/src/lib.rs:72:36
#11 90.72    |
#11 90.72 72 |         let program_result = match is_module {
#11 90.72    |                                    ^^^^^^^^^ pattern `IsModule::CommonJS` not covered
#11 90.72    |
#11 90.72 note: `IsModule` defined here
#11 90.72   --> /usr/local/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/swc_config-3.1.1/src/is_module.rs:11:1
#11 90.72    |
#11 90.72 11 | pub enum IsModule {
#11 90.72    | ^^^^^^^^^^^^^^^^^
#11 90.72 ...
#11 90.72 14 |     CommonJS,
#11 90.72    |     -------- not covered
#11 90.72    = note: the matched value is of type `IsModule`
#11 90.72 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
#11 90.72    |
#11 90.72 81 ~             IsModule::Unknown => parse_file_as_program(&fm, syntax, target, comments, &mut errors),
#11 90.72 82 ~             IsModule::CommonJS => todo!(),
#11 90.72    |
#11 90.72 
#11 90.75 For more information about this error, try `rustc --explain E0004`.
#11 90.76 error: could not compile `swc_compiler_base` (lib) due to 1 previous error
#11 90.76 warning: build failed, waiting for other jobs to finish...
#11 249.8 error: failed to compile `cargo-leptos v0.2.35`, intermediate artifacts can be found at `/tmp/cargo-installRoOLV7`.
#11 249.8 To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
#11 ERROR: process "/bin/sh -c cargo install cargo-leptos" did not complete successfully: exit code: 101

Edit: For anyone affected by this, use cargo install --locked to respect Cargo.lock file (odd that it doesn't by default tbh)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions