stevedlawrence commented on code in PR #39: URL: https://github.com/apache/daffodil-sbt/pull/39#discussion_r1669216798
########## src/sbt-test/sbt-daffodil/saved-parsers-03/build.sbt: ########## @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +version := "0.1" + +name := "test" + +organization := "com.example" + +enablePlugins(DaffodilPlugin) + +daffodilPackageBinInfos := Seq( + DaffodilBinInfo("/test.dfdl.xsd", config = Some((Compile / resourceDirectory).value / "test.cfg")), + DaffodilBinInfo("/test.dfdl.xsd", Some("test02"), Some("two"), config = Some((Compile / resourceDirectory).value / "test.cfg")), +) Review Comment: This duplication of the config path feels a little messy to me. I guess it could be reduced by doing something like: ```scala daffodilPackageBinInfos := { val config = Some((Compile / resourceDirectory).value / "test.cfg")) Seq( DaffodilBinInfo("/test.dfdl.xsd", config = config), DaffodilBinInfo("/test.dfdl.xsd", Some("test02"), Some("two"), config = config), ) } ``` But that feels like it's starting to complicate things a bit. Maybe this is a sign that the config should not be part of `daffodilPackageBinInfos`? For example, we could create a new setting like: ```scala daffodilPackageBinConfigFile := Some((Compile / resourceDirectory).value / "test.cfg")) ``` And that setting would be used for compiling all schemas. I'd rather we avoid adding more settings since too many settings starts making things complicated, but maybe it's worth it in this case? Note I still like the new `DaffodilBinInfos` thing, but maybe it isn't needed to specify configs. -- 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]
