generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 10
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 output path in build task #334
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2a4019d
Avoid duplicates in --help
daogrady 63dbbb2
Properly configure outputDirectory in build task
daogrady f1e70cf
Merge branch 'main' into fix/build-task-output
daogrady 090409a
Bail early if outputDirectory is found in cds.env
daogrady c0ba091
Fix doc type
daogrady 452155d
Forgo stateless approach
daogrady 44d5713
Load configuration lazily
daogrady cf576d0
Properly initialise configs when cloning
daogrady File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
This does not have the expected effect, due to the fact that the module
./lib/compile
is implicitly loading module./lib/config
. So, the constructor of theConfig
class has already been executed and any changes tocds.env.typer
will be ignored.You would have to change it 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.
You're right, the properties should actually not be imprinted into the config at all, but dynamically queried from
cds.env
.The joys of global state... I will check it again.
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.
(the fix should actually work, as line 98 is basically a no-op when
cds.env
is present, since#modelDirectoryName
will attempt to read thecds.typer.outputDirectory
, but it is still bad style)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.
So,.... I did not mark it just because of code style 😊. I actually got an error during the build. I only had
useEntitiesProxy
in the env and theoutputDirectory
should be read via the default way - so fromtsconfig.json
.This results in the same bug I already mentioned
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.
Ah, I see your use case now and I am afraid you are correct.
I have made the initialisation of
configuration
lazy to support modifications ofcds.env
before the first actual use ofcds-typer
.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.
Looks good. The build finishes without any errors now.
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.
Great! Thanks for bringing this to our attention and for the review. 🙂