Skip to content

fix: Fix issue with require-file-for-ns#9

Open
rynkowsg wants to merge 1 commit intorobertluo:mainfrom
rynkowsg:g/fix-require-file-for-ns
Open

fix: Fix issue with require-file-for-ns#9
rynkowsg wants to merge 1 commit intorobertluo:mainfrom
rynkowsg:g/fix-require-file-for-ns

Conversation

@rynkowsg
Copy link

I found out that for some namespace symbols the require-file-for-ns doesn't work.
The file path received from ns meta is not absolute, but relative to the src directory.
Therefore io/file could not resolve the file (isFile false).

(require-file-for-ns 'chargedup.stations-api-authorizer.handler)
Execution error (ExceptionInfo) at com.mjdowney.rich-comment-tests/require-file-for-ns (rich_comment_tests.clj:206).
Failed to resolve source file for ns chargedup.stations-api-authorizer.handler

I found out that for some namespace symbols the require-file-for-ns doesn't work.
The file path received from ns meta is not absolute, but relative to the src directory.
Therefore io/file could not resolve the file (isFile false).

```
(require-file-for-ns 'chargedup.stations-api-authorizer.handler)
Execution error (ExceptionInfo) at com.mjdowney.rich-comment-tests/require-file-for-ns (rich_comment_tests.clj:206).
Failed to resolve source file for ns chargedup.stations-api-authorizer.handler
```
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.

1 participant