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

[ci] Bump toolchain version. #281

Merged
merged 7 commits into from
Oct 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 1 addition & 23 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ env:
RUSTFLAGS: -D warnings
# coverage collection depends on unstable features.
# we want the CI results to all be from the same toolchain, so we set it up here.
RUSTUP_TOOLCHAIN: nightly-2021-03-24
RUSTUP_TOOLCHAIN: nightly-2021-10-30
on:
push:
branches:
Expand All @@ -19,13 +19,6 @@ jobs:
steps:
- uses: actions/checkout@master
- run: rustup install ${{ env.RUSTUP_TOOLCHAIN }}
- name: ensure lockfile up to date
run: cargo generate-lockfile --manifest-path ofl/Cargo.toml
- name: install gnu tar to work around https://github.com/actions/cache/issues/403
if: matrix.os == 'macos-latest'
run: |
brew install gnu-tar
echo PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" >> $GITHUB_ENV
- uses: actions/cache@v2
with:
key: ${{ runner.os }}-ofl-${{ hashFiles('ofl/Cargo.lock') }}-${{ env.RUSTUP_TOOLCHAIN }}-2
Expand Down Expand Up @@ -62,11 +55,6 @@ jobs:

- name: ensure lockfile up to date
run: cargo generate-lockfile
- name: install gnu tar to work around https://github.com/actions/cache/issues/403
if: matrix.os == 'macos-latest'
run: |
brew install gnu-tar
echo PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" >> $GITHUB_ENV
- uses: actions/cache@v2
with:
key: ${{ runner.os }}-coverage-${{ hashFiles('Cargo.lock') }}-${{ env.RUSTUP_TOOLCHAIN }}-2
Expand Down Expand Up @@ -105,11 +93,6 @@ jobs:

- name: ensure lockfile up to date
run: cargo generate-lockfile
- name: install gnu tar to work around https://github.com/actions/cache/issues/403
if: matrix.os == 'macos-latest'
run: |
brew install gnu-tar
echo PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" >> $GITHUB_ENV
- uses: actions/cache@v2
with:
key: ${{ runner.os }}-dom-${{ hashFiles('Cargo.lock') }}-${{ env.RUSTUP_TOOLCHAIN }}-2
Expand Down Expand Up @@ -152,11 +135,6 @@ jobs:

- name: ensure lockfile up to date
run: cargo generate-lockfile
- name: install gnu tar to work around https://github.com/actions/cache/issues/403
if: matrix.os == 'macos-latest'
run: |
brew install gnu-tar
echo PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" >> $GITHUB_ENV
- uses: actions/cache@v2
with:
key: ${{ runner.os }}-website-${{ hashFiles('Cargo.lock') }}-${{ env.RUSTUP_TOOLCHAIN }}-2
Expand Down
2 changes: 1 addition & 1 deletion dom/augdom/src/rsdom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl crate::Dom for Rc<VirtNode> {
}
VirtData::Text(t) => {
writer
.write_event(Event::Text(BytesText::from_plain_str(&t)))
.write_event(Event::Text(BytesText::from_plain_str(t)))
.expect("writing text node");
}
}
Expand Down
2 changes: 1 addition & 1 deletion dom/prettiest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ impl Debug for Prettified {
continue;
}

if let Ok(value) = Reflect::get(&obj, &raw_key) {
if let Ok(value) = Reflect::get(obj, &raw_key) {
props_seen.insert(key.clone());
if value.is_function() {
functions.insert(key);
Expand Down
1 change: 1 addition & 0 deletions dom/src/embed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ impl DomLoop {

let mut inner = RunLoop::new(Box::new(move || {
let parent = CachedNode::new(parent.clone());
#[allow(clippy::redundant_closure)] // removing the closure syntax makes this FnOnce
let new_root = topo::call(|| root());

parent.ensure_child_attached(new_root.to_bind());
Expand Down
2 changes: 1 addition & 1 deletion mox/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ impl ToTokens for MoxExpr {
trait NodeConvertError {
fn node_convert_error(node: &syn_rsx::Node) -> syn::Error {
syn::Error::new(
node_span(&node),
node_span(node),
format_args!("Cannot convert {} to {}", node.node_type, std::any::type_name::<Self>(),),
)
}
Expand Down
2 changes: 1 addition & 1 deletion ofl/src/coverage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl Collect {
pub fn run(&self, project_root: impl AsRef<Path>) -> Result<(), Error> {
let mut command = Command::new("cargo");
command
.env("RUSTFLAGS", "-Zinstrument-coverage")
.env("RUSTFLAGS", "-Zinstrument-coverage -Ccodegen-units=1")
.env(
"LLVM_PROFILE_FILE",
project_root
Expand Down
2 changes: 1 addition & 1 deletion ofl/src/server/inject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ where

fn inject_script_tag(body: &str) -> Option<String> {
lol_html::rewrite_str(
&body,
body,
RewriteStrSettings {
element_content_handlers: vec![element!("head", |head| {
info!("inserting script tag");
Expand Down
4 changes: 2 additions & 2 deletions ofl/src/versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ fn update_dependency_version<'doc>(
}

let dep_version: &mut toml_edit::Value =
if let Some(dep) = dependencies[&package_name].as_table_mut() {
if let Some(dep) = dependencies[package_name].as_table_mut() {
if dep.contains_key("version") {
dep["version"].as_value_mut().unwrap()
} else {
// it's a table but it only specifies path or something else weird
return false;
}
} else if let Some(dep) = dependencies[&package_name].as_value_mut() {
} else if let Some(dep) = dependencies[package_name].as_value_mut() {
if let Some(inline) = dep.as_inline_table_mut() {
if let Some(version) = inline.get_mut("version") {
version
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/var.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl<State> Var<State> {

/// Returns a reference to the latest value, pending or committed.
pub fn latest(&self) -> &State {
&self.pending.as_ref().unwrap_or(&self.current)
self.pending.as_ref().unwrap_or(&self.current)
}

/// Initiate a commit to the state variable. The commit will actually
Expand Down
5 changes: 1 addition & 4 deletions topo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,6 @@ impl From<&'static Location<'static>> for Callsite {
struct Scope {
/// current id
id: CallId,
/// source location for this scope's root
callsite: Callsite,
/// # times each callsite's type has been observed during this scope.
callsite_counts: RefCell<Vec<(Callsite, u32)>>,
}
Expand All @@ -491,7 +489,6 @@ impl Scope {
{
self.increment_count(callsite);
let child_point = Self {
callsite,
callsite_counts: RefCell::new(Default::default()),
id: self.id.child(callsite, slot),
};
Expand Down Expand Up @@ -523,7 +520,7 @@ impl Scope {

impl Default for Scope {
fn default() -> Self {
Self { id: CallId::root(), callsite: Callsite::here(), callsite_counts: Default::default() }
Self { id: CallId::root(), callsite_counts: Default::default() }
}
}

Expand Down