-
Notifications
You must be signed in to change notification settings - Fork 10
fix: Package name collisions #22
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
Merged
Merged
Changes from 12 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
584bc50
fix: Package name collisions
campionfellin 824bb84
chore: Update jsii version to 1.6
campionfellin 0ed3c1d
fix: fallback to hash for default packageName and fix hyphens in pyth…
campionfellin 8f34bab
fix: hypens to underscores for python package names
campionfellin 58e1784
chore: sync up dependencies with projen
campionfellin 0e460c8
Merge branch 'master' into issue273
d8b1e8b
Merge branch 'master' into issue273
campionfellin 4508c2e
chore: clean up snapshots
campionfellin b25f102
Revert "chore: sync up dependencies with projen"
campionfellin 8726b66
Revert "chore: Update jsii version to 1.6"
campionfellin 036f654
Merge branch 'master' of https://github.com/aws/jsii-srcmak into issu…
campionfellin 35ebfdf
fix: remove weird characters from snapshot
campionfellin 8381fda
fix: back to yarn.lock from mainline
campionfellin c62fc33
fix: Respond to comments
campionfellin b0448a1
fix: Update test utils to ignore all jsii.tgz binary files
campionfellin d9727c0
fix: update snapshots
campionfellin 8839018
fix: snapshots
campionfellin f6ab3b4
fix: snapshots
campionfellin 2abca41
fix: snapshots
campionfellin 6bfc372
fix: validate input options for python module name and java package
campionfellin 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 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,12 @@ export interface Options { | |
| */ | ||
| jsii?: JsiiOutputOptions; | ||
|
|
||
| /** | ||
| * Package name | ||
| * @default - hash of the basepath to the module | ||
| */ | ||
| packageName?: string | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure that's the correct name for this because users don't really interact with this value after code generation. Maybe Docstring help needs to indicate that it should be project-unique. |
||
|
|
||
| /** | ||
| * Produce python code. | ||
| * @default - python is not generated | ||
|
|
||
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
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
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.
I am assuming java would have a similar issue. I wonder if the correct behavior here is to validate per the language constraints and throw an error so the user will be required to pass in a valid name for the module.
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.
Yeah! We can do some validation instead of just correcting it. I'd be worried in some cases though where the user isn't the one explicitly choosing what this value is. In some use-cases, like CRDs in cdk8s from the internet, they might not control the group.
Would we then add this correction behavior to all consumers?
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.
Maybe we can do a
warnthat lets the user know we're correcting it?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 think the consumers of this library (eg cdk8s) should do the name mangling if needed. The constraints should be well documented
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.
Ok! I will add validation here then