You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "stevedlawrence (via GitHub)" <gi...@apache.org> on 2025/12/18 15:14:12 UTC

[PR] Add new daffodilPlugin and daffodilBin ModuleID implicit enrichments [daffodil-sbt]

stevedlawrence opened a new pull request, #147:
URL: https://github.com/apache/daffodil-sbt/pull/147

   This adds two new implicit enrichments to ModuleId, which allows projects to more easily specify dependencies to Daffodil plugins or saved parsers without needing to know the details of how to reference them (e.g. Artifacts, classifiers, types, extensions).
   
   For example, depending on a plugin and saved parser now looks like this:
   
       libraryDependences ++= Seq(
         "org.example" % "dfdl-plugin" % "1.0.0" daffodilPlugin(daffodilVersion.value),
         "org.example" % "dfdl-fmt" % "1.0.0"  daffodilBin(daffodilVersion.value)
       )
   
   This causes SBT to download the the specified plugin and saved parser, allowing for easy testing or creationg of relase bundles.
   
   Note that this also removes the daffodilPluginDependences setting--the daffodilPlugin enrichment provides the same core functionality.
   
   Also updates the cross-version-03 testto use the new enrichments. A new "bundle" project is added to the test to depend on saved parsers and show how to copy the plugin and parsers to a directory. This mimicks one possible way to automate creating releases of pre-compiled artifacts.
   
   Closes #146


-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add new daffodilPlugin and daffodilBin ModuleID implicit enrichments [daffodil-sbt]

Posted by "olabusayoT (via GitHub)" <gi...@apache.org>.
olabusayoT commented on code in PR #147:
URL: https://github.com/apache/daffodil-sbt/pull/147#discussion_r2666088215


##########
README.md:
##########
@@ -228,6 +228,36 @@ IntelliJ, do not trigger during builds. So you must either run `sbt Test/compile
 to manually trigger the resource generator, or let SBT handle builds by
 enabling the "Use SBT shell for builds" option.
 
+### Saved Parsers as Dependencies
+
+It can sometimes be useful to add a saved parser as a dependency, causing SBT
+to download a saved parser published to a repository. This plugin enriches
+`ModuleID` with the `daffodilBin(...)` function to simplify this. The function
+requires a version to specify Daffodil compatibility of the saved parser--it
+should usually be `daffodilVersion.value`. For example:
+
+```scala
+libraryDependecies ++= Seq(

Review Comment:
   typo Dependencies



##########
README.md:
##########
@@ -228,6 +228,36 @@ IntelliJ, do not trigger during builds. So you must either run `sbt Test/compile
 to manually trigger the resource generator, or let SBT handle builds by
 enabling the "Use SBT shell for builds" option.
 
+### Saved Parsers as Dependencies
+
+It can sometimes be useful to add a saved parser as a dependency, causing SBT
+to download a saved parser published to a repository. This plugin enriches
+`ModuleID` with the `daffodilBin(...)` function to simplify this. The function
+requires a version to specify Daffodil compatibility of the saved parser--it
+should usually be `daffodilVersion.value`. For example:
+
+```scala
+libraryDependecies ++= Seq(
+  "org.example" % "dfdl-fmt" % "1.0.0" daffodilBin(daffodilVersion.value)
+)
+```
+
+This example adds a dependency to a saved parser for dfdm-fmt compatible with

Review Comment:
   typo dfdl



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add new daffodilPlugin and daffodilBin ModuleID implicit enrichments [daffodil-sbt]

Posted by "stevedlawrence (via GitHub)" <gi...@apache.org>.
stevedlawrence merged PR #147:
URL: https://github.com/apache/daffodil-sbt/pull/147


-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org