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

Compiling libra on stable Rust #270

Closed
est31 opened this issue Jul 18, 2019 · 6 comments
Closed

Compiling libra on stable Rust #270

est31 opened this issue Jul 18, 2019 · 6 comments
Assignees
Labels

Comments

@est31
Copy link

est31 commented Jul 18, 2019

There is a whitelist currently in nightly_features.sh of nightly features adopted in libra. I have made this issue (inspired by a similar issue in the rocket repo) to gauge which features will arrive on stable in the near term, which will take some time, and which never will, so that if libra wants to compile one day on stable Rust, it can do the needed changes.

Likely arriving on stable soon

Feature name Most likely stable at
async_await 1.38 (MVP at least)
duration_float 1.38 or 1.39 unless there is something stalling it (PR)
checked_duration_since 1.39 most likely (PR)
  • repeat_generic_slice: I guess this is a good candidate for filing a stabilization PR, there seems to be consensus for stabilizing it. Needs someone to push it past the finish line though.

Only stable in the mid to long term

  • trait_alias: there seem to be open questions still, I think it won't stabilize soon

  • specialization: riddled with SOUNDNESS HOLES and likely to stay unstable for years to come, you should remove it.

  • slice_concat_ext: similar to checked_duration_since.

  • crate_visibility_modifier: It's a long thread with lots of back and forth and as there is no explicit agenda by any of the teams, I doubt they will stabilize it soon. It might even be removed in the future: I've heard concerns that it might be confusing with crate::foo paths.

  • drain_filter: it seems the libs team didn't want to stabilize it, not sure whether they still hold that opinion: Tracking issue for Vec::extract_if and LinkedList::extract_if rust-lang/rust#43244 (comment)

  • exhaustive_patterns likely to stabilize together with never_type (see nmatsakis comment).

  • never_type: this one was stabilized once and then they removed it again because of bugs. Not sure whether the bugs are all resolved, I guess they'll wait until stuff like mem::uninitialized has been removed from codebases so it'll take some time.

  • panic_info_message (tracking issue is closed): not sure why used. You can just use the Display impl instead, it shouldn't be too hard.

Likely never stable

  • box_syntax is going to be phased out, I'm not sure whether box_patterns will be phased out as well but I definitely don't think they'll stabilize any time soon.

  • set_stdio: never going to be stable, it's an internal feature.

  • test: never going to be stable, as it's an internal crate. You can use the rustc-test crate instead: https://crates.io/crates/rustc-test

@bmwill
Copy link
Contributor

bmwill commented Jul 18, 2019

This is great! Seriously thank you for taking the time to provide a clear breakdown (with references) to each nightly feature we're currently using. A number of us on the team have a goal of moving towards using stable Rust but due to a number of things (launching testnet for example) we didn't have the bandwidth for pushing on this as heavily as we'd like. I'm hoping that we'll have more time to push for this real soon.

So the next steps are:

  1. Use the nightly_features.sh script in CI to prevent any additional features from being used.
  2. Use this breakdown of each feature you've provided in order to eliminate our dependency on features which aren't on track for stabilization or won't be stabilized anytime soon.
  3. Wait for remaining features to be stabilized and migrate to stable.

@bmwill
Copy link
Contributor

bmwill commented Jul 23, 2019

If you've been following the most recent commits to the project you'll notice that @sunshowers and @huitseeker have done some great work pruning down that list down to only three nightly features. They are:

  • async_await
  • custom_test_frameworks
  • set_stdio

The current plan is to do some engineering work to remove set_stdio and hopefully custom_test_frameworks so that when async_await graduates to the beta channel (maybe next month?) we can move from being on nightly to being on beta. Then once async_await graduates to stable we can move from beta to stable.

@sunshowers
Copy link
Contributor

It appears that stable async/await might not make it into 1.38: rust-lang/rust#63209 (comment)

Hopefully it'll be ready for 1.39!

@bmwill
Copy link
Contributor

bmwill commented Sep 27, 2019

Update: As of #1072 libra no longer using nightly and instead uses the 1.39.0 beta toolchain. In 6 weeks when 1.39.0 is released to stable we should be able to move to stable.

@jaypalma
Copy link

usage:

Use the following commands:

account | a
Account operations
query | q
Query operations
transfer | transferb | t | tb
<sender_account_address>|<sender_account_ref_id> <receiver_account_address>|<receiver_account_ref_id> <number_of_coins> [gas_unit_price (default=0)] [max_gas_amount (default 10000)] Suffix 'b' is for blocking.
Transfer coins from account to another.
help | h
Prints this help
quit | q!
Exit this client

Please, input commands:

libra%

@est31
Copy link
Author

est31 commented Oct 12, 2019

Thanks @bmwill . I suppose it's mostly resolved then and is only a matter of waiting for the Rust 1.39 release.

@est31 est31 closed this as completed Oct 12, 2019
danielxiangzl pushed a commit to danielxiangzl/Block-STM that referenced this issue Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants