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

Improving module loader error messages #1501

Conversation

blast-hardcheese
Copy link
Member

  • Track individual module component extractors
  • Accumulate consumed and missed modules
  • Roll that stuff up into useful errors

This is a pretty big change over how the loaders previously worked, the ergonomics aren't great currently right now, but tracking in parallel (applicative-style) gives us this reporting capability.

@github-actions github-actions bot added core Pertains to guardrail-core java-async-http Pertains to guardrail-java-async-http java-dropwizard Pertains to guardrail-java-dropwizard java-spring-mvc Pertains to guardrail-java-spring-mvc java-support Pertains to guardrail-java-support scala-akka-http Pertains to guardrail-scala-akka-http scala-dropwizard Pertains to guardrail-scala-dropwizard scala-http4s Pertains to guardrail-scala-http4s scala-support Pertains to guardrail-scala-support labels May 30, 2022
@blast-hardcheese blast-hardcheese force-pushed the better-module-error-messages branch from e7b67d4 to a4def07 Compare June 6, 2022 04:16
@blast-hardcheese blast-hardcheese added the minor Bump minor version label Jun 6, 2022
@blast-hardcheese blast-hardcheese force-pushed the better-module-error-messages branch from a4def07 to 0942363 Compare June 13, 2022 20:52
@blast-hardcheese blast-hardcheese force-pushed the better-module-error-messages branch from 0942363 to ba16c79 Compare June 22, 2022 06:39
@blast-hardcheese
Copy link
Member Author

Alright. This should resolve the usability regression brought on in #1414, where --module scala-language and --module scala-stdlib were required to be added despite being the only possible options.

@codecov
Copy link

codecov bot commented Jun 22, 2022

Codecov Report

Merging #1501 (3f95d10) into master (e0d182f) will increase coverage by 0.10%.
The diff coverage is 89.10%.

@@            Coverage Diff             @@
##           master    #1501      +/-   ##
==========================================
+ Coverage   84.21%   84.32%   +0.10%     
==========================================
  Files          92       93       +1     
  Lines        5569     5613      +44     
  Branches      153      159       +6     
==========================================
+ Hits         4690     4733      +43     
- Misses        879      880       +1     
Impacted Files Coverage Δ
modules/microsite/src/main/scala/DocsHelpers.scala 0.00% <0.00%> (ø)
...ev/guardrail/generators/spi/ModuleLoadResult.scala 70.45% <70.45%> (ø)
...dev/guardrail/generators/spi/FrameworkLoader.scala 89.47% <89.47%> (+6.14%) ⬆️
.../dev/guardrail/generators/spi/AbstractLoader.scala 100.00% <100.00%> (ø)
...ardrail/generators/spi/ClientGeneratorLoader.scala 100.00% <100.00%> (+100.00%) ⬆️
...il/generators/spi/CollectionsGeneratorLoader.scala 100.00% <100.00%> (+100.00%) ⬆️
...rail/generators/spi/FrameworkGeneratorLoader.scala 100.00% <100.00%> (+100.00%) ⬆️
.../dev/guardrail/generators/spi/LanguageLoader.scala 100.00% <100.00%> (+100.00%) ⬆️
.../guardrail/generators/spi/ModuleMapperLoader.scala 100.00% <100.00%> (ø)
...drail/generators/spi/ProtocolGeneratorLoader.scala 100.00% <100.00%> (+100.00%) ⬆️
... and 32 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0d182f...3f95d10. Read the comment docs.

@blast-hardcheese blast-hardcheese force-pushed the better-module-error-messages branch from 0f4ed70 to 2216df7 Compare June 22, 2022 19:41
@blast-hardcheese blast-hardcheese merged commit ead17ca into guardrail-dev:master Jun 22, 2022
@blast-hardcheese blast-hardcheese deleted the better-module-error-messages branch June 22, 2022 20:14
@blast-hardcheese blast-hardcheese added the enhancement Functionality that has never existed in guardrail label Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Pertains to guardrail-core enhancement Functionality that has never existed in guardrail java-async-http Pertains to guardrail-java-async-http java-dropwizard Pertains to guardrail-java-dropwizard java-spring-mvc Pertains to guardrail-java-spring-mvc java-support Pertains to guardrail-java-support minor Bump minor version scala-akka-http Pertains to guardrail-scala-akka-http scala-dropwizard Pertains to guardrail-scala-dropwizard scala-http4s Pertains to guardrail-scala-http4s scala-support Pertains to guardrail-scala-support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant