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

Both grep and greplace! use "heisenparameters" #5

Open
pmonks opened this issue May 20, 2019 · 2 comments
Open

Both grep and greplace! use "heisenparameters" #5

pmonks opened this issue May 20, 2019 · 2 comments
Labels
enhancement Something useful is missing from the library. help wanted Community assistance with this issue is requested.

Comments

@pmonks
Copy link
Owner

pmonks commented May 20, 2019

As articulated by Stuart Sierra, the use of function parameters that may either be collections or singletons is an anti-pattern, yet that's exactly how grep and greplace! are implemented, for exactly the reason the article decries (convenience).

Although the fix is technically trivial, it does break backwards compatibility, so this will require some research to try to identify downstream users of the library, and then outreach to those projects' maintainers to ask them whether this fix is worth the pain it will inflict on them.

@pmonks pmonks added enhancement Something useful is missing from the library. help wanted Community assistance with this issue is requested. labels May 20, 2019
@pmonks
Copy link
Owner Author

pmonks commented May 20, 2019

With the demise of crossclj, I'm not sure how to identify downstream consumers of the library. If anyone knows of other tools or sites that provide this kind of information, it would be most welcome!

@pmonks
Copy link
Owner Author

pmonks commented Jun 7, 2019

I threw together a little tool that allows one to determine this, at least for projects hosted on Clojars.

Running clj -i repl-init.clj -r drops us in a pre-populated REPL, where we can run:

user=> (get inverted-dependencies "clj-commons/multigrep")
nil
user=> (get inverted-dependencies "org.clojars.pmonks/multigrep")
[["org.alfrescolabs.alfresco-technical-validation/org.alfrescolabs.alfresco-technical-validation" "org.clojars.pmonks/multigrep"]]

i.e. there's only one Clojars-hosted project that's using this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something useful is missing from the library. help wanted Community assistance with this issue is requested.
Projects
None yet
Development

No branches or pull requests

1 participant