SlideShare une entreprise Scribd logo
1  sur  30
Télécharger pour lire hors ligne
The Scala IDE for Eclipse
Retrospect and Prospect for 2.8.0




              Miles Sabin, Chuusai Ltd.
               http://www.chuusai.com/
Outline
●
    History
●
    Current Development
●
    Roadmap for 2.8 Preview
●
    Roadmap for 2.8 Final
●
    How to Help
●
    Roadmap Beyond 2.8 Final
●
    Speeding up Development
History 1
●
    Started very early on in Scala's timeline
    (early 2005)
●
    Very simple IDE plugin
●
    Little functionality beyond basic syntax
    highlighting and build invocation
●
    Written in Java
●
    There was a least one other similar offering
    at the time: Scaliptor
History 2
●
    Announced December 2005, first release
    February 2006 (2.1.0)
●
    Rewritten in Scala
●
    Some semantic features acquired (eg.
    limited auto-completion)
●
    Even at this early stage requests for the
    ability to mix Java and Scala and JDT
    interop were coming in
History 3
●
    Announced June 2007, first release
    February 2008
●
    Attempted much deeper integration with
    the Scala compiler,
    ●
        Interactive error reporting
    ●
        Semantic highlighting
    ●
        Incremental compilation
    ●
        Dependency management
●
    Many hooks added to scalac
History 4
●
    Start of my involvement (May 2008)
●
    Prompted by very generous sponsorship by
    EDF Trading
●
    Primary goals
    ●
        Ease Java/Scala migation
        –   Mixed Scala/Java compilation in scalac
        –   Mixed Scala/Java projects in Eclipse
    ●
        Improved Eclipse stability and release process
History 4
●
    First commit to trunk in July 2008
●
    Results of the work first visible in
    2.7.2.RC1 in August 2008
●
    Final 2.7.2 release in November
●
    Goals somewhat met,
    ●
        Mixed Scala/Java enabled in scalac and Eclipse
    ●
        Release process dramatically improved
    ●
        However JDT integration limited and stability
        issues remain
History 5
●
    Serious roadblocks to JDT integration
●
    2.7.3 contained only very minor bugfixes
    and enhancements
●
    Long standing patch to open up the JDT for
    extension updated but rejected
●
    AspectJ and Equinox Aspects provided a
    Plan B
History 5
●
    JDT Roadblocks removed enabling rapid
    progress,
    ●
        Many bugs fixed
    ●
        Many features enhanced
●
    First appeared in 2.7.4 in April 2009
●
    Some drawbacks however,
    ●
        Some installation issues
    ●
        Some JDT features magically started to almost
        work
History 6
●
    Solution to preceeding: full speed ahead on
    JDT integration, recruit contributors
●
    However, much of the codebase complex
    over-abstracted and forbidding
    ●
        Learning curve too steep for casual contribs
    ●
        Fragility in presentation compiler
        –   Spurious pink squigglies, minor errors destroy all
            highlighting, unreliable dependency management
    ●
        Negative effect on scalac
        –   Many fragile “if (inIDE) ...” blocks
History 6
●
    Complete reimplementation of all semantic
    and build related features
●
    Work done in collaboration with Martin
    Odersky and Iulian Dragos at EPFL in May
History 6
●
    New interactive compiler
    ●
        Completely replaces old presentation compiler
    ●
        Now the unit of (re)compilation is a whole
        source file.
        –   Performance is on a par if not better than before,
            old approach a “premature optimization”
    ●
        All “inIDE” conditions removed from scalac
    ●
        Accurate position information to AST nodes
        –   Enables new features (folding)
        –   Supports new tools (refactoring, formatting)
History 6
●
    New incremental build manager
●
    Far more reliable than previous Eclipse-
    specific code
●
    Makes use of scalac's filesystem
    abstraction enabling,
    ●
        Use by other IDEs
    ●
        Use by other tools (eg. refactoring)
●
    Supports all JDT build path features
    ●
        Multiple source and output directories
History 6
●
    Drawbacks
    ●
        Big bang ... there's no going back,
        –   All support for previous integration has been
            removed from scalac
        –   All semantic features in Eclipse have to be reworked
        –   No feasible backport of new features or bugfixes to
            2.7.x branch
    ●
        This is in stark contrast to the incremental
        improvement policy I had intended to adopt
        from 2.7.2 onwards.
