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

Bump rustc version to nightly-2023-06-01 (1.72.0-nightly) #7109

Closed
wants to merge 15 commits into from

Conversation

vitvakatu
Copy link
Contributor

@vitvakatu vitvakatu commented Jun 22, 2023

Pull Request Description

Fixes #6895

We have this warning that needs to be addressed by a separate task.

warning: the following packages contain code that will be rejected by a future version of Rust: fs_extra v1.2.0, nalgebra v0.26.2

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@vitvakatu vitvakatu self-assigned this Jun 22, 2023
@@ -4,7 +4,7 @@
#![feature(associated_type_bounds)]
#![feature(drain_filter)]
#![feature(iter_order_by)]
#![feature(option_result_contains)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change number one – no more option_result_contains. Our build system is a primary victim, though, IMO changes are not bad. I also implemented our version of this feature in the prelude, so the IDE code didn't notice anything.


// =============
// === Tests ===
// =============
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't worry, tests just got copy-pasted to another module to prevent name conflict.

@@ -1175,10 +1175,11 @@ pub struct LibraryComponentGroup {
///
/// For more information, see
/// https://github.com/enso-org/design/blob/main/epics/basic-libraries/write-action-control/design.md.
#[derive(Hash, Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[derive(Hash, Debug, Clone, Copy, PartialEq, Eq, Default, Serialize, Deserialize)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clippy now requires Default derives, and it is a good thing for most places (except macros-generated code, urgh...)

@@ -129,17 +129,17 @@ struct NonChildTreeCrumb;
///
/// It provides way to easily convert vector of specific crumbs (e.g.
/// `[InfixCrumb::LeftoOperand, ..]` without calling into on each element.
pub trait IntoCrumbs: IntoIterator<Item: Into<Crumb>> + Sized {
pub trait IntoCrumbs<I: Into<Crumb>>: IntoIterator<Item = I> + Sized {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this change is needed. If anyone can fix the old code – you're welcome.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the better fix would be:

  • Not making IntoCrumbs a generic trait
  • Remove the inheritance : IntoIterator<Item: Into<Crumb>
  • implement into_crumbs where we implement the trait (currently in line 139).
    We can also think about sealing this trait (as we don't expect anyone providing their implementations of into_crumbs).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, done

@@ -273,7 +273,7 @@ macro_rules! define_widget_modules(
}

$(
impl const From<<$module::Widget as SpanWidget>::Config> for DynConfig {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No more const traits in the standard library, as well (removed in rust-lang/rust#110393)

@@ -21,6 +21,8 @@ use crate::display::render::passes::SymbolsRenderPass;
use crate::display::scene::DomPath;
use crate::display::scene::Scene;
use crate::display::scene::UpdateStatus;
#[allow(clippy::useless_attribute)]
#[allow(hidden_glob_reexports)]
use crate::display::shape::primitive::glsl;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty much another glob reexport conflict. We have multiple glsl modules.

@@ -1,5 +1,8 @@
//! `BufferUsage` specifies the intended usage pattern of the data store for optimization purposes.

// === Non-Standard Linter Configuration ===
#![allow(clippy::derivable_impls)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got lost in macros internals and couldn't place this attribute in the macro-generated code.

Comment on lines +319 to +321
// Clippy thinks that the clone is redundant, but it is not true,
// `resolved_validator` is used outside this `if` statement.
#[allow(clippy::redundant_clone)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clippy is an absolute lunatic in this version.

Comment on lines 190 to 192
#[cfg(not(version("1.69")))]
#[cfg(version("1.72"))]
cell: core::cell::RefCell<T>,
#[cfg(version("1.69"))]
#[cfg(not(version("1.72")))]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cfg conditions were swapped, now it should work correctly. RefCell didn't change, btw.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cfg conditions were swapped, now it should work correctly. RefCell didn't change, btw.

No, they were good. version means _this version or higher. You should just replace 1.69 with 1.73.

@@ -399,7 +399,7 @@ macro_rules! shared2 {

impl {$(
$(#$fn_meta:tt)*
$fn_vis:vis fn $fn_name:ident $(<$($fn_param:ident : $fn_param_ty:ty),*>)?
$fn_vis:vis fn $fn_name:ident $(<$($fn_param:ident : $fn_param_ty:path),*>)?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny change, I don't know how it worked before with types like callback::NoArgs (which is obviously path, not ty)

@vitvakatu vitvakatu marked this pull request as ready for review June 22, 2023 12:41
@@ -129,17 +129,17 @@ struct NonChildTreeCrumb;
///
/// It provides way to easily convert vector of specific crumbs (e.g.
/// `[InfixCrumb::LeftoOperand, ..]` without calling into on each element.
pub trait IntoCrumbs: IntoIterator<Item: Into<Crumb>> + Sized {
pub trait IntoCrumbs<I: Into<Crumb>>: IntoIterator<Item = I> + Sized {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the better fix would be:

  • Not making IntoCrumbs a generic trait
  • Remove the inheritance : IntoIterator<Item: Into<Crumb>
  • implement into_crumbs where we implement the trait (currently in line 139).
    We can also think about sealing this trait (as we don't expect anyone providing their implementations of into_crumbs).

@@ -1,3 +1,6 @@
// === Non-Standard Linter Configuration ===
#![allow(unused_qualifications)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To remove this attribute, we must update clap to the most recent version. I failed to do that, it's too dangerous to mix that with other changes. See clap-rs/clap#4951

Add a comment here with the link you've posted.

Comment on lines 3 to 7
// Clippy thinks that `Item` is unused in [`Slot`] definition, but it is not correct.
// It also does not seem to be possible to disable this lint for the particular struct only.

// === Non-Standard Linter Configuration ===
#![allow(clippy::extra_unused_type_parameters)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's file them an issue (with link to our code - it's open source after all), and link it here.

Comment on lines +11 to +14



mod unit;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why has it become private?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a reexport conflict between ensogl_core::prelude and ensogl_core::display::shape.

INFO ide_ci::program::command: cargo⚠️ warning: ambiguous glob re-exports
 INFO ide_ci::program::command: cargo⚠️   --> lib/rust/ensogl/component/grid-view/src/lib.rs:59:13
 INFO ide_ci::program::command: cargo⚠️    |
 INFO ide_ci::program::command: cargo⚠️ 59 |     pub use ensogl_core::display::shape::*;
 INFO ide_ci::program::command: cargo⚠️    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the name `unit` in the type namespace is first re-exported here
 INFO ide_ci::program::command: cargo⚠️ 60 |     pub use ensogl_core::prelude::*;
 INFO ide_ci::program::command: cargo⚠️    |             ----------------------- but the name `unit` in the type namespace is also re-exported here
 INFO ide_ci::program::command: cargo⚠️    |
 INFO ide_ci::program::command: cargo⚠️    = note: `#[warn(ambiguous_glob_reexports)]` on by default

But making this unit private doesn't change anything – all its contents are reexported in this file a few lines below. I find this way of organizing reexports weird, though.

Comment on lines 190 to 192
#[cfg(not(version("1.69")))]
#[cfg(version("1.72"))]
cell: core::cell::RefCell<T>,
#[cfg(version("1.69"))]
#[cfg(not(version("1.72")))]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cfg conditions were swapped, now it should work correctly. RefCell didn't change, btw.

No, they were good. version means _this version or higher. You should just replace 1.69 with 1.73.

@farmaazon
Copy link
Contributor

I try to ./run lint the branch on my machine, but get some system-dependent error. I will try debug it.

 INFO ide_ci::program::command: cargo⚠️ error: linking with `cc` failed: exit status: 1
 INFO ide_ci::program::command: cargo⚠️   |
 INFO ide_ci::program::command: cargo⚠️   = note: LC_ALL="C" PATH="/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/adam-praca/.nvm/versions/node/v18.14.1/bin:/home/adam-praca/.cargo/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/lib/emscripten:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin" VSLANG="1033" "cc" "-Wl,--version-script=/tmp/rustcQtSWWh/list" "-Wl,--no-undefined-version" "-m64" "/tmp/rustcQtSWWh/symbols.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.14p916ileatukulg.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.154l4zw38r4u5daa.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.16o8fv6mjg373t3s.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.18tiyz9wmnxvlpmy.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.1aax9xb3d0ojaxod.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.1ao6dtuxlrp7gsxe.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.1d4a926i2dd9my8o.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.1esvcrk27lsmrjls.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.1her9u54an3lm6ok.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.1hqhqbgzbjobbfax.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.1hrv0mz1rg17azpl.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.1qszvfdpf9806ech.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.1yraaiiyju8reszi.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.1z30448cd89cq7kf.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.20q0o659jcdv39ca.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.21ba5u6ptoag3rx1.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.25wsnhdzoiws7wte.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.2aq4iek79lpjrse8.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.2avvmdwztu6khq6k.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.2ejmwbwijnii38qo.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.2i8jy8z968ivwau4.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.2kojlu2uyc2p9h3g.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.2mlym7p3bgnl7dbg.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.2o8ew0nuqgknhkq5.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.2pg5oinjxpqruclz.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.2pq8i7zfa1fwmke1.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.2rd1w499y8v1m6nz.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.2re3tq1m9yt29vov.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.2rmemz4j669q93l0.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.2s64ogq7e2fksh2a.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.2x1os1spd8rvt8fh.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.2zc12sjf93cpyxbf.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.2zm6k4aekhvvvozu.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.31sl4tdg3j1zipog.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.34vux2j9q2hzximb.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.379jja2bzfuylurs.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.38d4f6ro42j8uneq.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.3abzcuepwrnyifji.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.3ddq2tjow6ub3xyi.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.3g2swe2o7t8v6ltp.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.3g5wugby2g2nnn7v.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.3ihi3ubzkeuk5cru.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.3jzg5stbw51s5w4b.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.3ndb6wo85ssvvj1a.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.3nmvy25ufpbpv57g.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.3yng1j8qx260ojp3.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.4796k5efhm5fatjn.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.4b8d0x749ae1h7a0.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.4cjtyjimubosdrjg.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.4emgh00g8buml6dr.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.4lnm1v9k596be3ew.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.4n2v8jfxewirbb4w.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.4u6w846jbal5kzkt.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.4vtnqzaj6na2jn8b.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.4wf0f4kbdz1qiwc6.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.4wqw0wmglsvvasxq.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.4wvak09dw6jkkx4a.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.4zbafavtongjy548.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.51uhtnyjyc1ijycx.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.52nn8wvz3l2l7n3i.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.531o5mp4bla4ms3.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.542mqau8ip1u100c.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.54usf3hq1lzdqdbd.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.55d5w850h0x0kaf2.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.56dbbqavdex9jy97.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.56vlnwb3lgqtmvce.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.5aow5l5cjitey5r2.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.5circzkgs4t63xro.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.65ayxesn3ofmg6r.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.6gn2at6llw5giko.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.8fczkl7x7xuvip7.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.8ia61cymsava734.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.8vza09y5tw5q2ok.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.d67978vgctxz8hq.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.dzokfpomgmp9jem.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.fq2r6ihx5x4cft6.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.omhipirbi2w6f7.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.pbq3hw1kkgcc572.rcgu.o" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.56egmuwe6mkfqzq0.rcgu.rmeta" "/home/adam-praca/dev/enso/target/rust/debug/deps/enso_json_to_struct-c21aaf5fbf4428d7.1sjy3wiqvu5mpy5n.rcgu.o" "-Wl,--as-needed" "-L" "/home/adam-praca/dev/enso/target/rust/debug/deps" "-L" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libproc_macro-eaf1658b3f662260.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libenso_prelude-720de1004fa01fa7.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libenso_logging-1a533651880b3208.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libenso_reflect-eaf261ebf1146f36.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libenso_metamodel-251789bacf07f532.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libgen_iter-31b0bbe56476cdf7.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libweak_table-c02752dc42bb8735.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/liblazy_static-7e4f2b5e1cc2a349.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libboolinator-64b1183ebe9e7967.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libassert_approx_eq-f2e093c2222cc4e3.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libanyhow-056550a8ddcf188f.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libfailure-ae3326ae8f31a2a7.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libitertools-41d5b3bdad8eea70.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libeither-7ad79b600d04e58a.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libsmallvec-acc24351477c2f85.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libenso_shapely-b4ab816ccf8e2d04.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libweb_sys-7f920098dd8adbd2.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libjs_sys-9d830230f8caa91b.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libwasm_bindgen-356970edd891718a.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libserde_json-50560c066e4cd87c.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libryu-b679062d76bbe56a.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libitoa-6b2515bb8612640a.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libenso_zst-a4fb5541f3680850.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libserde-3536087ddc6e1af8.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libbytemuck-90da3228645802ec.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libfutures-e9350e5ff2991548.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libfutures_executor-d232cda27bc7e1fa.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libfutures_util-abad90cfc7260aba.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libfutures_io-d02894c014ffb285.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libslab-2b2506c20b819155.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libfutures_channel-e47fd0ab12709149.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libpin_project_lite-12e67673ca318137.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libfutures_sink-8ac3de1a96cc786b.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libfutures_task-7ca74533554ac870.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libpin_utils-1dc1158a34de8876.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libfutures_core-28562954ddd40ee2.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libbacktrace-3bf3b5b406688c03.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libminiz_oxide-8da296bb45d2963c.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libadler-ee1abe10be52f92b.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libobject-ef5e87676365b236.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libmemchr-2de58219fcb5ada3.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/liblibc-b3ee3201205e00be.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libaddr2line-50b2420cbb328780.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libgimli-76279218c1fb495a.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/libcfg_if-e7bf5491f11c1997.rlib" "/home/adam-praca/dev/enso/target/rust/debug/deps/librustc_demangle-cd37b72a3a5b1d04.rlib" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-fe004512c8383174.rlib" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-47e0ecd3287b5c0f.rlib" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-943c5a031ea59756.rlib" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-52b0294e28e85f0c.rlib" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-b7fbc62efa77abb9.rlib" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-102731a77dbccbc8.rlib" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-1c48511ebb1a200e.rlib" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-015902ed618eefc0.rlib" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-02658e0f050cc536.rlib" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-d75813e4f4f6bafa.rlib" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-0804a6feb3ed38ea.rlib" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-6772c722dc231412.rlib" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-18cab63f30597806.rlib" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-c7fab2ff20d1f2cd.rlib" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-ffbb1fe30bac014a.rlib" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-7c042ecce9932705.rlib" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-c8fdd0d8f03b0225.rlib" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-91facdcc9286d01d.rlib" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-86f479762cd41464.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/adam-praca/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/adam-praca/dev/enso/target/rust/debug/deps/libenso_json_to_struct-c21aaf5fbf4428d7.so" "-Wl,--gc-sections" "-shared" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
 INFO ide_ci::program::command: cargo⚠️   = note: /usr/bin/ld: __wbindgen_realloc: undefined version: 
 INFO ide_ci::program::command: cargo⚠️           /usr/bin/ld: __wbindgen_malloc: undefined version: 
 INFO ide_ci::program::command: cargo⚠️           /usr/bin/ld: __wbindgen_free: undefined version: 
 INFO ide_ci::program::command: cargo⚠️           /usr/bin/ld: __wbindgen_exn_store: undefined version: 
 INFO ide_ci::program::command: cargo⚠️           /usr/bin/ld: __externref_table_dealloc: undefined version: 
 INFO ide_ci::program::command: cargo⚠️           /usr/bin/ld: __externref_table_alloc: undefined version: 
 INFO ide_ci::program::command: cargo⚠️           /usr/bin/ld: __externref_heap_live_count: undefined version: 
 INFO ide_ci::program::command: cargo⚠️           /usr/bin/ld: __externref_drop_slice: undefined version: 
 INFO ide_ci::program::command: cargo⚠️           /usr/bin/ld: failed to set dynamic section sizes: bad value
 INFO ide_ci::program::command: cargo⚠️           collect2: error: ld returned 1 exit status
 INFO ide_ci::program::command: cargo⚠️           
 INFO ide_ci::program::command: cargo⚠️ 
 INFO ide_ci::program::command: cargo⚠️ error: could not compile `enso-json-to-struct` (lib) due to previous error
 INFO ide_ci::program::command: cargo⚠️ warning: build failed, waiting for other jobs to finish...

@vitvakatu vitvakatu added the CI: Clean build required CI runners will be cleaned before and after this PR is built. label Jun 23, 2023
@vitvakatu
Copy link
Contributor Author

Apparently linux build fails for some reason, marking as draft until resolved.

@vitvakatu vitvakatu marked this pull request as draft June 26, 2023 09:22
@vitvakatu
Copy link
Contributor Author

Probably rustwasm/wasm-bindgen#3457

@wdanilo
Copy link
Member

wdanilo commented Jun 26, 2023

I don't think we should merge anything that has warnings during compilation, so the warnings should be addressed in this PR. What changes are needed to fix them?

@farmaazon
Copy link
Contributor

It is not fixed on my machine. I found another bug we perhaps trigger: rust-lang/rust#111888

@farmaazon
Copy link
Contributor

We won't have time to investigate it properly. @vitvakatu please merge this branch ASAP after restoring old rustc version - the changes are worth keeping regardless if version is bumped or not.

Copy link
Member

@wdanilo wdanilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Many changes are nice, several make the code much worse to read (I left comments in these places). I need to understand what forced us to change code this way. Maybe disabling some lints is the way to go instead ...
  2. @farmaazon I'm afraid this might not be mergeable with currently used Rust version as it seems like new Rust version stabilized/added some APIs that we are using here.
  3. Several places in the code are not cleaned - I left comments about it.

Comment on lines -153 to 158
vector.drain_filter(|(range, id)| {
preferred.get(range).map(|preferred_id| id != preferred_id).unwrap_or(false)
});
vector
.extract_if(|(range, id)| {
preferred.get(range).map(|preferred_id| id != preferred_id).unwrap_or(false)
})
.for_each(drop);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is such a strange change. Did clip told to write it this way? for_each(drop) is tacky as hell. The previous version was much more understandable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extract_if returns iterator, not using it will cause incorrect behavior. Alternative solution is to use retain and flip the condition in the closure, but I was not filling comfortable doing it for such complex expression.

Comment on lines +626 to +627


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double nl

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is copy-pasted from another place. I will fix that though

self.expressions_of_node.drain_filter(|node_id, _| !nodes.contains(node_id));
self.expressions_of_node.extract_if(|node_id, _| !nodes.contains(node_id));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is such a strange name. Im surprised. drain_filter was much nicer. Is it removed? :O

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really? I think drain was clear to us, because we know what drain means in this context. But it's not obvious.

I actually think extract is a better word for remove some elements from the vector and return them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is removed in the latest versions of the compiler. I will have to revert these changes though, because we need to return back to the previous compiler version.

Comment on lines +48 to +57
// ) -> BoxFuture<'static, Result<Self::Artifact>> { let WithDestination { inner, destination }
// = job; let this = self.clone(); async move { let paths =
// crate::paths::Paths::new_versions(&inner.repo_root, inner.versions)?; let context =
// crate::engine::context::RunContext { operation: crate::engine::Operation::Build, goodies:
// GoodieDatabase::new()?, config: BuildConfigurationFlags { clean_repo: false,
// build_engine_package: true, ..crate::engine::NIGHTLY } .into(), inner: context, paths, };
// let artifacts = context.build().await?; let engine_distribution =
// artifacts.packages.engine.context("Missing Engine Distribution!")?;
// ide_ci::fs::mirror_directory(&engine_distribution.dir, &destination).await?;
// this.adapt_artifact(destination).await } .boxed()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is unformatted. The previous version was much nicer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also the question is: why do we keep entirely-commented file in our repo? @mwu-tow ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obviously I wasn't touching commented code, it must be rustfmt doing that. I also don't understand why we have commented code in the repo, I was always told on reviews to remove it.

Comment on lines +174 to 179
// ) -> BoxFuture<'static, Result<Self::Watcher>> { async move { let BuildInput { build_info,
// repo_root, wasm } = build_input; let ide = IdeDesktop::new(&repo_root.app.ide_desktop); let
// watch_process = ide.watch_content(wasm, &build_info.await?).await?; let artifact =
// Self::Artifact::from_existing(output_path).await?; Ok(Self::Watcher { watch_process,
// artifact }) } .boxed()
// }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unformatted

//! 2. IntelliJ does not support environment variable expansion in the run configuration command,
//! see: https://github.com/intellij-rust/intellij-rust/issues/9621.
//! 3. IntelliJ does not support custom cargo commands,
//! see: https://youtrack.jetbrains.com/issue/CPP-30882
//! 3. IntelliJ does not support custom cargo commands, see: https://youtrack.jetbrains.com/issue/CPP-30882
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dot missing

@@ -30,6 +29,13 @@ pub struct State<T> {
id: usize,
}

// See https://github.com/mcarton/rust-derivative/issues/112.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is sooo bad :( Instead, we might want to disable this lint for now. Adding explicit code ike that makes the code harder to maintain and harder to fix when the lint gets fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will revert this change, as it is a bug in derivative.

@@ -14,6 +14,8 @@ pub mod physics;
mod frp;
mod loops;

#[allow(clippy::useless_attribute)]
#[allow(ambiguous_glob_reexports)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please addd docs

Comment on lines -152 to +159
const DEFAULT_SAMPLER: Sampler = Default::default();
const DEFAULT_SAMPLER: Sampler = Sampler::default();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change? Repeating the Sampler name does not make any sense. What lint caused it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default is not a const function, so can't be used here.

Comment on lines -425 to +428
let ready_jobs = self.jobs.compile_poll.drain_filter(|job| {
job.khr.is_shader_ready(&self.context, &job.program).unwrap_or(true)
});
let ready_jobs = self
.jobs
.compile_poll
.extract_if(|job| job.khr.is_shader_ready(&self.context, &job.program).unwrap_or(true));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another example of extract_if being much worse than drain_filter regarding code readability

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand your comment. It's literally change in name + rustfmt, and it reads perfectly fine ("ready jobs = extract by condition from compile_poll" instead of "ready jobs = drain filter compile poll by condition")

@vitvakatu
Copy link
Contributor Author

vitvakatu commented Jul 5, 2023

To all reviewers: PR is WIP, and there are changes expected. Reviewing it now is not advisable. My idea is to revert change in compiler version until rust-lang/rust#111888 is fixed. The issue is that I need to carefully revert changes that don't allow using previous compiler, while keeping most of other changes intact to facilitate future updates. To not block my current work on IDE, I will do that slowly.

@farmaazon
Copy link
Contributor

To not block my current work on IDE, I will do that slowly.

I'm only afraid merge conflicts will kill your progress when doing slowly.

@wdanilo
Copy link
Member

wdanilo commented Jul 11, 2023

I second @farmaazon worry. We will have big trouble with conflicts. What about applying as much changes as we can to the current codebase leaving the current compiler and then bumping it when new Rust comes out?

@vitvakatu
Copy link
Contributor Author

Not in our current priorities.

@vitvakatu vitvakatu closed this Sep 11, 2023
@vitvakatu vitvakatu deleted the wip/vitvakatu/update-rust branch November 21, 2023 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Clean build required CI runners will be cleaned before and after this PR is built.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bump rustc to version 1.70.0 equivalent.
4 participants