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

Split into library and binary #149

Merged
merged 2 commits into from
Nov 27, 2023
Merged

Split into library and binary #149

merged 2 commits into from
Nov 27, 2023

Conversation

tirix
Copy link
Collaborator

@tirix tirix commented Nov 25, 2023

Along the lines of #117, this splits the repository into 2 crates, one library crate metamath-rs and one binary crate metamath-knife.
This is a naive split with as few functional changes as possible, moving files around with git mv, unchanged.
Fixes #117.

name = "metamath-rs"
readme = "metamath-rs/README.md"
description = "A library manipulating Metamath databases, including a parallel and incremental verifier for Metamath databases"
version.workspace = true
Copy link
Member

Choose a reason for hiding this comment

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

I think the two crates should be versioned separately.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To me the advantages of a single version system is:

Which would be the pros of different versions / in which cases do you see them diverging?

Copy link
Member

Choose a reason for hiding this comment

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

I think it would be unfortunate if we have to release new library crate versions for changes to the CLI, or vice versa. AFAIK there isn't any special relation between git tags and crates.io releases unless we want there to be.

I think we can have versions on related tracks, but I would expect them to differ in their patch versions most of the time. They are two separate crates in a dependency relationship, and dependencies are generally versioned entirely separately, even if they are in the same repo. The only thing that same-repo implies is that the dependent crate (here the CLI) will be using the version of the library from HEAD (as a path dependency), or possibly the public version of that right after a release. Making the versions exactly match seems like it would just make a mess of semver because that's not what it was designed for.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I see, thanks: I've made the change.
I was unsure which version to use, so I simply put the current 0.3.6 for both. They can diverge in the future.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Despite the thumbs up, I'm unsure if I should go ahead and merge this, with massive changes in #116 pending.

Copy link
Contributor

Choose a reason for hiding this comment

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

Either way there will be a merge. Maybe 116-first is easier? But you probably have better intuition than anyone on that point.

Copy link
Member

@digama0 digama0 Nov 27, 2023

Choose a reason for hiding this comment

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

I think it would be better to proceed with this first, as it is comparatively simpler and doesn't involve any deep technical questions. It doesn't seem like there are any dissenting voices to this PR, so I'll merge it now and we can update the existing PRs to match.

@tirix tirix mentioned this pull request Nov 26, 2023
@digama0 digama0 merged commit 0cc6dda into metamath:main Nov 27, 2023
4 checks passed
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.

Splitting crates
3 participants