Skip to content

Conversation

@bracevac
Copy link
Contributor

@bracevac bracevac commented Nov 28, 2025

Filter out -sourcepath from doc scalacOptions as it causes conflicts
with symbols loaded from tasty during documentation generation.

Fixes #24434

@bracevac bracevac changed the title Skip capture checking when compiling from tasty Fix documentation generation from tasty with sourcepath Nov 28, 2025
@bracevac bracevac force-pushed the ob-fix-24434 branch 2 times, most recently from b57b358 to 77f0489 Compare November 28, 2025 09:32
@hamzaremmal
Copy link
Member

hamzaremmal commented Nov 28, 2025

Capture checking was re-running on already capture-checked code from tasty,
causing spurious errors. Now ccEnabled and ccEnabledSomewhere return
false when -from-tasty is set.

We don't run cc when we compile -from-tasty. I was exactly trying to fix it in #24520. I had my doubts that something that had to do with the way we load symbols might be the issue for why that PR is not passing at the moment.
Edit: the issue about CC and -from-tasty is #24519.


/** Is captureChecking enabled for any of the currently compiled compilation units? */
/** Is captureChecking enabled for any of the currently compiled compilation units?
* Disabled when compiling from tasty since capture checking was already performed.
Copy link
Member

Choose a reason for hiding this comment

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

There are some non-standard ways of stopping the compiler after emitting TASTy and before performing capture checking. This is then factually false.

@bracevac
Copy link
Contributor Author

It's something else that causes the issue.

@bracevac bracevac closed this Nov 28, 2025
Filter out -sourcepath from doc scalacOptions as it causes conflicts
with symbols loaded from tasty during documentation generation.
@bracevac
Copy link
Contributor Author

Hamza beat me to it

@bracevac bracevac closed this Nov 28, 2025
@hamzaremmal hamzaremmal deleted the ob-fix-24434 branch November 28, 2025 11:21
hamzaremmal added a commit that referenced this pull request Nov 28, 2025
Based on @bracevac remarks here
#24434 (comment)

We do not need to add `-sourcepath` when generating the scaladoc since
compiling with `-from-tasty` (what scaladoc does) will put the TASTy in
the classpath. This means that the compiler will be happy and will find
the symbols.

Closes #24434
Supersedes #24569, #24510.

Thanks Oliver for taking the time to analyze the issue in depth.
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.

Crash when building scala-library docs

2 participants