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

Convert ELIXIR_MODULEs in Small IDEs to Projects with Elixir Facets #1443

Merged
merged 6 commits into from Apr 12, 2019

Conversation

KronicDeth
Copy link
Owner

@KronicDeth KronicDeth commented Apr 12, 2019

Fixes #1378

Test Plan

  1. Remove project and module information: rm -rf **/*.iml **/.idea projectFilesBackup*
  2. Install IntelliJ Elixir 10.4.0 in Small IDE
  3. Open project root directory in Small IDE
  4. [VERIFY] *.iml files with ELIXIR_MODULE exist in root and apps/* directories
  5. Close the project
  6. Install IntelliJ Elixir 10.4.1-pre* in Small IDE
  7. Open project root directory in Small IDE
  8. [VERIFY] Conversion dialog asks to Convert project
  9. Click Convert
  10. [VERIFY] *.iml files with ELIXIR_MODULE are gone.
  11. [VERIFY] root and apps/* directories show up as projects (bolded)
  12. Expand External Libraries
  13. [VERIFY] all deps show up as external libraries.

Test Report

  • Test Plan run with Rubymine 2018.3.5: ✅
  • Test Plan run with WebStorm 2019.1: ❌
    WebStorm does not support attaching projects. It cannot support umbrella projects, but the converting will clean up the incorrect ELIXIR_MODULEs still.
  • Test Plan run with PHPStorm 2019.1: ❌
    Could not reliably get eex_test to attach while it worked for eex_test_umbrella at the root and eex_test_web as a sibling.

Summary

Attaching multiple project is unreliable outside of Rubymine, so only allow it in Rubymine and raise a notification in other small IDEs telling users of projects with multiple OTP apps to use IntelliJ (preferred) or Rubymine.

Changelog

Enhancements

  • Update local build to IDEA 2019.1

Bug Fixes

  • In RubyMine, attach OTP applications as separate projects with Elixir facets instead of directly creating ELIXIR_MODULE modules in DirectoryConfigurator. This matches the manual steps of opening the OTP apps as separate directories after opening the root of the project.
    • Mark directories when adding facet
    • Sync libraries when adding facet or attaching to root project. Ensures External Libraries show up for all OTP applications.
  • Convert Small IDE projects with ELIXIR_MODULEs:
    1. Remove ELIXIR_MODULE *.iml files
    2. Remove ELIXIR_MODULE entries root project's modules.xml file.
    3. Lack of modules in project in doOpenProject will trigger DirectoryProjectConfigurators to be run, which will setup the project and run DirectoryConfigurator to attach the apps OTP apps and Elixir facets.
      • Only support automatic attaching multiple OTP apps as separate projects in Rubymine. In IntelliJ normal support for multiple Modules in one Project still works.

@KronicDeth KronicDeth self-assigned this Apr 12, 2019
@KronicDeth KronicDeth added this to the v10.5.0 milestone Apr 12, 2019
Ensures External Libraries show up for all OTP Apps.
Remove `ELIXIR_MODULE`s, and then the fixed `DirectoryConfigurator`
will open those `ELIXIR_MODULE`s directories as attached projects.
Couldn't get Attach Project to work reliably in WebStorm or PHPStorm.
@KronicDeth KronicDeth merged commit 8b2e188 into master Apr 12, 2019
@KronicDeth KronicDeth deleted the 1378 branch April 12, 2019 20:42
KronicDeth added a commit that referenced this pull request Apr 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with Elixir Module SDK in small IDEs
1 participant