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

Cannot polyglot java import innerclasses and use them in type signatures #6678

Closed
JaroslavTulach opened this issue May 13, 2023 · 5 comments · Fixed by #6818
Closed

Cannot polyglot java import innerclasses and use them in type signatures #6678

JaroslavTulach opened this issue May 13, 2023 · 5 comments · Fixed by #6818
Assignees
Labels
Milestone

Comments

@JaroslavTulach
Copy link
Member

JaroslavTulach commented May 13, 2023

We had to mitigate 74c6f99 as one cannot:

  • import inner class d434ec5
  • import outer class and reference inner class
  • importing Outer$Inner yields an Enso compiler problem.

The d434ec5 commit was:

enso$ git show d434ec5963b637c5f0f1131c33cfd85f19681921
commit d434ec5963b637c5f0f1131c33cfd85f19681921
Author: Jaroslav Tulach <[email protected]>
Date:   Sat May 13 07:45:54 2023 +0200

    Importing HeaderBehavior innerclass directly

diff --git distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Excel_Reader.enso distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Excel_Reader.enso
index 61a74c22ef..69f338adfc 100644
--- distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Excel_Reader.enso
+++ distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Excel_Reader.enso
@@ -10,6 +10,7 @@ import project.Excel.Excel_Section.Excel_Section
 from project.Errors import Invalid_Location, Duplicate_Output_Column_Names, Invalid_Output_Column_Names, Empty_Sheet_Error
 
 polyglot java import org.enso.table.excel.ExcelHeaders
+polyglot java import org.enso.table.excel.ExcelHeaders.HeaderBehavior
 polyglot java import org.enso.table.read.ExcelReader
 polyglot java import org.enso.table.error.InvalidLocationException
 
@@ -30,7 +31,7 @@ prepare_reader_table on_problems result_with_problems =
 
 ## PRIVATE
    Convert Boolean|Infer to the correct HeaderBehavior
-make_java_headers : (Boolean | Infer) -> ExcelHeaders.HeaderBehavior
+make_java_headers : (Boolean | Infer) -> HeaderBehavior
 make_java_headers headers = case headers of
         True -> ExcelHeaders.HeaderBehavior.USE_FIRST_ROW_AS_HEADERS
         Infer -> ExcelHeaders.HeaderBehavior.INFER
@JaroslavTulach JaroslavTulach moved this from ❓New to 📤 Backlog in Issues Board May 13, 2023
@jdunkerley jdunkerley moved this from 📤 Backlog to ❓New in Issues Board May 16, 2023
@jdunkerley jdunkerley moved this from ❓New to 📤 Backlog in Issues Board May 23, 2023
@jdunkerley jdunkerley added this to the Beta Release milestone May 23, 2023
@Akirathan Akirathan moved this from 📤 Backlog to ⚙️ Design in Issues Board May 23, 2023
@Akirathan Akirathan linked a pull request May 23, 2023 that will close this issue
5 tasks
@Akirathan Akirathan moved this from ⚙️ Design to 🔧 Implementation in Issues Board May 25, 2023
@enso-bot
Copy link

enso-bot bot commented May 25, 2023

Pavel Marek reports a new STANDUP for yesterday (2023-05-24):

Progress: - I probably blocked the CI after upgrading to GraalVM, looking into that

  • Cannot run clean action.
  • Troubleshooting native image build on our public Discord channel
  • Imports/exports discussion
  • Playing around with proper importing of inner classes inside IrToTruffle. It should be finished by 2023-05-30.

@enso-bot
Copy link

enso-bot bot commented May 25, 2023

Pavel Marek reports a new STANDUP for today (2023-05-25):

Progress: - Reviews of other PRs

  • Discussion about how to test inter-library dependencies
  • Making this PR ready for review It should be finished by 2023-05-30.

@enso-bot
Copy link

enso-bot bot commented May 26, 2023

Pavel Marek reports a new STANDUP for today (2023-05-26):

Progress: - Moved the functionality into EnsoContext and use it for looking up any Java (host) classes. It should be finished by 2023-05-30.

@enso-bot
Copy link

enso-bot bot commented May 29, 2023

Pavel Marek reports a new STANDUP for today (2023-05-29):

Progress: - Resolving problems with native-image build

  • Removing deprecated --initialize-at-buildtime= option.
  • On this PR, sun.awt.X11.XSelection.<clinit> method is called from native image build time, and I have no idea why.
    • This method is not included in native image build time on develop.
  • native-image does not permit scala.collection classes to be initialized at build time?
  • Building substratevm from sources so that I can debug the native-image build process.
  • Trying to add as much classes to --initialize-at-buildtime as possible.
  • Created Remove deprecated options from native-image #6879 It should be finished by 2023-05-30.

@JaroslavTulach JaroslavTulach moved this from 🔧 Implementation to 👁️ Code review in Issues Board May 30, 2023
@enso-bot
Copy link

enso-bot bot commented May 30, 2023

Pavel Marek reports a new STANDUP for today (2023-05-30):

Progress: - Testing native image on both develop and my PR - everything seems fine It should be finished by 2023-05-30.

@github-project-automation github-project-automation bot moved this from 👁️ Code review to 🟢 Accepted in Issues Board May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants