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
Symbol.docString not available in tests #20106
Comments
What is the definition of |
Added. Getting docstring of Complete project is linked in the issue, as well as the workflow output demonstrating the failure. |
It seems that we are not loading the docstrings from TASTy. This can be enabled with |
Glad to hear you are making progress on this. What is the difference between loading main and test docstrings from test? Because main from main works, as well as test from test. Are they read from other place than TASTy in such case? |
Now we are always able to load docstings from TASTy, even if `-Yread-docs` is not set. The `-Yread-docs` flag loads the doc strings eagerly, as it did before. Fixes scala#20106
Now we are always able to load docstings from TASTy, even if `-Yread-docs` is not set. The `-Yread-docs` flag loads the doc strings eagerly, as it did before. Fixes scala#20106
Now we are always able to load docstings from TASTy, even if `-Yread-docs` is not set. The `-Yread-docs` flag loads the doc strings eagerly, as it did before. Fixes scala#20106
Now we are always able to load docstings from TASTy, even if `-Yread-docs` is not set. The `-Yread-docs` flag loads the doc strings eagerly, as it did before. Fixes scala#20106
In that case, they come directly from the parsed source file. You may also be missing the documentation if there is an incremental compilation and part of the files are related from TASTy from the previous compilation. |
Using Symbol.docstring from tests to inspect types defined in main always returns
None
.Compiler version
3.3.3
3.4.1
Minimized code
https://github.com/OndrejSpanel/Scala3-DocStringInTest
main:
test:
Use
Test/run
to run the code.Output
Workflow output:
Note: while test can access values of
docstring
defined in test. it cannot access anydocstring
defined in main, it always getsNone
.Expectation
The
docstring
values of symbols defined in the main should be available from tests.The text was updated successfully, but these errors were encountered: