Skip to content

Commit

Permalink
fix(): lock rust version in CI (QwikDev#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat authored Feb 28, 2022
1 parent b55e8e9 commit 1aa4184
Showing 4 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ FROM node:16.12.0-buster
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
RUST_VERSION=1.58.1
RUST_VERSION=1.59.0


RUN set -eux; \
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -86,7 +86,7 @@ jobs:
with:
profile: minimal
override: true
toolchain: stable
toolchain: 1.59.0
target: wasm32-unknown-unknown

- name: Checkout
@@ -169,7 +169,7 @@ jobs:
with:
profile: minimal
override: true
toolchain: stable
toolchain: 1.59.0
target: ${{ matrix.settings.target }}

- name: Cache NPM Dependencies
@@ -427,10 +427,9 @@ jobs:
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
toolchain: 1.59.0
profile: default
override: true
components: rustfmt, clippy

- name: Cache cargo dependencies
uses: actions/cache@v2
2 changes: 1 addition & 1 deletion src/optimizer/core/src/parse.rs
Original file line number Diff line number Diff line change
@@ -466,7 +466,7 @@ fn handle_error(
.lock()
.map(|diagnostics| diagnostics.clone())
.ok()
.unwrap_or_else(Vec::new)
.unwrap_or_default()
.iter()
.map(|diagnostic| {
let message = diagnostic.message();
27 changes: 15 additions & 12 deletions src/optimizer/core/src/transform.rs
Original file line number Diff line number Diff line change
@@ -679,18 +679,21 @@ impl<'a> Fold for QwikTransform<'a> {
.keys()
.find(|id| id.0 == new_specifier);

if let Some(new_local) = new_local {
replace_callee = Some(new_ident_from_id(new_local).as_callee());
} else {
HANDLER.with(|handler| {
handler
.struct_span_err(
ident.span,
"Version without $ is not exported.",
)
.emit();
});
}
new_local.map_or_else(
|| {
HANDLER.with(|handler| {
handler
.struct_span_err(
ident.span,
"Version without $ is not exported.",
)
.emit();
});
},
|new_local| {
replace_callee = Some(new_ident_from_id(new_local).as_callee());
},
);
}
}
}

0 comments on commit 1aa4184

Please sign in to comment.