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

update-vals etc from Clojure 1.11 missing #137

Open
Oddsor opened this issue Jul 10, 2023 · 10 comments
Open

update-vals etc from Clojure 1.11 missing #137

Oddsor opened this issue Jul 10, 2023 · 10 comments

Comments

@Oddsor
Copy link
Contributor

Oddsor commented Jul 10, 2023

Tried writing a little transformer that was going to use update-vals, but it seems to be missing from Jet!

Similar story to other functions added in Clojure 1.11 such as update-keys, parse-long etc...

@borkdude
Copy link
Owner

Can you make a repro?

@Oddsor
Copy link
Contributor Author

Oddsor commented Jul 10, 2023

I made a PR with tests instead!
#138

Edit: And here's an example to illustrate the problem where I convert the keys in a map into keywords:

> echo "{\"a\" \"1\"}" | jet -T '(update-keys keyword)'
...
Caused by: clojure.lang.ExceptionInfo: Could not resolve symbol: update-keys

@borkdude
Copy link
Owner

Thanks :)

I noticed the changelogs weren't updated yet. Can you do this too?

@Oddsor
Copy link
Contributor Author

Oddsor commented Jul 10, 2023

Will do!
Also noted in the PR that maybe a separate NS should be created instead of inlining the missing functions directly?
Babashka does this with a core-extras in an "impl"-namespace

@borkdude
Copy link
Owner

Yes, I think moving this extra config to sci.configs will be even better so then we can re-use it in both bb and jet and possibly more projects.

@Oddsor
Copy link
Contributor Author

Oddsor commented Jul 10, 2023

Okay, so maybe the current PR should be closed and then I can open one for SCI where the functions are added to clojure-core here?
https://github.com/babashka/sci/blob/master/src/sci/impl/namespaces.cljc#L991C11-L991C11

@borkdude
Copy link
Owner

No, not in SCI, but in https://github.com/babashka/sci.configs.

@Oddsor
Copy link
Contributor Author

Oddsor commented Jul 10, 2023

Cool, I'll give updating sci.configs a try later today 😊

@Oddsor
Copy link
Contributor Author

Oddsor commented Jul 12, 2023

I tried to applying the recent update to sci.configs to Jet and noticed that leiningen is still used to build and test, which doesn't support referencing git-dependencies!

I can try to assist with moving to building using deps.edn instead if that's a good direction for the project, but for now it looks like this issue will be resolved with the next release 😊

@borkdude
Copy link
Owner

Ah yes, sorry, I didn't notice that. We can move to tools.build. I'll make an issue for that and solve that myself, if nobody else jumps on it.

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

No branches or pull requests

2 participants