Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/edge.ig.yada/src/edge/yada/ig.clj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@
id
(assoc :id id)))

(defmethod ig/init-key ::external-directories
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe directory-resource is better? Then it can rely on the existing known name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't resource not ideal because the directory won't be on the classpath?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resource would refer to web resource in this context, same as in yada

[_ {:keys [path options]}]
(yada.resources.file-resource/new-directory-resource
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to require this namespace before using it. See requiring-resolve below.

(io/file path) (or options {})))

(defmethod ig/init-key ::external-files
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file-resource is perhaps better

[_ {:keys [path options]}]
(yada.resources.file-resource/new-file-resource
(io/file path) (or options {})))

(defmethod ig/init-key ::classpath-name
[_ {:keys [name]}]
(yada/as-resource (io/resource name)))
Expand Down