-
Notifications
You must be signed in to change notification settings - Fork 12
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
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,21 @@ | ||
[package] | ||
[workspace] | ||
members = [ | ||
"metamath-rs", | ||
"metamath-knife", | ||
] | ||
resolver = "2" | ||
|
||
[workspace.package] | ||
authors = ["David A. Wheeler <[email protected]>", "Stefan O'Rear <[email protected]>"] | ||
license = "MIT OR Apache-2.0" | ||
name = "metamath-knife" | ||
readme = "README.md" | ||
version = "0.3.6" | ||
description = "A parallel and incremental verifier for Metamath databases" | ||
repository = "https://github.com/david-a-wheeler/metamath-knife" | ||
repository = "https://github.com/metamath/metamath-knife" | ||
keywords = ["theorem", "proving", "verifier", "proof", "assistant"] | ||
categories = ["command-line-utilities", "development-tools", "mathematics"] | ||
edition = "2021" | ||
|
||
[dependencies] | ||
lazy_static = "1.4" | ||
itertools = "0.10" | ||
filetime = "0.2" | ||
fnv = "1.0" | ||
regex = { version = "1.5", default-features = false, features = ["std", "perf"] } | ||
tinyvec = "1.5" | ||
log = "0.4" | ||
annotate-snippets = "0.9" | ||
typed-arena = "2.0" | ||
|
||
# Dependencies for standalone executable, not needed for a library | ||
clap = "2.33" | ||
simple_logger = "1.13" | ||
|
||
# Optional dependencies | ||
dot-writer = { version = "0.1.2", optional = true } | ||
xml-rs = { version = "0.8.14", optional = true } | ||
|
||
[dev-dependencies] | ||
assert_matches = "1.5" | ||
|
||
[features] | ||
default = ["annotate-snippets/color"] | ||
dot = ["dot-writer"] | ||
xml = ["xml-rs"] | ||
|
||
[profile] | ||
|
||
[profile.release] | ||
|
@@ -49,8 +28,3 @@ codegen-units = 4 | |
|
||
[profile.test] | ||
codegen-units = 4 | ||
|
||
[[bin]] | ||
name = "metamath-knife" | ||
path = "src/main.rs" | ||
doc = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[package] | ||
name = "metamath-knife" | ||
readme = "metamath-knife/README.md" | ||
description = "A command-line tool for Metamath, including parallel and incremental verifier for Metamath databases" | ||
version.workspace = true | ||
authors.workspace = true | ||
license.workspace = true | ||
repository.workspace = true | ||
keywords.workspace = true | ||
categories.workspace = true | ||
edition = "2021" | ||
|
||
[dependencies] | ||
clap = "2.33" | ||
simple_logger = "1.13" | ||
annotate-snippets = "0.9" | ||
metamath-rs = { path = "../metamath-rs" } | ||
|
||
[[bin]] | ||
name = "metamath-knife" | ||
path = "src/main.rs" | ||
doc = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[package] | ||
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 | ||
authors.workspace = true | ||
license.workspace = true | ||
repository.workspace = true | ||
keywords.workspace = true | ||
categories.workspace = true | ||
edition = "2021" | ||
|
||
[dependencies] | ||
lazy_static = "1.4" | ||
itertools = "0.10" | ||
filetime = "0.2" | ||
fnv = "1.0" | ||
regex = { version = "1.5", default-features = false, features = ["std", "perf"] } | ||
tinyvec = "1.5" | ||
log = "0.4" | ||
annotate-snippets = "0.9" | ||
typed-arena = "2.0" | ||
|
||
# Optional dependencies | ||
dot-writer = { version = "0.1.2", optional = true } | ||
xml-rs = { version = "0.8.14", optional = true } | ||
|
||
[dev-dependencies] | ||
assert_matches = "1.5" | ||
|
||
[features] | ||
default = ["annotate-snippets/color"] | ||
dot = ["dot-writer"] | ||
xml = ["xml-rs"] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.