Conversation
|
Opening this up to see if people have any better ideas on how to do this (without some of the flaws) |
|
Neat. Can you add this to build setup? I think this along with ctags can be the same step. |
This dumps the configs at will, not into some file... Did you want this to be more visible (hence printing at the start of build-setup)? |
|
Hmmm good point. Printing into a file probably isn't great for discoverability. This should be added to CI somewhere though. |
6f70eab to
efb4b7d
Compare
81e56cf to
c39970f
Compare
e978209 to
821273c
Compare
2cf8c18 to
17d1b2c
Compare
jerryz123
left a comment
There was a problem hiding this comment.
Somehow my review comment didn't get posted.
Can you fix the dump into /tmp? That's a bit concerning to me.
| CONFIG_FRAG_LEVELS ?= 3 | ||
| .PHONY: find-config-fragments | ||
| find-config-fragments: $(SCALA_SOURCES) | ||
| rm -rf /tmp/scala_files.f |
There was a problem hiding this comment.
I'm afraid of this causing problems for shared installations. Can you make this dump the file within the repo?
Adds a new target to help users find some config fragments (also adds to the docs on how to use it).
Unfortunately, I wanted to do this through Scala reflection, however, that isn't possible since you can only look at the subclasses of
sealedtraits/classes. This is a simple solution that covers large majority of configs (assuming config. fragments are defined on a single line - "class NAME extends CONFIG\n"). This doesn't cover configs that don't inherit directly fromConfig... I don't have time to do that right now (or figure out a better way).TODO:
class NAME extends Config\n). Extend this to match on multi-line (is there a scala-parser in Python that we can just read the scala file and see if there is an object that matches this).Related PRs / Issues:
Type of change:
Impact:
Contributor Checklist:
mainas the base branch?changelog:<topic>label?changelog:label?.conda-lock.ymlfile if you updated the conda requirements file?Please Backport?