Current Development
●
    The new build manager has been fully
    integrated. “clean build, open/close hell” is
    largely a thing of the past
●
    Previously project-specific compiler
    instances were inextricably linked to the
    project itself, so “rebooting” the compiler
    required the project to closed and opened
●
    Now fully decoupled and compiler is
    reinstantiated on a clean
Current Development
●
    Removing the old presentation compiler
    has had some direct benefits,
    ●
        The Scala editor is now effectively identical to
        the Java editor
        –   This gives us features for free: comment and code
            folding
    ●
        New lightweight syntax highlighting based on
        the JDT's for Java
        –   Driven by a low-level source scanner, so very robust
            in the face of syntax and semantic errors
Current Development
●
    Hyperlink navigation (“Jump to definition”)
    close to completion
    ●
        Completely new implementation based on the
        JDT's mechanisms
    ●
        Scala source code selections mapped to Scala
        AST nodes and Eclipse JDT model handles
    ●
        Some “re-sugaring” required to map AST nodes
        to appropriate JDT construct
    ●
        Supports “Jump to implementation” is many
        cases
Current Development
●
    The underlying mechanism supports
    additional JDT features,
    ●
        Javadoc hovers
    ●
        Source hovers
    ●
        Java search actions (eg. find references)
●
    Currently this is only fully functional for
    Java symbols appearing in Scala source
    ●
        Aiming to have this uniform across Scala and
        Java before release
Current Development
●
    Reusing the JDTs navigation required the
    extension of AST mapping to binaries (eg.
    class files in the Scala standard library Jars)
    ●
        Currently only supported for binaries with
        source attachments
●
    This provides dramatic improvement in
    navigability for the standard library
    ●
        Library components now open in Scala editor
    ●
        Outline view and outlines in package explorer
        now available
Current Development
●
    The full mapping of Scala source and
    binary components enables comprehensive
    JDT-wide indexing of Scala elements
    ●
        The JDT indexer now understands Scala traits
        and objects
    ●
        Indexing supports uniform “Open Type”
        behaviour across Scala and Java projects
    ●
        Supports “Find references” to both Scala & Java
        in both Scala & Java sources
        –   Still work in progress, but already useful
Current Development
●
    The new presentation compiler is much
    more reliable
    ●
        No longer used for syntax highlighting, so
        doesn't have to run synchronous with
        keystrokes and whole CU update is fast enough
●
    Currently supports,
    ●
        Error reporting as-you-type
    ●
        Live outline update in the outline view and the
        package explorer
    ●
        Code completion (work in progress)
Roadmap for 2.8 Preview
●
    Completion of all in-progress major
    features
●
    Reinstatement of semantic highlighting
●
    Support for Eclipse tasks framework
●
    Resolution of most Trac bugs,
    ●
        REPL issues on Windows and Mac OS X)
●
    Fit and finish.
    ●
        Disabling of partially functional JDT features
Roadmap for 2.8 Preview
●
    Notable absences,
    ●
        Refactoring
        –   Organize imports
        –   Rename/move element
    ●
        Code formatting
●
    New work by Mirko Stoker would make any
    effort here redundant
●
    The aim is to integrate his work before
    2.8.0 final, but impossible to make a
    commitment at this point
How to Help
●
    A call for testers will go out once trunk is
    feature complete (sometime in the next few
    weeks)
●
    At that point please kick the tires of nightly
    builds, report bugs and partial features
    which are candidates for suppression
●
    Review (and hopefully close) old bugs
    which have be fixed as side-effects of
    other work
Roadmap for 2.8 Final
●
    Integrate the basic refactorings if they're
    ready.
●
    Focus on testing and stability
    ●
        Other than refactoring, there will be no
        additional features beyond those already
        planned for the preview release
Roadmap Beyond 2.8 Final
●
    Minor features, more of the same
    ●
        Additional semantic annotations
        –   Markers/hovers for in-scope and applied implicits
    ●
        More refactorings and formatter options
        –   IDE independent API lowers the barrier to entry for
            external contributors, effort shared across tools
    ●
        Support for binary elements without source
    ●
        Maven support (eg. M2eclipse)
    ●
        Gradual re-enabling of suppressed JDT
        features
Roadmap Beyond 2.8 Final
●
    Major features
    ●
        Support for Scala-specific tools
        –   Lift-specific tooling – “New Lift project”
    ●
        Paul Phillips Scalify
        –   “Refactor” from Java to Scala
    ●
        Debugger enhancements
        –   Execution of Scala fragments, value hovers
    ●
        New REPL features
        –   Support for Paul Phillips new completion behaviour
        –   Semantic highlighting
Roadmap Beyond 2.8 Final
●
    Compatibility with other common Eclipse
    extensions,
    ●
        Google App Engine
    ●
        Android
    ●
        AJDT and STS
    ●
        Other JVM languages which take a similar
        approach to the JDT: Groovy, JavaFX
●
    We need a compatibility matrix for Eclipse
    extensions – will need community help
Speeding up Development
●
    Contribute
    ●
        Code
    ●
        Bug reports
    ●
        End-user and developer documentation
    ●
        Howtos and experience reports
●
    Help build a user community based on
    constructive criticism
    ●
        Contributors encouraged by positive vibe
●
    Sponsorship
The Scala IDE for Eclipse
Retrospect and Prospect for 2.8.0




              Miles Sabin, Chuusai Ltd.
               http://www.chuusai.com/

Contenu connexe

Tendances

Tendances (20)

Contributing to JDK Mission Control
Contributing to JDK Mission ControlContributing to JDK Mission Control
Contributing to JDK Mission Control
 
Java 9 Modularity and Project Jigsaw
Java 9 Modularity and Project JigsawJava 9 Modularity and Project Jigsaw
Java 9 Modularity and Project Jigsaw
 
Java modularity: life after Java 9
Java modularity: life after Java 9Java modularity: life after Java 9
Java modularity: life after Java 9
 
EclipseLink JPA
EclipseLink JPAEclipseLink JPA
EclipseLink JPA
 
AAI 2235-OpenJPA and EclipseLink Usage Scenarios Explained
AAI 2235-OpenJPA and EclipseLink Usage Scenarios ExplainedAAI 2235-OpenJPA and EclipseLink Usage Scenarios Explained
AAI 2235-OpenJPA and EclipseLink Usage Scenarios Explained
 
InterConnect 2016, OpenJPA and EclipseLink Usage Scenarios (PEJ-5303)
InterConnect 2016, OpenJPA and EclipseLink Usage Scenarios (PEJ-5303)InterConnect 2016, OpenJPA and EclipseLink Usage Scenarios (PEJ-5303)
InterConnect 2016, OpenJPA and EclipseLink Usage Scenarios (PEJ-5303)
 
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
 
Java 9 preview
Java 9 previewJava 9 preview
Java 9 preview
 
Oracle soa 10g to 11g migration
Oracle soa 10g to 11g migrationOracle soa 10g to 11g migration
Oracle soa 10g to 11g migration
 
Database Migrations with Gradle and Liquibase
Database Migrations with Gradle and LiquibaseDatabase Migrations with Gradle and Liquibase
Database Migrations with Gradle and Liquibase
 
Upgrading Oracle SOA Suite 10g to 11g (whitepaper)
Upgrading Oracle SOA Suite 10g to 11g (whitepaper)Upgrading Oracle SOA Suite 10g to 11g (whitepaper)
Upgrading Oracle SOA Suite 10g to 11g (whitepaper)
 
JDK-9: Modules and Java Linker
JDK-9: Modules and Java LinkerJDK-9: Modules and Java Linker
JDK-9: Modules and Java Linker
 
Java modules using project jigsaw@jdk 9
Java modules using project jigsaw@jdk 9Java modules using project jigsaw@jdk 9
Java modules using project jigsaw@jdk 9
 
Multiplatform Apps with Spring, Kotlin, and RSocket
Multiplatform Apps with Spring, Kotlin, and RSocketMultiplatform Apps with Spring, Kotlin, and RSocket
Multiplatform Apps with Spring, Kotlin, and RSocket
 
Effective Spring on Kubernetes
Effective Spring on KubernetesEffective Spring on Kubernetes
Effective Spring on Kubernetes
 
Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)Why jakarta ee matters (ConFoo 2021)
Why jakarta ee matters (ConFoo 2021)
 
A Tour of the Modern Java Platform
A Tour of the Modern Java PlatformA Tour of the Modern Java Platform
A Tour of the Modern Java Platform
 
Java Technology Trends
Java Technology TrendsJava Technology Trends
Java Technology Trends
 
Java Desktop 2019
Java Desktop 2019Java Desktop 2019
Java Desktop 2019
 
Java Is Still Free
Java Is Still FreeJava Is Still Free
Java Is Still Free
 

En vedette

Idbi, then and now
Idbi, then and nowIdbi, then and now
Idbi, then and now
indsumo
 

En vedette (8)

india
indiaindia
india
 
Retrospect, Intropect and Prospect of Iluvislam.com website in disseminating ...
Retrospect, Intropect and Prospect of Iluvislam.com website in disseminating ...Retrospect, Intropect and Prospect of Iluvislam.com website in disseminating ...
Retrospect, Intropect and Prospect of Iluvislam.com website in disseminating ...
 
Idbi, then and now
Idbi, then and nowIdbi, then and now
Idbi, then and now
 
Development bank
Development bankDevelopment bank
Development bank
 
Developmental banks
Developmental banksDevelopmental banks
Developmental banks
 
IDBI
IDBIIDBI
IDBI
 
DEVELOPMENT BANKS
DEVELOPMENT BANKSDEVELOPMENT BANKS
DEVELOPMENT BANKS
 
Financial institutions
Financial institutions Financial institutions
Financial institutions
 

Similaire à The Scala IDE for Eclipse - Retrospect and Prospect for 2.8.0

Counterclockwise past present future
Counterclockwise  past present futureCounterclockwise  past present future
Counterclockwise past present future
lolopetit
 
Gradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypesGradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypes
Strannik_2013
 
Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"
Provectus
 

Similaire à The Scala IDE for Eclipse - Retrospect and Prospect for 2.8.0 (20)

Scala Support in Eclipse - Monkey-patching the JDT for fun and profit?
Scala Support in Eclipse - Monkey-patching the JDT for fun and profit?Scala Support in Eclipse - Monkey-patching the JDT for fun and profit?
Scala Support in Eclipse - Monkey-patching the JDT for fun and profit?
 
Voxxed Athens 2018 - Java EE is dead Long live jakarta EE!
Voxxed Athens 2018 - Java EE is dead Long live jakarta EE!Voxxed Athens 2018 - Java EE is dead Long live jakarta EE!
Voxxed Athens 2018 - Java EE is dead Long live jakarta EE!
 
Counterclockwise past present future
Counterclockwise  past present futureCounterclockwise  past present future
Counterclockwise past present future
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
What's coming in Airflow 2.0? - NYC Apache Airflow Meetup
What's coming in Airflow 2.0? - NYC Apache Airflow MeetupWhat's coming in Airflow 2.0? - NYC Apache Airflow Meetup
What's coming in Airflow 2.0? - NYC Apache Airflow Meetup
 
How to keep maintainability of long life Scala applications
How to keep maintainability of long life Scala applicationsHow to keep maintainability of long life Scala applications
How to keep maintainability of long life Scala applications
 
A Journey through the JDKs (Java 9 to Java 11)
A Journey through the JDKs (Java 9 to Java 11)A Journey through the JDKs (Java 9 to Java 11)
A Journey through the JDKs (Java 9 to Java 11)
 
GitBucket: Open source self-hosting Git server built by Scala
GitBucket: Open source self-hosting Git server built by ScalaGitBucket: Open source self-hosting Git server built by Scala
GitBucket: Open source self-hosting Git server built by Scala
 
Tips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTips For Maintaining OSS Projects
Tips For Maintaining OSS Projects
 
From Spring Framework 5.3 to 6.0
From Spring Framework 5.3 to 6.0From Spring Framework 5.3 to 6.0
From Spring Framework 5.3 to 6.0
 
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
 
Gradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypesGradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypes
 
Migrating to Spark 2.0 - Part 2
Migrating to Spark 2.0 - Part 2Migrating to Spark 2.0 - Part 2
Migrating to Spark 2.0 - Part 2
 
Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)
 
Java 9 and Beyond
Java 9 and BeyondJava 9 and Beyond
Java 9 and Beyond
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with server
 
Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"Сергей Моренец: "Gradle. Write once, build everywhere"
Сергей Моренец: "Gradle. Write once, build everywhere"
 
Stripe con 2021 UI stack
Stripe con 2021 UI stackStripe con 2021 UI stack
Stripe con 2021 UI stack
 
Scala and Play with Gradle
Scala and Play with GradleScala and Play with Gradle
Scala and Play with Gradle
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Dernier (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

The Scala IDE for Eclipse - Retrospect and Prospect for 2.8.0

  • 1. The Scala IDE for Eclipse Retrospect and Prospect for 2.8.0 Miles Sabin, Chuusai Ltd. http://www.chuusai.com/
  • 2. Outline ● History ● Current Development ● Roadmap for 2.8 Preview ● Roadmap for 2.8 Final ● How to Help ● Roadmap Beyond 2.8 Final ● Speeding up Development
  • 3. History 1 ● Started very early on in Scala's timeline (early 2005) ● Very simple IDE plugin ● Little functionality beyond basic syntax highlighting and build invocation ● Written in Java ● There was a least one other similar offering at the time: Scaliptor
  • 4. History 2 ● Announced December 2005, first release February 2006 (2.1.0) ● Rewritten in Scala ● Some semantic features acquired (eg. limited auto-completion) ● Even at this early stage requests for the ability to mix Java and Scala and JDT interop were coming in
  • 5. History 3 ● Announced June 2007, first release February 2008 ● Attempted much deeper integration with the Scala compiler, ● Interactive error reporting ● Semantic highlighting ● Incremental compilation ● Dependency management ● Many hooks added to scalac
  • 6. History 4 ● Start of my involvement (May 2008) ● Prompted by very generous sponsorship by EDF Trading ● Primary goals ● Ease Java/Scala migation – Mixed Scala/Java compilation in scalac – Mixed Scala/Java projects in Eclipse ● Improved Eclipse stability and release process
  • 7. History 4 ● First commit to trunk in July 2008 ● Results of the work first visible in 2.7.2.RC1 in August 2008 ● Final 2.7.2 release in November ● Goals somewhat met, ● Mixed Scala/Java enabled in scalac and Eclipse ● Release process dramatically improved ● However JDT integration limited and stability issues remain
  • 8. History 5 ● Serious roadblocks to JDT integration ● 2.7.3 contained only very minor bugfixes and enhancements ● Long standing patch to open up the JDT for extension updated but rejected ● AspectJ and Equinox Aspects provided a Plan B
  • 9. History 5 ● JDT Roadblocks removed enabling rapid progress, ● Many bugs fixed ● Many features enhanced ● First appeared in 2.7.4 in April 2009 ● Some drawbacks however, ● Some installation issues ● Some JDT features magically started to almost work
  • 10. History 6 ● Solution to preceeding: full speed ahead on JDT integration, recruit contributors ● However, much of the codebase complex over-abstracted and forbidding ● Learning curve too steep for casual contribs ● Fragility in presentation compiler – Spurious pink squigglies, minor errors destroy all highlighting, unreliable dependency management ● Negative effect on scalac – Many fragile “if (inIDE) ...” blocks
  • 11. History 6 ● Complete reimplementation of all semantic and build related features ● Work done in collaboration with Martin Odersky and Iulian Dragos at EPFL in May
  • 12. History 6 ● New interactive compiler ● Completely replaces old presentation compiler ● Now the unit of (re)compilation is a whole source file. – Performance is on a par if not better than before, old approach a “premature optimization” ● All “inIDE” conditions removed from scalac ● Accurate position information to AST nodes – Enables new features (folding) – Supports new tools (refactoring, formatting)
  • 13. History 6 ● New incremental build manager ● Far more reliable than previous Eclipse- specific code ● Makes use of scalac's filesystem abstraction enabling, ● Use by other IDEs ● Use by other tools (eg. refactoring) ● Supports all JDT build path features ● Multiple source and output directories
  • 14. History 6 ● Drawbacks ● Big bang ... there's no going back, – All support for previous integration has been removed from scalac – All semantic features in Eclipse have to be reworked – No feasible backport of new features or bugfixes to 2.7.x branch ● This is in stark contrast to the incremental improvement policy I had intended to adopt from 2.7.2 onwards.
  • 15. Current Development ● The new build manager has been fully integrated. “clean build, open/close hell” is largely a thing of the past ● Previously project-specific compiler instances were inextricably linked to the project itself, so “rebooting” the compiler required the project to closed and opened ● Now fully decoupled and compiler is reinstantiated on a clean
  • 16. Current Development ● Removing the old presentation compiler has had some direct benefits, ● The Scala editor is now effectively identical to the Java editor – This gives us features for free: comment and code folding ● New lightweight syntax highlighting based on the JDT's for Java – Driven by a low-level source scanner, so very robust in the face of syntax and semantic errors
  • 17. Current Development ● Hyperlink navigation (“Jump to definition”) close to completion ● Completely new implementation based on the JDT's mechanisms ● Scala source code selections mapped to Scala AST nodes and Eclipse JDT model handles ● Some “re-sugaring” required to map AST nodes to appropriate JDT construct ● Supports “Jump to implementation” is many cases
  • 18. Current Development ● The underlying mechanism supports additional JDT features, ● Javadoc hovers ● Source hovers ● Java search actions (eg. find references) ● Currently this is only fully functional for Java symbols appearing in Scala source ● Aiming to have this uniform across Scala and Java before release
  • 19. Current Development ● Reusing the JDTs navigation required the extension of AST mapping to binaries (eg. class files in the Scala standard library Jars) ● Currently only supported for binaries with source attachments ● This provides dramatic improvement in navigability for the standard library ● Library components now open in Scala editor ● Outline view and outlines in package explorer now available
  • 20. Current Development ● The full mapping of Scala source and binary components enables comprehensive JDT-wide indexing of Scala elements ● The JDT indexer now understands Scala traits and objects ● Indexing supports uniform “Open Type” behaviour across Scala and Java projects ● Supports “Find references” to both Scala & Java in both Scala & Java sources – Still work in progress, but already useful
  • 21. Current Development ● The new presentation compiler is much more reliable ● No longer used for syntax highlighting, so doesn't have to run synchronous with keystrokes and whole CU update is fast enough ● Currently supports, ● Error reporting as-you-type ● Live outline update in the outline view and the package explorer ● Code completion (work in progress)
  • 22. Roadmap for 2.8 Preview ● Completion of all in-progress major features ● Reinstatement of semantic highlighting ● Support for Eclipse tasks framework ● Resolution of most Trac bugs, ● REPL issues on Windows and Mac OS X) ● Fit and finish. ● Disabling of partially functional JDT features
  • 23. Roadmap for 2.8 Preview ● Notable absences, ● Refactoring – Organize imports – Rename/move element ● Code formatting ● New work by Mirko Stoker would make any effort here redundant ● The aim is to integrate his work before 2.8.0 final, but impossible to make a commitment at this point
  • 24. How to Help ● A call for testers will go out once trunk is feature complete (sometime in the next few weeks) ● At that point please kick the tires of nightly builds, report bugs and partial features which are candidates for suppression ● Review (and hopefully close) old bugs which have be fixed as side-effects of other work
  • 25. Roadmap for 2.8 Final ● Integrate the basic refactorings if they're ready. ● Focus on testing and stability ● Other than refactoring, there will be no additional features beyond those already planned for the preview release
  • 26. Roadmap Beyond 2.8 Final ● Minor features, more of the same ● Additional semantic annotations – Markers/hovers for in-scope and applied implicits ● More refactorings and formatter options – IDE independent API lowers the barrier to entry for external contributors, effort shared across tools ● Support for binary elements without source ● Maven support (eg. M2eclipse) ● Gradual re-enabling of suppressed JDT features
  • 27. Roadmap Beyond 2.8 Final ● Major features ● Support for Scala-specific tools – Lift-specific tooling – “New Lift project” ● Paul Phillips Scalify – “Refactor” from Java to Scala ● Debugger enhancements – Execution of Scala fragments, value hovers ● New REPL features – Support for Paul Phillips new completion behaviour – Semantic highlighting
  • 28. Roadmap Beyond 2.8 Final ● Compatibility with other common Eclipse extensions, ● Google App Engine ● Android ● AJDT and STS ● Other JVM languages which take a similar approach to the JDT: Groovy, JavaFX ● We need a compatibility matrix for Eclipse extensions – will need community help
  • 29. Speeding up Development ● Contribute ● Code ● Bug reports ● End-user and developer documentation ● Howtos and experience reports ● Help build a user community based on constructive criticism ● Contributors encouraged by positive vibe ● Sponsorship
  • 30. The Scala IDE for Eclipse Retrospect and Prospect for 2.8.0 Miles Sabin, Chuusai Ltd. http://www.chuusai.com/