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

WIP: integrate sbt-doctest #1260

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft

WIP: integrate sbt-doctest #1260

wants to merge 3 commits into from

Conversation

neko-kai
Copy link
Member

@neko-kai neko-kai commented Oct 3, 2020

Current blocker:

  • sbt-doctest generates test files inside the current artifact's test scope, but e.g. code examples in distage-core-api forward-reference classes that are only available in distage-core and onward — they cannot compile in distage-core-api / test scope. Now, this parameter the directory to dump source files to is controlled by this line https://github.com/tkawachi/sbt-doctest/blob/master/src/main/scala/com/github/tkawachi/doctest/DoctestPlugin.scala#L103, if we provide an alternative definition for doctestGenTests that uses a different key instead of managedSourceDirectories in Test, we could override that key and dump the tests into a different directory (e.g. microsite - where all the libraries are available at the same time)

/cc @vpodlnk @VladPodilnyk - would you be interested in exploring this task?

@neko-kai neko-kai marked this pull request as draft October 3, 2020 17:16
@codecov-commenter
Copy link

codecov-commenter commented Oct 3, 2020

Codecov Report

Merging #1260 into develop will increase coverage by 0.01%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #1260      +/-   ##
===========================================
+ Coverage    53.92%   53.94%   +0.01%     
===========================================
  Files          431      431              
  Lines         8070     8070              
  Branches       365      365              
===========================================
+ Hits          4352     4353       +1     
+ Misses        3718     3717       -1     

@neko-kai
Copy link
Member Author

neko-kai commented Oct 3, 2020

distage-core-api/test

@VladPodilnyk
Copy link
Contributor

Current blocker:

* `sbt-doctest` generates test files inside the current artifact's test scope, but e.g. code examples in `distage-core-api` forward-reference classes that are only available in `distage-core` and onward — they cannot compile in `distage-core-api / test` scope. Now, this parameter the directory to dump source files to is controlled by this line https://github.com/tkawachi/sbt-doctest/blob/master/src/main/scala/com/github/tkawachi/doctest/DoctestPlugin.scala#L103, if we provide an alternative definition for `doctestGenTests` that uses a different key instead of `managedSourceDirectories in Test`, we could override that key and dump the tests into a different directory (e.g. `microsite` - where all the libraries are available at the same time)

/cc @vpodlnk @VladPodilnyk - would you be interested in exploring this task?

Jeez, I'm so sorry, somehow, I've just missed a notification about this 🤦 . I didn't ignore this, just missed it out, sorry.
Super late answer, but I thought it won't be polite if I leave it like it is.

@neko-kai
Copy link
Member Author

@VladPodilnyk no worries!

@pshirshov pshirshov force-pushed the develop branch 2 times, most recently from be4d382 to 6dda1f0 Compare February 1, 2023 19:22
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.

None yet

3 participants