-
Notifications
You must be signed in to change notification settings - Fork 72
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
UI5 tooling rejects paths with parentheses #526
Comments
I was able to reproduce this problem with the following setup Environment
git clone [email protected]:SAP/openui5-sample-app.git "openui5-sample-app (master)"
cd "openui5-sample-app (master)"
npm install
npm start In order to adopt the $HOME path that is used as base for the Verbose log output
|
This is likely caused by this regex: https://github.com/SAP/ui5-builder/blob/037b0a690b3044418d069c0489002d39d33bca7c/lib/types/library/LibraryFormatter.js#L280 I guess a simple This can also be reproduced on any platform by building a library which contains regular expression metacharacters in their path. For example the OpenUI5 library |
…acters FS paths containing characters which can be interpreted as regular expression metacharacters may lead to issues during the namespaces detection of libraries. Alternatively we could switch to using https://www.npmjs.com/package/escape-string-regexp which we already use elsewhere. But I think this case here can be kept simple. Fixes SAP/ui5-tooling#526
SAP/ui5-builder#622 fixes the issue at hand. However I noticed that we dynamically create regular expressions from project namespaces on several occasions: This would cause similar issues in cases where the project namespace contains regular expression metacharacters. While I think this is unlikely to happen (and easily fixable), we should probably implement a validation of the namespace. Ideally we implement it now and log a warning, so we can switch it to throwing an error with UI5 Tooling 3.0. |
I resolved all mentioned cases of creating a RegExp from a project's namespace in the same PR. |
…acters FS paths containing characters which can be interpreted as regular expression metacharacters may lead to issues during the namespace detection of libraries. Alternatively we could switch to using https://www.npmjs.com/package/escape-string-regexp which we already use elsewhere. But I think this case here can be kept simple. Fixes SAP/ui5-tooling#526
…acters FS paths containing characters which can be interpreted as regular expression metacharacters may lead to issues during the namespace detection of libraries. Alternatively we could switch to using https://www.npmjs.com/package/escape-string-regexp which we already use elsewhere. But I think this case here can be kept simple. Fixes SAP/ui5-tooling#526
This issue reopens #469.
By chance, I encountered the same problem reported there in one of our pipeline builds. The Jenkins Job was called "Developer Test Pipeline (Own Branch)", i.e. had parentheses in it. UI5 tooling rejected these special characters in the paths of files.
The other issue suggests that the bug should be fixed with @ui5/cli 2.7.2. However, the project we run uses @ui5/cli 2.8.1. This thus might be a regression, or a similar but different case. The other issue reported the problem for a character with an accent, here it is a parentheses.
The text was updated successfully, but these errors were encountered: