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

Automatically register muSrcGen as a sourceGenerator #813

Merged
merged 2 commits into from
Mar 2, 2020

Conversation

cb372
Copy link
Member

@cb372 cb372 commented Mar 2, 2020

I'm working on the documentation at the moment, and noticed this while I was going through a tutorial.

It doesn't really make sense not to add the task to the list of sourceGenerators, as the list of generated source files would not be added to managedSources. That means even if you ran muSrcGen manually and then ran compile, the generated source files would not be compiled.

Updated the plugin to automatically register the muSrcGen task as a sourceGenerator, and updated the misleading guidance in the documentation.

What this does?

Changes, features, fixes ...

Checklist

  • Reviewed the diff to look for typos, println and format errors.
  • Updated the docs accordingly.

It doesn't really make sense *not* to add the task to the list of
sourceGenerators, as the list of generated source files would not be
added to `managedSources`. That means even if you ran `muSrcGen`
manually and then ran `compile`, the generated source files would not be
compiled.

Updated the plugin to automatically register the `muSrcGen` task as a
sourceGenerator, and updated the misleading guidance in the
documentation.
Copy link
Member

@BenFradet BenFradet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though it seems the generated files don't compile: https://travis-ci.org/higherkindness/mu-scala/jobs/657341311#L936

@cb372
Copy link
Member Author

cb372 commented Mar 2, 2020

@BenFradet Yes, the tests have started failing now that they are actually testing something 😄 I'll fix them.

A lot of them were not really testing anything. They were running
`compile`, but that task wasn't compiling any files so it was trivially
succeeding.

Others just needed some tidy-up because they hadn't been touched for a
long time.
@codecov
Copy link

codecov bot commented Mar 2, 2020

Codecov Report

Merging #813 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #813   +/-   ##
=======================================
  Coverage   71.75%   71.75%           
=======================================
  Files          69       69           
  Lines        1048     1048           
  Branches       13       13           
=======================================
  Hits          752      752           
  Misses        296      296

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 85b5ab0...57787d2. Read the comment docs.

@cb372 cb372 merged commit 9495fc2 into master Mar 2, 2020
@cb372 cb372 deleted the add-source-generator branch March 2, 2020 19:45
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

Successfully merging this pull request may close these issues.

3 participants