Skip to content
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

Relative path for (sourceDirectory in avroConfig) fails #37

Open
durp opened this issue Apr 7, 2017 · 5 comments
Open

Relative path for (sourceDirectory in avroConfig) fails #37

durp opened this issue Apr 7, 2017 · 5 comments

Comments

@durp
Copy link

durp commented Apr 7, 2017

If I don't fix the base in the override, e.g.:
(sourceDirectory in avroConfig) := baseDirectory.value / "relative/path/to/my/avro"
I get a
java.util.NoSuchElementException: key not found: relative/path/to/my/avro.avdl

It might be helpful to update the docs to indicate the change in behavior (0.13 seems to work fine with a relative path)

@durp
Copy link
Author

durp commented Apr 10, 2017

One other note, IntelliJ also has serious problems with the default scalaSource that results in complaints about duplicates. Adding a line to the READMe that indicates these can be avoided with:
(scalaSource in avroConfig) := sourceManaged.value / "main"
might save somebody some time.

@julianpeeters
Copy link
Owner

julianpeeters commented Apr 10, 2017 via email

@middlewareman
Copy link

I get this error message too. I have not verified that it goes away with an absolute path. It's fine in sbt-avrohugger 0.14.0 and broken in 0.15.0.

[error] (models-scala/avro:generateSpecific) java.util.NoSuchElementException: key not found: avro/ProfileIndexerProtocol.avdl
[error] Total time: 8 s, completed Jul 15, 2017 4:58:33 PM
> last models-scala/avro:generateSpecific
java.util.NoSuchElementException: key not found: avro/ProfileIndexerProtocol.avdl
        at scala.collection.MapLike$class.default(MapLike.scala:228)
        at scala.collection.AbstractMap.default(Map.scala:58)
        at scala.collection.MapLike$class.apply(MapLike.scala:141)
        at scala.collection.AbstractMap.apply(Map.scala:58)
        at sbtavrohugger.filesorter.AVDLFileSorter$.addFiles$1(AVDLFileSorter.scala:28)
        at sbtavrohugger.filesorter.AVDLFileSorter$.sortSchemaFiles(AVDLFileSorter.scala:34)
        at sbtavrohugger.FileWriter$.generateCaseClasses(FileWriter.scala:24)
        at sbtavrohugger.formats.specific.SpecificGeneratorTask$$anonfun$specificCaseClassGeneratorTask$1$$anonfun$1.apply(SpecificGeneratorTask.scala:43)
        at sbtavrohugger.formats.specific.SpecificGeneratorTask$$anonfun$specificCaseClassGeneratorTask$1$$anonfun$1.apply(SpecificGeneratorTask.scala:40)
        at sbt.FileFunction$$anonfun$cached$1.apply(Tracked.scala:253)
        at sbt.FileFunction$$anonfun$cached$1.apply(Tracked.scala:253)
        at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:267)
        at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:263)
        at sbt.Difference.apply(Tracked.scala:224)
        at sbt.Difference.apply(Tracked.scala:206)
        at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:263)
        at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:262)
        at sbt.Difference.apply(Tracked.scala:224)
        at sbt.Difference.apply(Tracked.scala:200)
        at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:262)
        at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:260)
        at sbtavrohugger.formats.specific.SpecificGeneratorTask$$anonfun$specificCaseClassGeneratorTask$1.apply(SpecificGeneratorTask.scala:45)
        at sbtavrohugger.formats.specific.SpecificGeneratorTask$$anonfun$specificCaseClassGeneratorTask$1.apply(SpecificGeneratorTask.scala:37)
        at scala.Function8$$anonfun$tupled$1.apply(Function8.scala:35)
        at scala.Function8$$anonfun$tupled$1.apply(Function8.scala:34)
        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
        at sbt.std.Transform$$anon$4.work(System.scala:63)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
        at sbt.Execute.work(Execute.scala:237)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)
[error] (models-scala/avro:generateSpecific) java.util.NoSuchElementException: key not found: avro/ProfileIndexerProtocol.avdl```

@mariussoutier
Copy link
Contributor

Still broken in 0.16.0.

@rspurgeon
Copy link

I'm encountering this in 2.0.0-RC10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants