Skip to content

Conversation

@BoD
Copy link
Contributor

@BoD BoD commented Oct 17, 2025

The IJ plugin calls these methods - adding new keys shouldn't break it.

@BoD BoD requested a review from martinbonnin as a code owner October 17, 2025 16:57
@apollo-librarian
Copy link

apollo-librarian bot commented Oct 17, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: 326420814ab2172bbb19fbf8
Build Logs: View logs

@martinbonnin
Copy link
Contributor

When does that happen?
In theory, this is called to parse the intermediate artifacts of the compiler. If every intermediate is built using the same compiler version, it should all be consistent. Or is there another case there?

@BoD
Copy link
Contributor Author

BoD commented Oct 20, 2025

When does that happen?

The IJ plugin also reads these files to know which options are used, for telemetry.

@martinbonnin
Copy link
Contributor

Sure but looks like it's reading them through apollo-compiler itself? So the IJ plugins links with a version of apollo-compiler that is not the same as the one that is run to generate the files? I thought there was something to get the version of the compiler and then download the jar on demand or something like this?

@BoD
Copy link
Contributor Author

BoD commented Oct 20, 2025

Sure but looks like it's reading them through apollo-compiler itself? So the IJ plugins links with a version of apollo-compiler that is not the same as the one that is run to generate the files? I thought there was something to get the version of the compiler and then download the jar on demand or something like this?

Yeah the compiler links with apollo-compiler and uses that to read these files. The mechanism to dynamically load the project's version is used to invoke the compiler but not to read these files, which happens earlier when opening the project. Maybe we could do that but I'm not actually sure since, to get the project's JAR paths, we need to read some of these files 😅.
For something simpler I could also duplicate these toXyz() methods in the plugin, which would reduce the coupling further.

@martinbonnin
Copy link
Contributor

Do you need to link with apollo-compiler for anything else? If not, I'd recommend duplicating that logic to be more lenient on the IDE side. From a compiler point of view, I don't really want to start thinking about intermediate results generated by different versions.

@BoD
Copy link
Contributor Author

BoD commented Oct 20, 2025

Do you need to link with apollo-compiler for anything else?

I'm still using EntryPoints and all the symbols it needs (at runtime it's the version of the project, not the linked version).

But for reading the files yeah I can duplicate the logic and be lenient, that sounds safer 👍

@martinbonnin
Copy link
Contributor

Right. Entrypoints is "safer" because it all goes through opaque Files what's inside those Files is a compiler implementation detail.

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