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

Use Namespace/find to see if nrepl is running, not require #95

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

hlship
Copy link
Collaborator

@hlship hlship commented Jul 20, 2023

Fixes #93

@hlship hlship added this to the 2.0.1 milestone Jul 20, 2023
@hlship hlship self-assigned this Jul 20, 2023
@hlship hlship merged commit 472f32e into main Jul 20, 2023
@hlship hlship added the bug label Jul 20, 2023
nha added a commit to nha/pretty that referenced this pull request Aug 7, 2023
Before this change, adding this library in babashka yields an error:

```
   (Namespace/find 'some.ns)
    ^--- No matching method find found taking 1 args
```

This is introduced in a recent change (clj-commons#95), the previous version 2.0 works fine.
This is because Namespace/find is not compiled. But `find-ns` is and is
equivalent

https://github.com/clojure/clojure/blob/38bafca9e76cd6625d8dce5fb6d16b87845c8b9d/src/clj/clojure/core.clj#L4126-L4130
nha added a commit to nha/pretty that referenced this pull request Aug 7, 2023
…hka/babashka) yields an error:

```
   (Namespace/find sym)
    ^--- No matching method find found taking 1 args
```

This has been introduced in a [recent
change](clj-commons#95).
Pretty version 2.0 is usable from babashka.

This is because `Namespace/find` is not compiled in babashka (probably considered an implementation detail).
But `clojure.core/find-ns` is included and is equivalent

https://github.com/clojure/clojure/blob/38bafca9e76cd6625d8dce5fb6d16b87845c8b9d/src/clj/clojure/core.clj#L4126-L4130

This change proposes to replace `Namespace/find` with `clojure.core/find-ns`.
nha added a commit to nha/pretty that referenced this pull request Aug 7, 2023
…hka/babashka) yields an error:

```
   (Namespace/find sym)
    ^--- No matching method find found taking 1 args
```

This has been introduced in a [recent change](clj-commons#95).
Previous versions (I checked 2.0) are usable from babashka.

This is because `Namespace/find` is not compiled in babashka (probably considered an implementation detail).
But `clojure.core/find-ns` is included and is equivalent

https://github.com/clojure/clojure/blob/38bafca9e76cd6625d8dce5fb6d16b87845c8b9d/src/clj/clojure/core.clj#L4126-L4130

This change proposes to replace `Namespace/find` with `clojure.core/find-ns`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ansi namespace attempts to require nrepl.core, causes exceptions in some cases
1 participant