-
Notifications
You must be signed in to change notification settings - Fork 78
new reusable functions for using PathConfig #2270
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
base: main
Are you sure you want to change the base?
Conversation
…he helper functions for computing source and target locs and modulenames using PathConfig instances
…rametric functions for PathConfig processing
…in PathConfig.java
We should probably revisit #2265 after finishing this PR. |
This comment was marked as outdated.
This comment was marked as outdated.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2270 +/- ##
========================================
Coverage 47% 47%
- Complexity 6476 6477 +1
========================================
Files 768 767 -1
Lines 63807 63701 -106
Branches 9526 9511 -15
========================================
+ Hits 30252 30257 +5
+ Misses 31267 31159 -108
+ Partials 2288 2285 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did you move the Manifest-related code from util::Reflective to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did you move the Manifest-related code from util::Reflective to?
I thought I kept it where it was? Just added @deprecated to those functions. |
This is ready to merge:
|
This branch makes no changes to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this. I don't really understand what motivated these changes, but I think especially the LanguageFileConfiguration
will provide some nice consistency when working a lot with paths and module names.
} | ||
data LanguageFileConfig = fileConfig( | ||
str packageSep = "::", | ||
str binExt = "tpl", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I see how this works for the current Rascal compilation scheme. How can we use this for the compiler (code generation) as well? Will that have a separate LanguageFileConfig
where binExt = "java"
or something?
LanguageFileConfig
constructor, that explain which extensions, prefixes and filename escapes to use.LanguageFileConfig
. The default is set for Rascal's file extensions and prefixes (.tpl
,$
,/rascal
), however.srcs
andlibs
are directories (so mavenized or jarified if originally ajar
).Location::relativize
: namelyLocation::resolve
. Resolve is about finding the right prefix that a relative path belongs in. Resolve on a single location is simplyoutside + relative.path
, but when a list of path folders is givenIO::exists
is used to find the right prefix and then returning the fullloc
asoutside + relative.path
.An overview:
str
) to file path (loc
)loc
) to module name (str
)srcs
bin
libs