-
Notifications
You must be signed in to change notification settings - Fork 23
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
[FIX] Detect library namespace automatically #255
Conversation
75fdc0a
to
14dffeb
Compare
a4bcc00
to
3577bdd
Compare
CC: just fyi @Thodd, @petermuessig |
* | ||
* @abstract | ||
*/ | ||
class AbstractUi5Formatter extends AbstractFormatter { |
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.
Seeing 'Ui5' hurts my eyes...
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.
Mine too 🙄
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.
Hmm so what about this?
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.
Later in some other change 😬
It's private API anyways
* | ||
* @abstract | ||
*/ | ||
class AbstractUi5Formatter extends AbstractFormatter { |
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.
Mine too 🙄
The useNamespace flag was not sufficient in cases where the namespace should only be added for projects that do not already represent it in their directory structure. With SAP/ui5-builder#255 libraries will have a namespace property even though their directory structure already represents the namespace.
- Update globby and micromatch dependencies - Adapt to globby/micromatch changes - globby: 'nodir' option renamed to 'onlyFiles' - globby: Now transforms empty GLOB strings into globstar (matching everything instead of nothing) - mitigated by not globbing with empty strings anymore - globby/micromatch: Including excluded paths is now possible - before this was inconsistent - FileSystem._runGlob now throws errors for glob errors (instead of catching and logging them) - resourceFactory: Add callback for virtual base path prefix determination - The useNamespace flag was not sufficient in cases where the namespace should only be added for projects that do not already represent it in their directory structure. With SAP/ui5-builder#255 libraries will have a namespace property even though their directory structure already represents the namespace.
If no manifest.json is present, fallback to .library. Also refactor read operations of UI5 specific, formatter relvevant files.
e6b5a5f
to
5a26c6f
Compare
5a26c6f
to
813e5b5
Compare
Reminder to myself: Squash it |
@codeworrior @RandomByte @matz3 this change broke building application with all dependencies. The main reason being that you now expect a namespace to be provided for libraries, and you want to read that from the LibraryFormatter... So right now you cannot even build the testsuite with that, this is what's breaking ui5-typescript master branch as well @bd82 FYI |
@nlunets thanks for reporting. Could you please share some additional information?
I just did successful builds ( Note that there have been follow up changes to this one resolving some issues we identified after merging this PR:
However, they all got released with the same UI5 Builder v1.3.1 release: |
There should be some extra steps here
|
Before the namespace was computed from the name
And now it's just not coming from anywhere because we're never going into the library / application formatter. |
The yarn.lock file in the OpenUI5 repository references old versions of some UI5 Tooling modules that seemingly lead to this issue. We need to investigate why this happens exactly. In the meantime, please install the UI5 CLI globally and remove the local installation. This should solve the issue. |
yep it works with removing the yarn.lock file apparently, thanks :) |
It is, but in the erroneous setup an old version of the UI5 Builder is used that does not have the new namespace detection that got implemented in this PR. |
Like already done for applications, read namespace information from "sap.app".id
attribute of manifest.json.
Before, some tasks derived the namespace from a libraries name.
This contract was not documented and not enforced. Causing some confusion when
using those tasks.
If no manifest.json is present, fall back to library.name attribute of .library.
If .library is not present, fall back to the relative path of the library.js file.
If that is not present, the namespace is undefined and some tasks are never
executed for that library:
namespaces might become mandatory in a future major release.