Skip to content

Improve handling of java files in repl #960

Description

@jneira

Follow up of #805 (fixed with #905)

Although the repl is able to load java object files the handling could be improved:

  • Allow reload of .java, .class and .jar files
    • Actually .java and .class are compiled in a auto generated __extra.jar
    • The jar files are being locked by eta (it should be unlocked after create and use it) and cant be changed
    • But likely the eta-serv classloader will not see the updated jars
    • The solution could be load directly the classes contained in those jars to use class reloading of eta-serv
      • Although it could be expensive for big jars
  • Load the classes of java files informed in params (i.e. the files listed in cabal java-sources) when initialize the dynamic linker: https://github.com/typelead/eta/blob/master/compiler/Eta/REPL/Linker.hs#L150-L172
    • It already loads the package jars
    • Avoid loading them in the first load but dont remove the feature of :load path/to/my.jar on the fly
  • In general, as rahulmut suggested in Error runing etlas repl in a project with java source files #805, try to not load java files that have not changed since last load.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions