Skip to content

feat: use consts for addrs - #660

Merged
mriise merged 2 commits into
masterfrom
feat/const-addrs
Sep 16, 2022
Merged

mriise merged 2 commits into
masterfrom
feat/const-addrs

Conversation

@Stebalien

Copy link
Copy Markdown
Member

And expose actor IDs so we don't need to call .id().unwrap() to retrieve them.

And expose actor IDs so we don't need to call `.id().unwrap()` to
retrieve them.
@Stebalien

Copy link
Copy Markdown
Member Author

(happy to punt this if we don't want to do it now, it was just annoying me a bit)

macro_rules! define_singletons {
($($name:ident = $id:literal,)*) => {
$(
paste! {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This won't have any affect at runtime, it just allows us to concatenate identifiers at compile time.

Comment thread runtime/src/lib.rs Outdated
Comment thread runtime/src/lib.rs Outdated
@Stebalien

Copy link
Copy Markdown
Member Author

Rust thinks paste is unused, or some other import? Is this concerning?

Rust thinks lazy_static is unused. It's likely a rust 2018/2021 thing (2021 doesn't use extern crate statements).

@anorth anorth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM apart from the unused import thing. I would also be just as happy with a version that didn't use the macro.

@Stebalien

Copy link
Copy Markdown
Member Author

LGTM apart from the unused import thing. I would also be just as happy with a version that didn't use the macro.

@mriise found the issue and is pushing a fix

@mriise

mriise commented Sep 16, 2022 •

Copy link
Copy Markdown
Contributor

we also had a workaround for serde, which was fixed in rust-lang/rust#89738. that is now gone

@mriise
mriise merged commit ff3d01f into master Sep 16, 2022
@mriise
mriise deleted the feat/const-addrs branch September 16, 2022 01:24
Stebalien added a commit that referenced this pull request Sep 16, 2022
* feat: use consts for addrs

And expose actor IDs so we don't need to call `.id().unwrap()` to
retrieve them.

Co-authored-by: mriise <me@mriise.net>
Stebalien added a commit that referenced this pull request Sep 16, 2022
* feat: use consts for addrs

And expose actor IDs so we don't need to call `.id().unwrap()` to
retrieve them.

Co-authored-by: mriise <me@mriise.net>
shamb0 pushed a commit to shamb0/builtin-actors that referenced this pull request Jan 31, 2023
* feat: use consts for addrs

And expose actor IDs so we don't need to call `.id().unwrap()` to
retrieve them.

* remove old TODO and extern crate refs

Co-authored-by: mriise <me@mriise.net>
snissn pushed a commit to snissn/builtin-actors that referenced this pull request Apr 11, 2025
* Add FIP proposal for WindowPoSt Grindability Fix

* Update fip-00xx.md to include the existing discussion link

* Apply some review feedback

* Apply jake's feedback

* Update the header to the proper template style

* Apply review feedback

* Update fip-00xx.md

* Rename FIP to the assigned number

* Apply review feedback

* Flesh out details of the two-phase network upgrade

---------

Co-authored-by: DrPeterVanNostrand <jnz@riseup.net>
Co-authored-by: Kaitlin Beegle <46908964+kaitlin-beegle@users.noreply.github.com>
Co-authored-by: Aayush <arajasek94@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants