stevedlawrence commented on code in PR #13: URL: https://github.com/apache/daffodil-sbt/pull/13#discussion_r1465243707
########## README.md: ########## @@ -94,6 +94,23 @@ If used, one may want to use the first value of this setting to configure daffodilVersion := daffodilPackageBinVersions.value.head ``` +## Layers and User Defined Functions + +If your schema project builds a Daffodil layer or user defined function, then +set the `daffodilBuildsLayer` or `daffodilBuildsUDF` setting to true, +respectively. For example: + +```scala +daffodilBuildsLayer := true + +daffodilBuildsUDF := true +``` + +Setting either of these values to true adds additional dependencies needed to +build the component. Note that this also sets the SBT `crossPaths` setting to +`true`, which causes the scala version to be included in that jar file name +since layer and UDF jars are specific to the scala version used to build them. Review Comment: > Or add a scalaCrossPaths option which if false shuts off the cross paths, but allows the other settings changes? > > Perhaps it's just allowScala which if not present or false scala will not be allowed in the project? These feel like it might start complicating things too much for users. The goal is to keep things as simple as possible for schema authors and giving them reasonable defaults. I think the new `daffodilBuildsUDF` and `daffodilBuildsLayer` are useful since they provide extra dependencies so users don't have to think about it, but beyond that I think starts making things complicated and causes users to have to remember more and more settings. We're already starting to build up a lot of settings. If a project wants to disallow scala files, then maybe the suggested way is to scan for it in code reviews or by adding *.scala to .gitignore. And if they don't like our crossPaths defaults, they can manually override it with the existing SBT setting. I like @tuxji's idea of just documnting that if a project has layers/udfs that don't use any Scala and they don't want the _2.12 then to set crossPaths to false in build.sbt. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
