Key filter val filter#4917
Conversation
|
What do you think of just providing one function |
While I agree it makes sense to have a function that consumes the key and value ( That said, I am open to whatever makes the most sense given the community and API philosophy in Racket, as I am still very new to the idea of adding functionality here |
I've updated the PR to include |
|
It seems weird to me that |
|
@AlexKnauth That's my first thought too, but there's |
|
@sorawee @AlexKnauth should I try splitting this up into |
|
|
|
What is needed to move this forward? |
|
I cannot merge it due to the merge conflicts. Can you pull the latest |
2d6faa3 to
d30f2c0
Compare
d30f2c0 to
f22c002
Compare
|
Hi @sorawee @AlexKnauth , is there anything that still needs to be done here? |
|
Sorry, looks good to me. Merged. |
|
Thanks so much! |
|
This PR broke the following package: https://plt.cs.northwestern.edu/pkg-build/server/built/fail/odysseus.txt |
|
@sorawee @dr-neptune — ping There's always the possibility of backward incompatibility when an export is added to a module. Our general rule is to add an export only when it does not create a conflict with any package registered at pkgs.racket-lang.org. (This is a compromise between a completely consistent approach to backward compatibility and practical evolution of APIs, since code not registered as a package can still break.) Usually, when there's a conflict, we just don't make the addition to the original library — which may mean noyt having the binding at all, or it may mean an extra library or submodule. Sometimes, the remedy is to get a helpful package author to change code. In any case, this needs to be resolved, since we're trying to get the v8.13 release out. |
|
My apologies, I didn't see the previous ping by @samth . I'm not super familiar with this process. My first guess based on the error message is that the https://pkgs.racket-lang.org/package/odysseus My thought is that filtering a hash makes sense in a std lib as opposed to a loaded external lib. What do you think @mflatt @sorawee @prozion ? raco setup: /home/root/user/.local/share/racket/snapshot/pkgs/odysseus/odysseus/optimize.rkt:7:9: module: identifier already required Also, given the time component I understand if it would be better to roll back this change and chat about it further to prioritize getting 8.13 out |
|
The best solution is for prozion/odysseus#2 to get merged (thanks @AlexKnauth). If @prozion doesn't respond about that then maybe we need to change the name or revert the addition. |
|
By April 16, if the odysseus PR is not merged, I think we should just revert this PR. |
|
Let's revert the PR for now. |
This reverts commit 8e71a40.
Checklist
Description of change
This change adds the following 2 functions to
racket/hash:hash-filter-keys: given a hash table and a predicate, return a hash table where the predicate is true for the input hash tables keyshash-filter-values: the same as for keys, but applies the predicate to the input hash tables valuesThis is my first contribution to
racket/hash, please let me know if I am missing anything or if there are broader guidelines for contributing that are applicable here