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

upgrade to macro_magic 0.5.0 #1832

Merged
merged 4 commits into from
Oct 10, 2023
Merged

upgrade to macro_magic 0.5.0 #1832

merged 4 commits into from
Oct 10, 2023

Conversation

sam0x17
Copy link
Contributor

@sam0x17 sam0x17 commented Oct 10, 2023

Description

Upgrades macro_magic to 0.4.3 0.5.0, which introduces the ability to have export_tokens use the same name as the underlying item for its auto-generated macro name. Ultimately this will allow for better dev ux in our derive_impl feature.

@sam0x17 sam0x17 added R0-silent Changes should not be mentioned in any release notes T1-FRAME This PR/Issue is related to core FRAME, the framework. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. labels Oct 10, 2023
@sam0x17 sam0x17 self-assigned this Oct 10, 2023
@sam0x17 sam0x17 requested review from a team October 10, 2023 05:55
substrate/frame/support/procedural/src/lib.rs Outdated Show resolved Hide resolved
@sam0x17 sam0x17 requested a review from a team October 10, 2023 05:58
@sam0x17 sam0x17 enabled auto-merge (squash) October 10, 2023 05:59
@nazar-pc
Copy link
Contributor

macro_magic 0.4.3 should be yanked from crates.io, I can't compile runtimes anymore because runtime compilation doesn't have lock file and this new release essentially breaks all downstram builds for the ecosystem. Please honor semver.

@sam0x17
Copy link
Contributor Author

sam0x17 commented Oct 10, 2023

Yeah sorry about that all didn't intend for the core/internal functions to be part of the public API (and therefore semver exempt) but our usage of them in substrate has basically forced them to be part of the public API so here we are lol. 0.4.3 has been yanked and re-published as 0.5.0.

That said, if our versions are locked properly across polkadot-sdk, this shouldn't be an issue, as any inadvertent minor update can be a supply chain attack, so wanted to flag that...

@nazar-pc
Copy link
Contributor

I just wiped target and other cargo directories and it pulled in 0.4.3 on recompilation, but I'm not sure how to resolve that with the way runtimes are being compiled right now.

@sam0x17
Copy link
Contributor Author

sam0x17 commented Oct 10, 2023

I just wiped target and other cargo directories and it pulled in 0.4.3 on recompilation, but I'm not sure how to resolve that with the way runtimes are being compiled right now.

might have to clear cargo cache

@nazar-pc
Copy link
Contributor

might have to clear cargo cache

I did, that was the problem (while 0.4.3 was still published). This is to the point of lock file being non-existant when WASM version of the runtime is compiled.

@sam0x17 sam0x17 changed the title upgrade to macro_magic 0.4.3 upgrade to macro_magic 0.5.0 Oct 10, 2023
@sam0x17
Copy link
Contributor Author

sam0x17 commented Oct 10, 2023

I previously believed that a line like macro_magic = "0.4.3" locks the minor version but apparently in rust it should be macro_magic = "= 0.4.3".

This means there are many places in polkadot-sdk where we have third party deps that could easily be subject to supply chain attacks, so opening an issue for that ASAP

@sam0x17 sam0x17 merged commit 5adcb3e into master Oct 10, 2023
107 of 109 checks passed
@sam0x17 sam0x17 deleted the sam-update-macro-magic-0.4.3 branch October 10, 2023 17:48
@sam0x17
Copy link
Contributor Author

sam0x17 commented Oct 10, 2023

cc @gupnik it's now 0.5.0

ordian added a commit that referenced this pull request Oct 12, 2023
* master: (33 commits)
  ci: set CI_IMAGE back to (now updated) .ci-unified (#1854)
  ci: bump ci image to rust 1.73.0 (#1830)
  Refactor Identity to benchmark v2 (#1838)
  PVF worker: bump landlock, update ABI docs (#1850)
  Xcm emulator nits (#1649)
  Fixes path issue in derive-impl (#1823)
  upgrade to macro_magic 0.4.3 (#1832)
  Use safe math when pruning statuses (#1835)
  remote-ext: fix state download stall on slow connections and reduce memory usage (#1295)
  Update testnet bootnode dns name (#1712)
  [FRAME] Warn on unchecked weight witness (#1818)
  [xcm] Use `Weight::MAX` for `reserve_asset_deposited`, `receive_teleported_asset` benchmarks (#1726)
  Update bridges subtree (#1803)
  Check for parent of first ready block being on chain (#1812)
  Make CheckNonce refuse transactions signed by accounts with no providers (#1578)
  Fix Asset Hub collator crashing when starting from genesis (#1788)
  Mixnet integration (#1346)
  [xcm-emulator] Decouple the `AccountId` type from `AccountId32` (#1458)
  Treasury spends various asset kinds (#1333)
  chore: bump zombienter version (#1806)
  ...
bgallois pushed a commit to duniter/duniter-polkadot-sdk that referenced this pull request Mar 25, 2024
# Description

Upgrades `macro_magic` to 0.4.3, which introduces the ability to have
`export_tokens` use the same name as the underlying item for its
auto-generated macro name. Ultimately this will allow for better dev ux
in our derive_impl feature.
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Mar 26, 2024
* verify partial repo build on CI

* try with "git checkout ."

* no-revert

* use no-revert on CI

* fix for use in Cumulus repo

* move to nightly

* move desc

* rename script

* actual rename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. R0-silent Changes should not be mentioned in any release notes T1-FRAME This PR/Issue is related to core FRAME, the framework.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants