-
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 6335 6334 -1
========================================
Files 762 761 -1
Lines 62974 62868 -106
Branches 9397 9382 -15
========================================
+ Hits 29909 29930 +21
+ Misses 30849 30722 -127
Partials 2216 2216 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
return replaceAll(relative.path[1..], "/", fcfg.packageSep); | ||
} | ||
|
||
// below we have some core tests of the above features |
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.
Good to see these tests, but this violates our current test organization.
I would expects then in tests/libraries/PathConfigs
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've been slowly moving library tests to the library since a few years, because the tests are documentation for the users. The current tutor displays the bodies of tests in the API documentation (while normal function declarations are only shown by their signatures.)
= libsFile(qualifiedModuleName, pcfg.libs, fcfg); | ||
|
||
loc libsFile(str qualifiedModuleName, list[loc] libs, LanguageFileConfig fcfg) throws PathNotFound { | ||
loc relativeFile = |relative:///| + fcfg.targetRoot + replaceAll(qualifiedModuleName, fcfg.packageSep, "/"); |
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.
Is "relative" a new scheme?
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.
no that has been there for a while. It is a scheme without semantics (no readers or writers), except that it is always the output scheme of relativize
and the input scheme of resolve
(the inverse of relativize).
relative:///
locations can be highly useful to use the operations like loc[extension="bla]
, or loc + str
or loc.parent
without having to resort to string manipulation.
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.
Eventually you use either resolve(absoluteLoc, relativeLoc)
or absoluteLoc + relativeLoc.path
to get a normal loc
again that can read and write stuff.
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. |
Uh oh!
There was an error while loading. Please reload this page.