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

Implement in-ns as a function. #824

Merged
merged 4 commits into from
Oct 27, 2022
Merged

Implement in-ns as a function. #824

merged 4 commits into from
Oct 27, 2022

Conversation

SignSpice
Copy link
Contributor

Please answer the following questions and leave the below in as part of your PR.

@SignSpice
Copy link
Contributor Author

Not sure how to go about setting the namespace just yet. WIP

@borkdude borkdude merged commit 341cc0d into babashka:master Oct 27, 2022
borkdude pushed a commit that referenced this pull request Oct 28, 2022
@mraveloarinjaka
Copy link

mraveloarinjaka commented Nov 18, 2022

@borkdude

The following test fails:

(= :bar/foo (eval* "(#'clojure.core/in-ns 'bar) ::foo"))

With the start of the stack:

ERROR in (in-ns-test) (core.clj:4739) expected: (= :bar/foo (eval* "(#'clojure.core/in-ns 'bar) ::foo")) actual: clojure.lang.ExceptionInfo: Wrong number of args (1) passed to: namespaces/sci-in-ns at clojure.core$ex_info.invokeStatic (core.clj:4739) clojure.core$ex_info.invoke (core.clj:4739) sci.impl.utils$rethrow_with_location_of_node.invokeStatic (utils.cljc:134) sci.impl.utils$rethrow_with_location_of_node.invoke (utils.cljc:91) sci.impl.interpreter$eval_form.invokeStatic (interpreter.cljc:42) sci.impl.interpreter$eval_form.invoke (interpreter.cljc:15)

Is it something that should be supported by sci?

@borkdude
Copy link
Collaborator

@mraveloarinjaka Where did you encounter this behavior in real life?

@mraveloarinjaka
Copy link

I was testing whether the issue hyperfiddle/rcf#35 was solved with the latest changes done with this fix.
I believe that sci still chokes at https://github.com/hyperfiddle/rcf/blob/master/src/hyperfiddle/rcf/analyzer.clj#L25

@borkdude
Copy link
Collaborator

@mraveloarinjaka I didn't expect this dynamic usage of in-ns via a var, but it can be fixed. Let create a new issue.

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

Successfully merging this pull request may close these issues.

3 participants