-
Notifications
You must be signed in to change notification settings - Fork 199
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
language-support/scala: add support for specifying dependency roots explicitly #1210
Conversation
.../scala/codegen/src/main/scala/com/digitalasset/codegen/dependencygraph/DependencyGraph.scala
Outdated
Show resolved
Hide resolved
language-support/scala/codegen/src/main/scala/com/digitalasset/codegen/Util.scala
Outdated
Show resolved
Hide resolved
@@ -57,6 +58,11 @@ object Conf { | |||
.action((l, c) => c.copy(verbosity = l)) | |||
.text("Verbosity between 0 (only show errors) and 4 (show all messages) -- defaults to 0") | |||
|
|||
opt[String]('r', "root")(Read.stringRead) |
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 change is also going to affect java codegen... and the SDK doc, that does not mention root
.
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.
@leo-da We can remove the option from the driver if you prefer but I do think it is useful to have in all codegen.
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.
@jberthold-da that is fine, I was just pointing the things that we will need to address when this PR lands in master.
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.
@leo-da so should I take the option out of the CLI/config, or just declare it as unsupported for java?
I do think it is a very useful option.
language-support/scala/codegen/src/main/scala/com/digitalasset/codegen/CodeGen.scala
Outdated
Show resolved
Hide resolved
By default, code-gen will use all templates in the given package as roots, and generate code for all types used. This patch adds the ability to specify roots explicitly via a set of regex.es to match the (fully qualified) template names. This is an experiment, tests and UI need to be adjusted later.
179dd62
to
61c7062
Compare
61c7062
to
f896bce
Compare
Bumping this for @S11001001 and @leo-da . |
…NT-rootfilter-on-codegen
…NT-rootfilter-on-codegen
By default, code-gen will use all templates in the given package as roots, and generate code for all types used. This patch adds the ability to specify roots explicitly via a set of regex.es to match the (fully qualified) template names.
The feature is driven by flag
--root REGEX
(repeatable) from theMain
runner. Example:Pull Request Checklist
NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with
/AzurePipelines run
totrigger the build.