-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
Add support for scalaJSOutputPatterns #2233
Conversation
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. Only one question about visibility.
private[scalajslib] val jsFile: String, | ||
private[scalajslib] val sourceMapFile: String, | ||
private[scalajslib] val moduleName: String, | ||
private[scalajslib] val jsFileURI: String, | ||
private[scalajslib] val sourceMapURI: String |
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.
Why are these private?
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.
As the apply
and the withX
methods are public, there is no reason to keep these val
s non-public.
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.
Inspired by Scala.js. This configuration class is meant to be a "write-only", there is no usage on the reading side, that's why I think they make the values package-private here.
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 apply
is private as well
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 just noticed the apply
is private, too. Still, I think, if we can create it with some method e.g. withJSFile
accepting a String
, than there is sooner or later someone who will want to programmatically retrieve that String
, e.g. to manipulate it slightly.
If there is no other good reason (as we don't protect use from extra API maintenance here), we should not make it harder than necessary and make it public.
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.
Usually, I prefer to follow whatever the Scala.js plugin does, but what you said makes sense.
Made them public ✅
moduleSplitStyle: ModuleSplitStyle, // ignored in 0.6 | ||
outputPatterns: OutputPatterns // ignored in 0.6 |
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.
It makes sense to focus on dropping 0.6 support at this point. See #2218.
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.
Yes, this is meant to go very soon, so we don't want to invest time on it :)
Fixes #1721