Skip to content

Conversation

@Akirathan
Copy link
Member

@Akirathan Akirathan commented Nov 5, 2025

Part of #14115.

Continuation of #14217.

Blocks #14244.

Pull Request Description

Refactor org.enso.compiler.core.ir.module.scope.Definition Scala case class to Java.

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.

@Akirathan Akirathan self-assigned this Nov 5, 2025
@Akirathan Akirathan added CI: No changelog needed Do not require a changelog entry for this PR. CI: Clean build required CI runners will be cleaned before and after this PR is built. labels Nov 5, 2025
@Akirathan Akirathan mentioned this pull request Nov 5, 2025
5 tasks
@Akirathan Akirathan moved this to 🔧 Implementation in Issues Board Nov 5, 2025
if (isProcessingDefinitionType()) {
specialHandling.append(
"""
// Special case - name of Definition.Type is ignored.
Copy link
Member Author

Choose a reason for hiding this comment

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

This special handling needs to be there because the previous Defnition.Type.mapExpressions at https://github.com/enso-org/enso/pull/14252/files#diff-469ce9a70600d58340eae355c9c8a9557d84f08e0edbf53be06f3dd29fb33430L131-L134 ignored the name field.

moduleContext: ModuleContext
): Module = {
ir.copyWithBindings(bindings = ir.bindings.map(analyseModuleDefinition))
ir.copyWithBindings(ir.bindings.map(analyseModuleDefinition))
Copy link
Member Author

Choose a reason for hiding this comment

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

In these refactorings, I am removing named arguments when calling Java from Scala, because:

  • It sometimes causes compilation errors with weird messages.
  • IntelliJ always treats it as an error.
  • Despite the fact that runtime-parser is compiled with -parameters flag.

@Akirathan Akirathan marked this pull request as ready for review November 7, 2025 12:52
@Akirathan Akirathan requested a review from hubertp as a code owner November 7, 2025 12:52
@github-project-automation github-project-automation bot moved this from 🔧 Implementation to 🌟 Q/A review in Issues Board Nov 7, 2025
@Akirathan Akirathan mentioned this pull request Nov 7, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

-compiler CI: Clean build required CI runners will be cleaned before and after this PR is built. CI: No changelog needed Do not require a changelog entry for this PR.

Projects

Status: 🌟 Q/A review

Development

Successfully merging this pull request may close these issues.

3 participants