Skip to content

fix: npm and crates publishing issue related to dependency versions requiring MSRV 1.81#150

Merged
gk-kindred merged 11 commits intomasterfrom
feature/fix-npm-publish-sept-2025
Sep 11, 2025
Merged

fix: npm and crates publishing issue related to dependency versions requiring MSRV 1.81#150
gk-kindred merged 11 commits intomasterfrom
feature/fix-npm-publish-sept-2025

Conversation

@gk-kindred
Copy link
Collaborator

This PR address two issues

  1. While publishing npm package for cohort_sdk_js step, since napi-rs/cli is not pinned to a version, on GH actions, version 3 is installed. @napi-rs/cli version 3 has couple of breaking changes, and therefore opted to pin to the last possible version 2, till we are ready to move to version 3.
  • Some of the challenges with moving to version 3 and why it is hard at the moment.
    • @napi-rs/cli version 3 needs the corresponding version @napi-rs crates.
    • We cannot move to a higher version of the crate, because we are restricted by the MSRV (minimum supported rust version) for that version of @napi-rs being version 1.81.
    • I tried bumping the rust version on my local machine to see if there are other issues, and there is another non trivial breaking change around Threadedfunctions.
      • We use call_async from threaded function which returns a value from callback and with version 3, this won't happen.
  1. Once the publishing of npm packages worked, we ran it two publishing crates issues.
    2.a. We use time crate in most of our packages, and while publishing cargo doesn't use the lockfile to stick to the exact version as we used while building. Therefore path versions could automatically increment. This lead to one of the transient dependency deranged with MSRV 1.81. Therefore I have pinned time crate to a version whose MSRV is below 1.81.
    2.b. Similar issue with indexmap crate used in replicator when rayon feature is enabled. This was enabled as part of some experiments during the initial days, and is not longer used. Also indexmap dependency on messenger was also obsolete and removed.

The changes have been tested after releasing a beta version 0.3.9-beta.3

@gk-kindred gk-kindred merged commit 077c20a into master Sep 11, 2025
2 checks passed
@gk-kindred gk-kindred deleted the feature/fix-npm-publish-sept-2025 branch September 11, 2025 06:18
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.

2 participants