apache / apache/daffodil-sbt

Saved Parser Dependency with name

Open
#186 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
2
Forks
7
PR merge metrics
No merged PRs in 30d

Description

The daffodilBin() function is used to access a published saved parser as a dependency, for example:

```scala
libraryDependencies ++= Seq(
("org.example" % "dfdl-fmt" % "1.0.0").daffodilBin(daffodilVersion.value)
)
```

But if saved parser was created and publish with a `name`, e.g.

```scala
packageDaffodilBinInfos := Seq(
DaffodilBinInfo("/schema.dfdl.xsd", name = Some("messages"))
)
```

Then it is not possible to reference that saved parser using `daffodilBin()`.

To fix this, the `daffodilBin()` function should be changed to take a `name: Option[String]` parameter that defaults to None, and if provided is used to get the saved parser that matches the name field in DaffodilBinInfo.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the daffodilBin() entry point and the DaffodilBinInfo handling referenced in the issue, then trace how saved parsers are selected. The work is done when daffodilBin() still supports the default case and can select a saved parser by an optional name matching DaffodilBinInfo.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.