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

Resolve the proc-block bootstrapping problem #353

Merged
merged 13 commits into from
Oct 11, 2021
Merged

Conversation

Michael-F-Bryan
Copy link
Contributor

@Michael-F-Bryan Michael-F-Bryan commented Oct 10, 2021

The underlying problem with #247 is that we were giving "builtin" proc blocks special treatment while developing, meaning sometimes they would try to use hotg-rune-core and friends from crates.io, other times it would use versions from local files on disk or git.

This resolves the issue by:

  • Moving all proc blocks to their own repository (hotg-ai/proc-blocks)
  • Making all HOTG proc blocks use hotg-rune-core from crates.io, like every other proc block
  • Generating a Cargo.toml which will make each Rune use the hotg-rune-core version that matches what hotg-rune-compiler was built against
  • Using the semver trick to let proc blocks compiled against an older version of hotg-rune-core work with the newer version when the APIs being used are compatible, even if the hotg-rune-core crate's versions are different

... I think I've correctly threaded the needle here 🤞

Fixes #247.

cc: @f0rodo, @Mohit0928, @saidinesh5

@Michael-F-Bryan Michael-F-Bryan added category - bug Something isn't working category - refactor Internal code changes or reworking that aren't directly visible to the user priority - urgent This needs to be done ASAP effort - hard This should be pretty simple to fix area - codegen The code gets generated when compiling a Rune area - runtime The Rust Rune runtime area - proc blocks Procedural blocks linked to by the compiled Rune labels Oct 10, 2021
@Michael-F-Bryan Michael-F-Bryan marked this pull request as ready for review October 10, 2021 19:28
@f0rodo
Copy link
Contributor

f0rodo commented Oct 10, 2021

The semver-trick is interesting.

@Michael-F-Bryan Michael-F-Bryan merged commit 00d8bc5 into master Oct 11, 2021
@Michael-F-Bryan Michael-F-Bryan deleted the next-release branch October 11, 2021 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area - codegen The code gets generated when compiling a Rune area - proc blocks Procedural blocks linked to by the compiled Rune area - runtime The Rust Rune runtime category - bug Something isn't working category - refactor Internal code changes or reworking that aren't directly visible to the user effort - hard This should be pretty simple to fix priority - urgent This needs to be done ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to mix sources for dependencies in the generated Rune project
2 participants