Repository navigation
Conversation
d3xter666
force-pushed
the
refactor-improve-json-handling-of-empty-non-manifest-files
branch
4 times, most recently
from
October 20, 2026 06:40
5202ff1 to
ca50901
Compare
d3xter666
force-pushed
the
refactor-manifest-messages
branch
from
October 20, 2026 06:40
9a87056 to
15d0eb5
Compare
d3xter666
force-pushed
the
refactor-improve-json-handling-of-empty-non-manifest-files
branch
from
October 20, 2026 07:06
ca50901 to
957e7b7
Compare
d3xter666
force-pushed
the
refactor-manifest-messages
branch
2 times, most recently
from
October 20, 2026 07:50
2e094a7 to
85ac842
Compare
d3xter666
force-pushed
the
refactor-improve-json-handling-of-empty-non-manifest-files
branch
from
October 20, 2026 07:50
957e7b7 to
796e968
Compare
RandomByte
requested changes
Oct 20, 2026
| return JSON.parse(schemaFile); | ||
| const schemaUrl = new URL(`./schema/${schemaPath}`, import.meta.url); | ||
| const schemaFile = await readFile(fileURLToPath(schemaUrl), {encoding: "utf8"}); | ||
| return parseJSON(schemaFile, schemaPath); |
Member
There was a problem hiding this comment.
Why provide the URL and not the file path here?
Member
Author
There was a problem hiding this comment.
Not sure what you mean exactly here. Maybe that I didn't provide the full path like fileURLToPath(schemaUrl)?
Fixed with 791e191
d3xter666
force-pushed
the
refactor-improve-json-handling-of-empty-non-manifest-files
branch
2 times, most recently
from
October 21, 2026 05:03
791e191 to
f88b4a8
Compare
d3xter666
force-pushed
the
refactor-manifest-messages
branch
from
October 21, 2026 05:05
e9b7e4e to
54980c9
Compare
d3xter666
force-pushed
the
refactor-improve-json-handling-of-empty-non-manifest-files
branch
from
October 21, 2026 05:21
f88b4a8 to
09d3d03
Compare
Apply the parseJSON util to the non-manifest JSON parse sites in the builder (lbt bundle module content and source maps, minifier source maps, flexibility changes bundler and the .theming reader) so empty and malformed files surface a clear, path-named error. Also trim the redundant "Failed to parse JSON file" log in the lbt bundle Builder: the util error (logged right after) already names the file and the parse failure, so the catch now only states the skip action.
Apply the parseJSON util to the non-manifest JSON parse sites in the project (build manifest, workspace package.json, ui5Framework helper, maven/npm installers and the validation schema reader) so empty and malformed files surface a clear, path-named error.
- Correct filenames for source maps - Get schema path
d3xter666
force-pushed
the
refactor-improve-json-handling-of-empty-non-manifest-files
branch
from
October 21, 2026 05:23
09d3d03 to
6fedb4f
Compare
d3xter666
force-pushed
the
refactor-manifest-messages
branch
from
October 21, 2026 05:23
54980c9 to
fca52ec
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA: CPOUI5FOUNDATION-1046
This PR steps over and extends #1667.
The reason behind this change is that besides it's not related to
manifest.jsonparsing, it follows the same pattern for handling empty JSON files and providing more context in the error message.Thus, we handle this edge case of parsing empty JSON files the same.
Note: There are special cases where an empty JSON is expected and is handled explicitly. Those are not touched. i.e. https://github.com/UI5/cli/blob/main/packages/builder/lib/processors/jsdoc/lib/createIndexFiles.js#L66-L68