-
Notifications
You must be signed in to change notification settings - Fork 154
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
irmin: raise exception on duplicate Conf key name #2252
Merged
Merged
Conversation
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
metanivek
commented
May 18, 2023
adatario
reviewed
May 19, 2023
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.
Small comment on usage of if-then-else
vs. match
otherwise lgtm!
metanivek
force-pushed
the
conf/err_on_dupe_keys
branch
from
May 19, 2023 14:01
3e2db44
to
ac1c72a
Compare
adatario
approved these changes
May 23, 2023
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.
lgtm!
metanivek
force-pushed
the
conf/err_on_dupe_keys
branch
2 times, most recently
from
May 23, 2023 18:35
3fefcf6
to
65afbc6
Compare
metanivek
force-pushed
the
conf/err_on_dupe_keys
branch
from
May 24, 2023 14:23
65afbc6
to
43802f7
Compare
metanivek
added a commit
to metanivek/opam-repository
that referenced
this pull request
Jul 4, 2023
…min-pack, irmin-pack-tools, irmin-mirage, irmin-mirage-graphql, irmin-mirage-git, irmin-http, irmin-graphql, irmin-git, irmin-fs, irmin-containers, irmin-cli, irmin-chunk and irmin-bench (3.8.0) CHANGES: ### Added - **irmin** - Change behavior of `Irmin.Conf.key` to disallow duplicate key names by default. Add `allow_duplicate` optional argument to override. (mirage/irmin#2252, @metanivek) - **irmin-pack** - Add maximum memory as an alternative configuration option, `lru_max_memory`, for setting LRU capacity. (@metanivek, mirage/irmin#2254) ### Changed - **irmin** - Lower bound for `mtime` is now `2.0.0` (mirage/irmin#2166, @patricoferris) - **irmin-mirage-git** - Lower bound for `mirage-kv` is now `6.0.0` (mirage/irmin#2256, @metanivek) ### Fixed - **irmin-cli** - Changed `--store irf` to `--store fs` to align the CLI with what is published on the Irmin website (mirage/irmin#2243, @wyn)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This bit me while working on the memory-bounded LRU (no, I obviously did not copy-pasta an existing key 🫣).
I don't think there is a valid use case for calling
key
twice with the same name but different types, and it can result in annoying to debug runtime behavior since it will silently return the default value for the overwritten key.