From 8bb5344904b51ac16af5a5d94f6049debc1772e0 Mon Sep 17 00:00:00 2001 From: Elle Imhoff Date: Fri, 9 Jun 2023 11:53:22 -0500 Subject: [PATCH 1/3] Call FileIndex.getContentRootForFile in ReadAction when getting working directory for mix format Fixes #3189 --- .../formatter/MixFormatExternalFormatProcessor.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/org/elixir_lang/formatter/MixFormatExternalFormatProcessor.kt b/src/org/elixir_lang/formatter/MixFormatExternalFormatProcessor.kt index 45af1232c..c8d1842bb 100644 --- a/src/org/elixir_lang/formatter/MixFormatExternalFormatProcessor.kt +++ b/src/org/elixir_lang/formatter/MixFormatExternalFormatProcessor.kt @@ -4,6 +4,7 @@ import com.intellij.application.options.CodeStyle import com.intellij.execution.configurations.GeneralCommandLine import com.intellij.execution.process.CapturingProcessHandler import com.intellij.openapi.application.ApplicationManager +import com.intellij.openapi.application.runReadAction import com.intellij.openapi.command.CommandProcessor import com.intellij.openapi.diagnostic.Logger import com.intellij.openapi.progress.ProgressManager @@ -74,7 +75,11 @@ class MixFormatExternalFormatProcessor : ExternalFormatProcessor { psiFile .virtualFile ?.let { virtualFile -> - ProjectRootManager.getInstance(psiFile.project).fileIndex.getContentRootForFile(virtualFile) + val fileIndex = ProjectRootManager.getInstance(psiFile.project).fileIndex + + runReadAction { + fileIndex.getContentRootForFile(virtualFile) + } } ?.takeIf { contentRoot -> contentRoot.findChild("mix.exs") != null From ddf3017c9a79cfb84cf298a2000cce87d083340e Mon Sep 17 00:00:00 2001 From: Elle Imhoff Date: Fri, 9 Jun 2023 12:02:15 -0500 Subject: [PATCH 2/3] Truncate changelogs Only include the latest major version as editing the full history markdown CHANGELOG.md is too slow. --- CHANGELOG.md | 5712 +---------------------------- resources/META-INF/changelog.html | 705 +--- 2 files changed, 66 insertions(+), 6351 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c68be02d..e9f9f62ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,289 +1,5 @@ # Changelog -## Table of Contents - -
- -* [v15.0.2](#v1502) - * [Bug Fixes](#bug-fixes) -* [v15.0.1](#v1501) - * [Bug Fixes](#bug-fixes-1) -* [v15.0.0](#v1500) - * [Incompatible Changes](#incompatible-changes) - * [Enhancements](#enhancements) - * [Bug Fixes](#bug-fixes-2) -* [v14.0.1](#v1401) - * [Bug Fixes](#bug-fixes-3) -* [v14.0.0](#v1400) - * [Incompatible Changes](#incompatible-changes-1) - * [Enhancements](#enhancements-1) - * [Bug Fixes](#bug-fixes-4) -* [v13.2.1](#v1321) - * [Bug Fixes](#bug-fixes-5) -* [v13.2.0](#v1320) - * [Enhancements](#enhancements-2) - * [Bug Fixes](#bug-fixes-6) -* [v13.1.1](#v1311) - * [Bug Fixes](#bug-fixes-7) -* [v13.1.0](#v1310) - * [Enhancements](#enhancements-3) - * [Bug Fixes](#bug-fixes-8) -* [v13.0.0](#v1300) - * [Incompatible Changes](#incompatible-changes-2) - * [Enhancements](#enhancements-4) - * [Bug Fixes](#bug-fixes-9) -* [v12.2.1](#v1221) - * [Bug Fixes](#bug-fixes-10) -* [v12.2.0](#v1220) - * [Enhancements](#enhancements-5) - * [Bug Fixes](#bug-fixes-11) -* [v12.1.0](#v1210) - * [Enhancements](#enhancements-6) - * [Bug Fixes](#bug-fixes-12) -* [v12.0.1](#v1201) - * [Bug Fixes](#bug-fixes-13) -* [v12.0.0](#v1200) - * [Breaking Changes](#breaking-changes) - * [Enhancements](#enhancements-7) - * [Bug Fixes](#bug-fixes-14) -* [v11.13.0](#v11130) - * [Bug Fixes](#bug-fixes-15) - * [Enhancements](#enhancements-8) -* [v11.12.0](#v11120) - * [Bug Fixes](#bug-fixes-16) - * [Enhancements](#enhancements-9) -* [v11.11.0](#v11110) - * [Enhancements](#enhancements-10) - * [Bug Fixes](#bug-fixes-17) -* [v11.10.0](#v11100) - * [Enhancements](#enhancements-11) - * [Bug Fixes](#bug-fixes-18) -* [v11.9.2](#v1192) - * [Bug Fixes](#bug-fixes-19) -* [v11.9.1](#v1191) - * [Bug Fixes](#bug-fixes-20) -* [v11.9.0](#v1190) - * [Enhancements](#enhancements-12) - * [Bug Fixes](#bug-fixes-21) -* [v11.8.1](#v1181) - * [Bug Fixes](#bug-fixes-22) -* [v11.8.0](#v1180) - * [Enhancements](#enhancements-13) - * [Bug Fixes](#bug-fixes-23) -* [v11.7.0](#v1170) - * [Enhancements](#enhancements-14) - * [Bug Fixes](#bug-fixes-24) -* [v11.6.1](#v1161) - * [Bug Fixes](#bug-fixes-25) -* [v11.6.0](#v1160) - * [Enhancements](#enhancements-15) - * [Bug Fixes](#bug-fixes-26) -* [v11.5.0](#v1150) - * [Enhancements](#enhancements-16) - * [Bug Fixes](#bug-fixes-27) -* [v11.4.0](#v1140) - * [Enhancements](#enhancements-17) -* [v11.3.0](#v1130) - * [Enhancements](#enhancements-18) - * [Bug Fixes](#bug-fixes-28) -* [v11.2.0](#v1120) - * [Enhancements](#enhancements-19) - * [Bug Fixes](#bug-fixes-29) -* [v11.1.0](#v1110) - * [Enhancements](#enhancements-20) - * [Bug Fixes](#bug-fixes-30) -* [v11.0.1](#v1101) - * [Bug Fixes](#bug-fixes-31) -* [v11.0.0](#v1100) - * [Enhancements](#enhancements-21) - * [Bug Fixes](#bug-fixes-32) - * [Incompatible Changes](#incompatible-changes-3) -* [v10.6.0](#v1060) - * [Enhancements](#enhancements-22) - * [Bug Fixes](#bug-fixes-33) -* [v10.5.1](#v1051) - * [Bug Fixes](#bug-fixes-34) -* [v10.5.0](#v1050) - * [Enhancements](#enhancements-23) - * [Bug Fixes](#bug-fixes-35) -* [v10.4.0](#v1040) - * [Enhancements](#enhancements-24) - * [Bug Fixes](#bug-fixes-36) -* [v10.3.0](#v1030) - * [Enhancements](#enhancements-25) - * [Bug Fixes](#bug-fixes-37) -* [v10.2.0](#v1020) - * [Enhancements](#enhancements-26) - * [Bug Fixes](#bug-fixes-38) -* [v10.1.0](#v1010) - * [Enhancements](#enhancements-27) - * [Bug Fixes](#bug-fixes-39) -* [v10.0.1](#v1001) - * [Bug Fixes](#bug-fixes-40) -* [v10.0.0](#v1000) - * [Enhancements](#enhancements-28) - * [Bug Fixes](#bug-fixes-41) - * [Incompatible Changes](#incompatible-changes-4) -* [v9.0.0](#v900) - * [Enhancements](#enhancements-29) - * [Bug Fixes](#bug-fixes-42) - * [Incompatible Changs](#incompatible-changs) -* [v8.1.0](#v810) - * [Enhancements](#enhancements-30) - * [Bug Fixes](#bug-fixes-43) -* [v8.0.0](#v800) - * [Enhancements](#enhancements-31) - * [Bug Fixes](#bug-fixes-44) - * [Incompatible Changes](#incompatible-changes-5) -* [v7.5.0](#v750) - * [Enhancements](#enhancements-32) - * [Bug Fixes](#bug-fixes-45) -* [v7.4.0](#v740) - * [Enhancements](#enhancements-33) - * [Bug Fixes](#bug-fixes-46) -* [v7.3.0](#v730) - * [Enhancements](#enhancements-34) - * [Bug Fixes](#bug-fixes-47) -* [v7.2.1](#v721) - * [Bug Fixes](#bug-fixes-48) -* [v7.2.0](#v720) - * [Enhancements](#enhancements-35) - * [Bug Fixes](#bug-fixes-49) -* [v7.1.0](#v710) - * [Enhancements](#enhancements-36) - * [Bug Fixes](#bug-fixes-50) -* [v7.0.0](#v700) - * [Enhancements](#enhancements-37) - * [Bug Fixes](#bug-fixes-51) -* [Incompatible Changes](#incompatible-changes-6) -* [v6.7.0](#v670) - * [Enhancements](#enhancements-38) - * [Bug Fixes](#bug-fixes-52) -* [v6.6.0](#v660) - * [Enhancements](#enhancements-39) - * [Bug Fixes](#bug-fixes-53) -* [v6.5.1](#v651) - * [Bug Fixes](#bug-fixes-54) -* [v6.5.0](#v650) - * [Enhancements](#enhancements-40) - * [Bug Fixes](#bug-fixes-55) -* [v6.4.0](#v640) - * [Enhancements](#enhancements-41) - * [Bug Fixes](#bug-fixes-56) -* [v6.3.0](#v630) - * [Enhancements](#enhancements-42) - * [Bug Fixes](#bug-fixes-57) -* [v6.2.0](#v620) - * [Enhancements](#enhancements-43) - * [Bug Fixes](#bug-fixes-58) -* [v6.1.1](#v611) - * [Bug Fixes](#bug-fixes-59) -* [v6.1.0](#v610) - * [Enhancements](#enhancements-44) - * [Bug Fixes](#bug-fixes-60) -* [v6.0.0](#v600) - * [Enhancements](#enhancements-45) - * [Bug Fixes](#bug-fixes-61) - * [Incompatible Changes](#incompatible-changes-7) -* [v5.1.0](#v510) - * [Enhancements](#enhancements-46) - * [Bug Fixes](#bug-fixes-62) -* [v5.0.0](#v500) - * [Enhancements](#enhancements-47) - * [Bug Fixes](#bug-fixes-63) - * [Incompatible Changes](#incompatible-changes-8) -* [v4.7.0](#v470) - * [Enhancements](#enhancements-48) - * [Bug Fixes](#bug-fixes-64) -* [v4.6.0](#v460) - * [Enhancements](#enhancements-49) - * [Bug Fixes](#bug-fixes-65) -* [v4.5.0](#v450) - * [Enhancements](#enhancements-50) -* [v4.4.0](#v440) - * [Enhancements](#enhancements-51) - * [Bug Fixes](#bug-fixes-66) -* [v4.3.0](#v430) - * [Enhancements](#enhancements-52) - * [Bug Fixes](#bug-fixes-67) -* [v4.2.0](#v420) - * [Enhancements](#enhancements-53) - * [Bug Fixes](#bug-fixes-68) -* [v4.1.0](#v410) - * [Enhancements](#enhancements-54) - * [Bug Fixes](#bug-fixes-69) -* [v4.0.0](#v400) - * [Enhancements](#enhancements-55) - * [Bug Fixes](#bug-fixes-70) - * [Incompatible Changes](#incompatible-changes-9) -* [v3.0.1](#v301) - * [Bug Fixes](#bug-fixes-71) -* [v3.0.0](#v300) - * [Enhancements](#enhancements-56) - * [Bug Fixes](#bug-fixes-72) - * [Incompatible Changes](#incompatible-changes-10) -* [v2.2.0](#v220) - * [Enhancement](#enhancement) - * [Bug Fixes](#bug-fixes-73) -* [v2.1.0](#v210) - * [Enhancement](#enhancement-1) - * [Bug Fixes](#bug-fixes-74) -* [v2.0.0](#v200) - * [Enhancements](#enhancements-57) - * [Bug Fixes](#bug-fixes-75) - * [Incompatible Changes](#incompatible-changes-11) -* [v1.2.1](#v121) - * [Enhancements](#enhancements-58) - * [Bug Fixes](#bug-fixes-76) -* [v1.2.0](#v120) - * [Enhancements](#enhancements-59) - * [Bug Fixes](#bug-fixes-77) -* [v1.1.0](#v110) - * [Enhancements](#enhancements-60) -* [v1.0.0](#v100) - * [Enhancements](#enhancements-61) - * [Bug Fixes](#bug-fixes-78) - * [Incompatible Fixes](#incompatible-fixes) -* [v0.3.5](#v035) - * [Enhancements](#enhancements-62) - * [Bug Fixes](#bug-fixes-79) -* [v0.3.4](#v034) - * [Enhancements](#enhancements-63) -* [v0.3.3](#v033) - * [Enhancements](#enhancements-64) -* [v0.3.2](#v032) - * [Bug Fixes](#bug-fixes-80) -* [v0.3.1](#v031) - * [Enhancements](#enhancements-65) -* [v0.3.0](#v030) - * [Enhancements](#enhancements-66) - * [Incompatible Changes](#incompatible-changes-12) -* [v0.2.1](#v021) - * [Enhancements](#enhancements-67) - * [Bug Fixes](#bug-fixes-81) -* [v0.2.0](#v020) - * [Enhancements](#enhancements-68) - * [Incompatible Changes](#incompatible-changes-13) -* [v0.1.4](#v014) - * [Enhancements](#enhancements-69) - * [Bug Fixes](#bug-fixes-82) -* [v0.1.3](#v013) - * [Bug Fixes](#bug-fixes-83) -* [v0.1.2](#v012) - * [Enhancements](#enhancements-70) -* [v0.1.1](#v011) - * [Bug Fixes](#bug-fixes-84) -* [v0.1.0](#v010) - * [Enhancements](#enhancements-71) - * [Bug Fixes](#bug-fixes-85) -* [v0.0.3](#v003) - * [Enhancements](#enhancements-72) -* [v0.0.2](#v002) - * [Enhancements](#enhancements-73) - * [Bug Fixes](#bug-fixes-86) - -
- ## v15.0.2 ### Bug Fixes @@ -335,5430 +51,6 @@ * [#3180](https://github.com/KronicDeth/intellij-elixir/pull/3180) - [@KronicDeth](https://github.com/KronicDeth) * Remove duplicate dependency on `com.intellij.modules.java` plugin. -## v14.0.1 - -### Bug Fixes -* [#2954](https://github.com/KronicDeth/intellij-elixir/pull/2954) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore atoms at top-level when looking for docs. -* [#3040](https://github.com/KronicDeth/intellij-elixir/pull/3040) - [@KronicDeth](https://github.com/KronicDeth) - * Replace `TODO()` in `leex.reference.resolver.Assign` with logger errors that include `PSiElement`. -* [#3041](https://github.com/KronicDeth/intellij-elixir/pull/3041) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore `type` for docs. -* [#3042](https://github.com/KronicDeth/intellij-elixir/pull/3042) - [@KronicDeth](https://github.com/KronicDeth) - * Don't look for variable use scope above EEx tags. - If a variable is declared in an EEx tag then it is actually missing its declaration and cannot be resolved, so ignore its usage. -* [#3043](https://github.com/KronicDeth/intellij-elixir/pull/3043) - [@KronicDeth](https://github.com/KronicDeth) - * Check if module is disposed when write action is run for `syncLibraries`. -* [#3044](https://github.com/KronicDeth/intellij-elixir/pull/3044) - [@KronicDeth](https://github.com/KronicDeth) - * Only use Elixir SDK for `mix format` if it has an Erlang SDK. -* [#3045](https://github.com/KronicDeth/intellij-elixir/pull/3045) - [@KronicDeth](https://github.com/KronicDeth) - * Include more lines of context for stacktraces in error reports. -* [#3046](https://github.com/KronicDeth/intellij-elixir/pull/3046) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore identifier when `@*doc` attribute isn't quoted. -* [#3047](https://github.com/KronicDeth/intellij-elixir/pull/3047) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore if package virtual file is disposed before the deps can be read. -* [#3060](https://github.com/KronicDeth/intellij-elixir/pull/3060) - [@KronicDeth](https://github.com/KronicDeth) - * Don't decompile Erlang `And` as Elixir `and`. -* [#3061](https://github.com/KronicDeth/intellij-elixir/pull/3061) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore `request_body` and `responses` for docs. -* [#3062](https://github.com/KronicDeth/intellij-elixir/pull/3062) - [@KronicDeth](https://github.com/KronicDeth) - * Check if heredoc has lines before calculating host text range for Markdown docs. -* [#3064](https://github.com/KronicDeth/intellij-elixir/pull/3064) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore if stubs ids can't be found when resolving Callables. -* [#3075](https://github.com/KronicDeth/intellij-elixir/pull/3075) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore hexadecimal numbers at the root of the file when collecting doc comment. -* [#3076](https://github.com/KronicDeth/intellij-elixir/pull/3076) - [@KronicDeth](https://github.com/KronicDeth) - * Return an empty array of primaryArguments instead of array with null operand for unary operation without operand. -* [#3079](https://github.com/KronicDeth/intellij-elixir/pull/3079) - [@KronicDeth](https://github.com/KronicDeth) - * Set `sinceBuild` to IntelliJ IDEA 2022.3. - Fixes incorrect compatibility listed with < 2022.3 when < 2022.3 support was removed in 14.0.0 with #2946. -* [#3082](https://github.com/KronicDeth/intellij-elixir/pull/3082) - [@KronicDeth](https://github.com/KronicDeth) - * Use `minByOrNull` to protect from empty module list. - This fix may not work as the line number reported in the errors is actually outside of the file. This is only a guess that `minBy` was what was throwing the `NoSuchElement` exception. -* [#3083](https://github.com/KronicDeth/intellij-elixir/pull/3083) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore `null` operands for `not in` `primaryArguments()`. - Instead of including both left and right operand always and so having null operand in fixed size array return array with only non-null operands. -* [#3085](https://github.com/KronicDeth/intellij-elixir/pull/3085) - [@KronicDeth](https://github.com/KronicDeth) - * Don't allow Elixir SDK without Erlang SDK to be selected for New Project. - The SDK has to be able to work for `mix new`. -* [#3086](https://github.com/KronicDeth/intellij-elixir/pull/3086) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore strings, charlists, and sigils at the top of file when looking for doc comments. -* [#3097](https://github.com/KronicDeth/intellij-elixir/pull/3097) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore top-level Aliases when collecting docs. -* [#3098](https://github.com/KronicDeth/intellij-elixir/pull/3098) - [@KronicDeth](https://github.com/KronicDeth) - * Ignored `unquote` calls when injecting docs. - * Find enclosing `quote` when `def`s are inside an `fn` as in Phoenix Route Helpers. -* [#3099](https://github.com/KronicDeth/intellij-elixir/pull/3099) - [@KronicDeth](https://github.com/KronicDeth) - * Handle binary modules when processing protocols and implementations for line markers and definition search. -* [#3100](https://github.com/KronicDeth/intellij-elixir/pull/3100) - [@KronicDeth](https://github.com/KronicDeth) - * Skip unqualified no arguments calls when Ecto.Query.from arguments are being typed. -* [#3103](https://github.com/KronicDeth/intellij-elixir/pull/3103) - [@KronicDeth](https://github.com/KronicDeth) - * Setting name on a call definition clause sets the name on the head instead. - The JetBrains API both renames the usage references AND the original element where the rename refactoring was started, but when started on a call definition clause the `functionNameElement` is the `def`, `defp`, `defmacro`, or `defmacrop` and so both the name of the call was changed, but the `def*` was also changed to the new name. Now, if `setName` is called on a definition, the head is renamed instead. -* [#3111](https://github.com/KronicDeth/intellij-elixir/pull/3111) - [@KronicDeth](https://github.com/KronicDeth) - * Filter out Elixir SDKs that don't have an Erlang SDK when importing projects. -* [#3121](https://github.com/KronicDeth/intellij-elixir/pull/3121) - [@KronicDeth](https://github.com/KronicDeth) - * Check Elixir SDK has Erlang SDK before running dialyzer. - Notify user of configuration error instead of throwing exception when constructing `mix` commandline. -* [#3124](https://github.com/KronicDeth/intellij-elixir/pull/3124) - [@KronicDeth](https://github.com/KronicDeth) - * Log heredoc where Markdown cannot be injected. -* [#3125](https://github.com/KronicDeth/intellij-elixir/pull/3125) - [@KronicDeth](https://github.com/KronicDeth) - * Don't inject Markdown in empty heredoc docs. -* [#3126](https://github.com/KronicDeth/intellij-elixir/pull/3126) - [@KronicDeth](https://github.com/KronicDeth) - * Log if new name element type does not match old name element type. - * Replace name with relative identifier instead of identifier for qualified calls on rename. -* [#3127](https://github.com/KronicDeth/intellij-elixir/pull/3127) - [@KronicDeth](https://github.com/KronicDeth) - * Keep looking for variants above if and unless - `if` and `unless` used to call `keepProcessing()` after checking if the child calls when resolving or searching for variants, but Variants returned `false` always from `keepProcessing()`. - - This stops the variant search from terminating inside of an `if` or `unless` when it wouldn't outside of one as was reported in [#2751](https://github.com/KronicDeth/intellij-elixir/issues/2751). - * List `Kernel` and `Kernel.SpecialForms` variants inside modulars. - Keep processing at end of modulars when looking for variants, which will check the implicit imports of `Kernel` and `Kernel.SpecialForms`. - * Prevent listing variants from outer module in nested module -* [#3139](https://github.com/KronicDeth/intellij-elixir/pull/3139) - [@KronicDeth](https://github.com/KronicDeth) - * Log the accumulated and target usage type that cannot be folded. -* [#3140](https://github.com/KronicDeth/intellij-elixir/pull/3140) - [@KronicDeth](https://github.com/KronicDeth) - * Fix reporting `mix new` errors as notifications - * Don't associate mix new errors with new project as it doesn't have a frame, so the notification was suppressed before. - * Strip color codes from mix new error notification. - * Validate `--app` is set correctly for new projects - * If inferred from project name, make sure the name is valid application name the same as `mix new` does. - * If `--app` is set explicitly, make sure it follows naming rules for `mix new`. - -## v14.0.0 - -### Incompatible Changes -* [#2946](https://github.com/KronicDeth/intellij-elixir/pull/2946) - [@KronicDeth](https://github.com/KronicDeth) - * Drop support for IDEs < 2022.3. - -### Enhancements -* [#2946](https://github.com/KronicDeth/intellij-elixir/pull/2946) - [@ViseLuca](https://github.com/ViseLuca) - * Add 2022.3 compatibility. - -### Bug Fixes -* [#2911](https://github.com/KronicDeth/intellij-elixir/pull/2911) - [@KronicDeth](https://github.com/KronicDeth) - * Don't update hex or fetch dependencies if SDK not selected when creating project. - -## v13.2.1 - -### Bug Fixes -* [#2787](https://github.com/KronicDeth/intellij-elixir/pull/2787) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore `PsiErrorElement` when collecting doc comments. -* [#2793](https://github.com/KronicDeth/intellij-elixir/pull/2793) - [@JamesFerguson](https://github.com/JamesFerguson) - * Fix README typos. -* [#2800](https://github.com/KronicDeth/intellij-elixir/pull/2800) - [@KronicDeth](https://github.com/KronicDeth) - * Log before and after setting mirror for decompiled files. - Parsing complex decompiles can freeze the IDE. Logging before parsing the decompiles will give a chance of finding the file and recovering the decompiled code to find the error or complexity that needs to be suppressed. - * Use `Options.truncateDecompiledBodyz on Elixir decompiled bodies too. - Previously, this was only used for Erlang functions. Fixes parsing decompiled code causing freezes for some files. -* [#2804](https://github.com/KronicDeth/intellij-elixir/pull/2804) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore `authors: ...` for documentation when injecting Markdown. -* [#2808](https://github.com/KronicDeth/intellij-elixir/pull/2808) - [@KronicDeth](https://github.com/KronicDeth) - * Stop `prependQualifiers` when reaching a qualified bracket operation (`Alias.function[key]`). -* [#2809](https://github.com/KronicDeth/intellij-elixir/pull/2809) - [@KronicDeth](https://github.com/KronicDeth) - * Skip `-1` and other unary operations when resolving types. -* [#2810](https://github.com/KronicDeth/intellij-elixir/pull/2810) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore maps at the root of files when collecting doc comments. -* [#2812](https://github.com/KronicDeth/intellij-elixir/pull/2812) - [@KronicDeth](https://github.com/KronicDeth) - * Return `emptySequence` from `childExpressions` when `PsiElement` has no `firstChild` or `lastChild`. -* [#2814](https://github.com/KronicDeth/intellij-elixir/pull/2814) - [@KronicDeth](https://github.com/KronicDeth) - * Don't descend inside struct literal when resolving types. -* [#2848](https://github.com/KronicDeth/intellij-elixir/pull/2848) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore injecting Markdown in calls that read the text from a file, such as in `@moduledoc File.read!(Path.join([__DIR__, "..", "README.md"]))` -* [#2858](https://github.com/KronicDeth/intellij-elixir/pull/2858) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore undocument script code at root of files. - * Alias used in qualified call. - * Integers - * Floats - * Tuples -* [#2890](https://github.com/KronicDeth/intellij-elixir/pull/2890) - [@KronicDeth](https://github.com/KronicDeth) - * Stop `ancestorTypeSpec` on `QualifiedMultipleAliases`. -* [#2891](https://github.com/KronicDeth/intellij-elixir/pull/2891) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore pipelines for injecting Markdown in doc comments. -* [#2892](https://github.com/KronicDeth/intellij-elixir/pull/2892) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore useless `warn_missing` in `edeliver`'s `distillery` dep. -* [#2893](https://github.com/KronicDeth/intellij-elixir/pull/2893) - [@KronicDeth](https://github.com/KronicDeth) - * Stop accumulating qualifiers when bracket operation is hit either as qualifier or argument. - -## v13.2.0 - -### Enhancements -* [#2768](https://github.com/KronicDeth/intellij-elixir/pull/2768) - [@KronicDeth](https://github.com/KronicDeth) - * Rendered Markdown toggle for `@moduledoc`, `@typedoc`, and `@doc` - * Inject markdown in `@doc deprecated: ...` - * Inject Markdown into doc lines and heredocs - * Ignore `false` for documentation module attributes - * Ignore `@doc` metadata that can't include Markdown - * `guard: ...` - * `since: ...` - * Ignore `@callback(unquote(spec))` when trying to find typespecs - * Interleave Markdown and Elixir for doctests - * Mark code blocks as Elixir language in Markdown documentation - * Mark multi-line exceptions in doctests as Markdown - * Treat *DBG* prefix doctest lines as Markdown instead of Elixir - * Resolve owner of docs as following call definition clause. - * Count `...> ` as Markdown since it's not Elixir syntax - * Count `** (...` as Markdown since it's not Elixir syntax for exception in iex prompts - * Count `iex> ` as Markdown since it's not Elixir syntax - * Documentation links in rendered documentation - * Modulars `MODULE` - * Callbacks - * Relative (`c:NAME/ARITY`) - * Absolute (`c:MODULE.NAME/ARITY`) - * Types - * Relative (`t:NAME/ARITY`) - * Absolute (`t:MODULE.NAME/ARITY`) - * Functions and Macros - * Relative (`NAME/ARITY`) - * Absolute (`MODULE.NAME/ARITY`) - * Quick Documentation for more elements - * Callbacks (`@doc` above `@callback` and `@macrocallback`) - * Types (`@typedoc` above `@type`, `@typep`, and `@opaque`) -* [#2766](https://github.com/KronicDeth/intellij-elixir/pull/2766) - [@ViseLuca](https://github.com/ViseLuca) - * Compatibility with IntelliJ 2022.2. - * Updated Elixir version used in tests. - * Updated Gradle dependencies. - -### Bug Fixes -* [#2768](https://github.com/KronicDeth/intellij-elixir/pull/2768) - [@KronicDeth](https://github.com/KronicDeth) - * Add compiled CallDefinitionImpl delegation targets to resolve results - * Log non-Call modulars for resolving delegation -* [#2766](https://github.com/KronicDeth/intellij-elixir/pull/2766) - [@KronicDeth](https://github.com/KronicDeth) - * Fix operator token set for `**`. - -## v13.1.1 - -### Bug Fixes -* [#2673](https://github.com/KronicDeth/intellij-elixir/pull/2673) - [@KronicDeth](https://github.com/KronicDeth) - * Fix Project Initialization Failed from New > Project > Elixir - * Catch and log `IOException`s swallowed by Project Initialization Failed. - * Recursively delete project directory before running `mix new`. - Previously, the directory was only deleted if empty, but whether the `.idea` directory is written when `setupProject` is called differs between IDE versions, so to be safe, recursively delete. -* [#2705](https://github.com/KronicDeth/intellij-elixir/pull/2705) - [@KronicDeth](https://github.com/KronicDeth) - * Fix Go To Definition for function in compiled modules. - When switching over to delayed decompilation, `ModuleImpl` did not have `processDeclaration` overloadded, so the `PsiScopeProcessor` was never called on it and so the `CallDefinitionClause` scope processor did not check the `ModuleImpl#callDefinitons`. - * Implement Deprecated metadata handling for docs from BEAM files. -* [#2709](https://github.com/KronicDeth/intellij-elixir/pull/2709) - [@KronicDeth](https://github.com/KronicDeth) - * Don't assume Elixir `SDK` `sdkAdditionalData` is non-`null`. -* [#2711](https://github.com/KronicDeth/intellij-elixir/pull/2711) - [@KronicDeth](https://github.com/KronicDeth) - * Don't restrict Run Configurations to Run in Modules to Elixir modules. - The docs for `ModuleType` say the concept is meant to be deprecated, so don't enforce it and trying to load `ElixirModuleType` in RubyMine breaks as it tries to load `ElixirModuleBuilder` and therefore `JavaModuleBuilder`, which only works in IntelliJ. -* [#2712](https://github.com/KronicDeth/intellij-elixir/pull/2712) - [@KronicDeth](https://github.com/KronicDeth) - * Add the facet in a write action in addition to setting the SDK. -* [#2717](https://github.com/KronicDeth/intellij-elixir/pull/2717) - [@KronicDeth](https://github.com/KronicDeth) - * Increase `SUSPECT_NAME_SET_SIZE` to `20`. - Increased to cover the `15` `impl`s of `String.Chars` in the `geo` hex package. -* [#2719](https://github.com/KronicDeth/intellij-elixir/pull/2719) - [@KronicDeth](https://github.com/KronicDeth) - * Log if `erl` binary is not found when trying to run `mix format`. - Log instead of letting it throw up the stack and cause an error report since the SDK not being set will be very common. - -## v13.1.0 - -### Enhancements - -* [#2673](https://github.com/KronicDeth/intellij-elixir/pull/2673) - [@KronicDeth](https://github.com/KronicDeth) - * Improved error reporting - * Include 5 lines of context around error elements - * Use `originalFile` when calculating path, so that `.beam` file path is used for decompiled files that don't have a `VirtualFile`. - * Compact line references - * Only including ending line if it is different than starting line. - * Add ending line as a range after starting line instead of a completely separate path and line. - * Put stacktrace in `
` with `` -* [#2687](https://github.com/KronicDeth/intellij-elixir/pull/2687) - [@KronicDeth](https://github.com/KronicDeth) - * Update dependencies - * `gradle` to `7.4.2` - * `gradle-intellij-plugin` to `1.6.0` - * Set `-Xjvm-default=all` for Kotlin to allow `@JvmDefault` interfaces - * Needed for `LanguageNewProjectWizard` subclasses and associated implementations - * New Project > Language > Elixir includes all mix options - * `--app` - * `--module` - * `--sup` - * `--umbrella` -* [#2578](https://github.com/KronicDeth/intellij-elixir/pull/2578) - [@yordis](https://github.com/yordis) - * Add `mix format` external formatter. - Requires project or module SDK be set in order to run. If the SDK is not available, only the internal formatter will be used. The internal formatter is still used for file subsection formatting and new line indenting as `mix format` works at the file-level. - * Allow `mix format` external formatter to be disabled. - - 1. Preferences - 2. Editor > Code Style > Elixir - 3. Click the `mix format` tab - 4. Expand the General group - 5. Uncheck "Format files with `mix format`". -* [#2697](https://github.com/KronicDeth/intellij-elixir/pull/2697) - [@KronicDeth](https://github.com/KronicDeth) - * Support Elixir 1.13.0 in debugger. - -### Bug Fixes - -* [#2637](https://github.com/KronicDeth/intellij-elixir/pull/2637) - [@KronicDeth](https://github.com/KronicDeth) - * Protect from `null` `containingFile` when fetching docs. -* [#2639](https://github.com/KronicDeth/intellij-elixir/pull/2639) - [@KronicDeth](https://github.com/KronicDeth) - * Show notification if $HOME_PATH/lib does not exist. - Instead of logging an error show a notification since it can and does happen and is not a bug to be fixed in the - plugin, but a configuration change the user needs to do. -* [#2640](https://github.com/KronicDeth/intellij-elixir/pull/2640) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore tuples as type restrictions that occur during typing. -* [#2641](https://github.com/KronicDeth/intellij-elixir/pull/2641) - [@KronicDeth](https://github.com/KronicDeth) - * Catch `AlreadyDisposedException` when trying to find module for PsiElement in `mostSpecificSdk`. - * Check if the project`is disposed before using it to get module for `PsiElement`. -* [#2645](https://github.com/KronicDeth/intellij-elixir/pull/2645) - [@KronicDeth](https://github.com/KronicDeth) - * Look above `CallDefinitionImpl` for `Type` scope processing - It should go up to the `ModuleImpl` to find the `TypeDefinitionImpl`. -* [#2671](https://github.com/KronicDeth/intellij-elixir/pull/2671) - [@KronicDeth](https://github.com/KronicDeth) - * Have Credo Global Inspection use standard `Mix.commandLine` used for Run Configurations. - * Allow environment variables to be set similar to Run Configurations for projects that require environment variables to be set for Mix tasks due to checks in their config. - * No longer support Include Explanations as it takes too long to run. - * Remove annotator until it can be re-implemented in performant manner using corrected environment and SDK from Global Inspection. -* [#2672](https://github.com/KronicDeth/intellij-elixir/pull/2672) - [@KronicDeth](https://github.com/KronicDeth) - * Look above `.` for `ancestorTypeSpec`. - * Look above `` after `.` for `ancestorTypeSpec`. -* [#2673](https://github.com/KronicDeth/intellij-elixir/pull/2673) - [@KronicDeth](https://github.com/KronicDeth) - * Fix Find Usages that resolve to compiled types. - * Add element description for `TypeDefinitionImpl` - * Node Text is `@ () :: ...` - * Long Name and Short Name are just the `name` - * Type is `type` - * Mirror `TypeDefinitionImpls` to types in decompiled source. - Allow `TypeDefinitionImpl.getNavigation` to go to decompiled types. - * Allow types with atom keyword names to be highlight even though they are invalid names. -* [#2674](https://github.com/KronicDeth/intellij-elixir/pull/2674) - [@KronicDeth](https://github.com/KronicDeth) - * Catch `RuntimeException` if `rootProvider` is already disposed. - Catching `AssertionError` used to be enough in #1359, but not anymore as of #2623. -* [#2675](https://github.com/KronicDeth/intellij-elixir/pull/2675) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore invalid format that occur while user is typing when highlighting types - * `@type name :: String.()` - * `@type String.()` - * `@type S` -* [#2676](https://github.com/KronicDeth/intellij-elixir/pull/2676) - [@KronicDeth](https://github.com/KronicDeth) - * Restore Project configuration for Small IDEs. - I dropped an `!` when converting from `equals` to `==` when fixing the deprecation warnings, which made the Project SDK selection _only_ be **HIDDEN** where it needed to be **SHOWN**. -* [#2679](https://github.com/KronicDeth/intellij-elixir/pull/2679) - [@KronicDeth](https://github.com/KronicDeth) - * Catch `StackOverflowError` in `find_usages.Provider.getType()`. - * Element descriptions for `CallDefinitionImpl` -* [#2680](https://github.com/KronicDeth/intellij-elixir/pull/2680) - [@KronicDeth](https://github.com/KronicDeth) - * Highlight `CallDefinitionImpl` references as predefined if resolved `CallDefinitionImpl` is in `Kernel` or `Kernel.SpecialForms`. - Fixes highlighting `def` and other defined when using SDKs without source like Homebrew after the delayed-decompilation fixes from 12.2.1. Now source-less (Homebrew) and SDKs with sources (ASDF) will both be able to highlight predefineds. -* [#2681](https://github.com/KronicDeth/intellij-elixir/pull/2681) - [@KronicDeth](https://github.com/KronicDeth) - * No longer record the SDK name as an attribute of the Facet configuration, as it didn't write back changes. - * Instead detect the Elixir SDK by finding any of the libraries that have an Elixir SDK name in the module. (The Elixir SDK was already being added as a library to allow indexing the SDK.) - * Clear out any existing Elixir SDKs listed as module libraries before setting a new SDK. - This eliminates the duplicates that happened before. (It turns out the JetBrains API doesn't prevent duplicates. Oopsie.) It also ensures that no SDK is recorded if the SDK is deselected in the UI, which wouldn't happen before. -* [#2687](https://github.com/KronicDeth/intellij-elixir/pull/2687) - [@KronicDeth](https://github.com/KronicDeth) - * Handle disposed `Sdk.rootProvider` by reloading the `Sdk` when loading `ebinDirectories` - * In IntelliJ 2022, the New Project dialog changed and it no longer automatically listed `ModuleType.getBuilder` `ModuleBuilder`s as potential project builders, so it looked like Elixir New Project support disappeared. Fix this by implementing the `newProjectWizard.language` extension that was added to control the Language switching in the new New Project dialog. -* [#2688]](https://github.com/KronicDeth/intellij-elixir/pull/2688) - [@KronicDeth](https://github.com/KronicDeth) - * Remove references to `ElementClassHint` in BeamFileImpl that only work in IntelliJ. - `ElementClassHint` is part of the `processDeclaration` system used in Java and so was in the code because `BeamFileImpl` was original based on `ClassFileImpl`, but since the Elixir resolvers don't use the hint system at all, it can just be removed. -* [#2578](https://github.com/KronicDeth/intellij-elixir/pull/2578) - [@yordis](https://github.com/KronicDeth/intellij-elixir/pull/2578) - * Remove `CodeStyleSettingsProvider` because it is redundant with `LanguageCodeStyleSettingsProvider` -* [#2695](https://github.com/KronicDeth/intellij-elixir/pull/2695) - [@KronicDeth](https://github.com/KronicDeth) - * Restrict `UsageTargetProvider` to `ElixirFile`s - Without this restriction, it tries to run when developing the plugin itself and breaks Kotlin syntax highlighting. -* [#2697](https://github.com/KronicDeth/intellij-elixir/pull/2697) - [@KronicDeth](https://github.com/KronicDeth) - * Fix environment not being passed to debug runs of ESpec and ExUnit Run Configurations. - The `env` from the `Configuration` was dropped because a local `env` was created to set `MIX_ENV` `true`. - -## v13.0.0 - -### Incompatible Changes - -* [#2594](https://github.com/KronicDeth/intellij-elixir/pull/2594) - [@KronicDeth](https://github.com/KronicDeth) - * Drop support for IDEEs before 2022.1. - -### Enhancements - -* [#2594](https://github.com/KronicDeth/intellij-elixir/pull/2594) - [@KronicDeth](https://github.com/KronicDeth) - * Support 2022.1 IDEs - * Update IntelliJ Plugin Gradle to 1.5.3. - * Set untilBuild explicitly - * Target JVM Version 11 -* [#2633](https://github.com/KronicDeth/intellij-elixir/pull/2633) - [@KronicDeth](https://github.com/KronicDeth) - * Expand `untilBuild` to cover PATCH releases of 2022.1. - -### Bug Fixes - -* [#2594](https://github.com/KronicDeth/intellij-elixir/pull/2594) - [@KronicDeth](https://github.com/KronicDeth) - * Fix (some) plugin verifier warnings - * Fix (some) deprecation warnings. - * Use fewer Internal APIs. -* [#2633](https://github.com/KronicDeth/intellij-elixir/pull/2633) - [@KronicDeth](https://github.com/KronicDeth) - * Don't use ElixirModuleType to check if it is available. - It will not load in IDEs that lack `JavaModuleBuilder`, which is why I was hard coding the ran previously. - * Don't use `XmlSerializer` as equivalent of `DefaultJDOMExternalizer` - The `DefaultJDOMExternalizer` method calls weren't writing anything and the explicit attribute value accesses were, - so it is more correct to just remove the original deprecated calls. - -## v12.2.1 - -### Bug Fixes - -* [#2579](https://github.com/KronicDeth/intellij-elixir/pull/2579) - [@KronicDeth](https://github.com/KronicDeth) - * Don't call `.navigationElement` to prevent unnecessary decompilation when resolving references or showing - completions. - * Don't call `navigationElement` in `ChooseByNameContributor` - * Don't decompile Protocols to get their specific `t` type - * Don't call `.navigationElement` when resolving built-in types in `:erlang` - * Don't use `navigationElement` in `CallDefinitionClause.implicitImports` for `Kernel` and - `KernelSpecial.Forms`. - * Don't call `.navigationElement` in `reference.resolver.Module.multiResolveProject` - Prevents decompiling modules when doing completion. - - Handle `PsiCompiledElement` in places that previously only handled source and decompiled `Call`s - * `getElementDescription` for ModuleImpl - * Complete call definition under binary modules - * Don't look for variables in compiled elements - * Don't assume elements have a non-null node Decompiled elements don't - * Index `TypeDefinition`s in .beam files Only supported built-in types faked in `:erlang` for now - * Walk `ModuleImpl` for `scope.Type` - -## v12.2.0 - -### Enhancements - -* [#2461](https://github.com/KronicDeth/intellij-elixir/pull/2461) - [@KronicDeth](https://github.com/KronicDeth) - * Test against support IDEA versions in CI to prevent another Find Usage regression - * 2021.2.3 FindUsageTests differ from manual testings, so don't test 2021.2.3 - * Make FindUsagesTest UsageViewTreeText work for both 2021.1.3 and other versions - * Add kernel.ex to all Find Usage Tests to ensure it doesn't work because it can't resolve primary element - * Add find usages for def test - -### Bug Fixes - -* [#2461](https://github.com/KronicDeth/intellij-elixir/pull/2461) - [@KronicDeth](https://github.com/KronicDeth) - * Work-around Find Usage bug due to temporary change in JetBrains API only in versions that have that change. - * Restore old find_usages.handler.Call - * Determine whether to resolve `FindUsageHandler` primary element based on application build number Assume that are - 213.* builds have the already resolved call. This excludes 2021.3, but not 2021.3.1, which includes the fix to - restore the 2021.1.3 behaviour. -* [#2466](https://github.com/KronicDeth/intellij-elixir/pull/2466) - [@KronicDeth](https://github.com/KronicDeth) - * Fix HTML errors in `description.html`. - * Add card one-liner. - -## v12.1.0 - -### Enhancements - -* [#2405](https://github.com/KronicDeth/intellij-elixir/pull/2405) - [@osbre](https://github.com/osbre) - * Add MacPorts SDK locations to README. -* [#2404](https://github.com/KronicDeth/intellij-elixir/pull/2404) - [@KronicDeth](https://github.com/KronicDeth) - * Update build to elixir 1.13.0 - * Add support for `**` operator to lexer and parser. Port elixir-lang/elixir#11241 -* [#2436](https://github.com/KronicDeth/intellij-elixir/pull/2436) - [@KronicDeth](https://github.com/KronicDeth) - * Color settings for each sigil name. Both the interpolating (lower case) and literal (upper case) name use the same - settings. -* [#2202](https://github.com/KronicDeth/intellij-elixir/pull/2202) - [@KronicDeth](https://github.com/KronicDeth) - * Add support for stepped ranges Port elixir-lang/elixir#10810 - * Regression test for #2200 - * Update CI - * Update to Elixir 1.12.3 - * Update to Erlang 24.1.6 -* [#2447](https://github.com/KronicDeth/intellij-elixir/pull/2447) - [@KronicDeth](https://github.com/KronicDeth) - * Use `getUsageViewTreeTextRepresentation` to check find usages. - * Regression test for #2374. -* [#2448](https://github.com/KronicDeth/intellij-elixir/pull/2448) - [@KronicDeth](https://github.com/KronicDeth) - * Regression test for #2386 Issue #2386 had the same root cause (OtpExternalFun not being decompiled correctly) as - Issue #2410, so Issue #2386 was fixed by Pull Request #2441, but since @alexxero was nice enough to upload - the `.beam` file for Issue #2386, I might as well add it as a regression test too. -* [#2453](https://github.com/KronicDeth/intellij-elixir/pull/2453) - [@KronicDeth](https://github.com/KronicDeth) - * Regression test for #2446 -* [#2642](https://github.com/KronicDeth/intellij-elixir/pull/2642) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore `()` as a type parameter as it occurs during typing. -* [#2643](https://github.com/KronicDeth/intellij-elixir/pull/2643) - [@KronicDeth](https://github.com/KronicDeth) - * Default the variable color if the specific type foreground is `null`. -* [#2644](https://github.com/KronicDeth/intellij-elixir/pull/2644) - [@KronicDeth](https://github.com/KronicDeth) - * Log unknown element for fetching docs from BEAM file. - -### Bug Fixes - -* [#2397](https://github.com/KronicDeth/intellij-elixir/pull/2397) - [@KronicDeth](https://github.com/KronicDeth) - * Restore tests that weren't being run after 2021.3 upgrade. Upgrading to 2021.3 dropped the number of run tests from - 3741 to 1452. This was due to a change in the packaging in 2021.3 that triggered a gradle bug. - - * Fix test broken by missing `markdown` in plugins list Like the need for the `java` plugin to handle - the `com.intellij.modules.java` `depends`in `plugin.xml`, the `org.intellij.plugins.markdown` `depends` - needed `markdown` added to the list to make some of the tests work. The failed tests weren't being run before - after the 2021.3 upgrade. - * Manually include tests instead of scanning. Work-around gradle/gradle#18486 as described - in https://jetbrains-platform.slack.com/archives/C5U8BM1MK/p1637955960051600?thread_ts=1637923961.040000&cid=C5U8BM1MK - that affects running tests with ideaVersion 2021.3. - * Rename ParsingTestCases with improper capitalization -* [#2404](https://github.com/KronicDeth/intellij-elixir/pull/2404) - [@KronicDeth](https://github.com/KronicDeth) - * Decompile `{:|, ..., ...}` as cons operator in Elixir Dbgi. - * Fix missing guards when decompiling Elixr DbgI clauses using special decompiler Guards where missing because - only `decompiler.appendSignature` was used. - * Fix __module__.Reference.calculateDefaultRangeInElement - `element.textOffset` instead of `element.textLength` was used for end of range. -* [#2436](https://github.com/KronicDeth/intellij-elixir/pull/2436) - [@KronicDeth](https://github.com/KronicDeth) - * Restore colors for char lists and strings lost with the PSI changes in e71b247. -* [#2441](https://github.com/KronicDeth/intellij-elixir/pull/2441) - [@KronicDeth](https://github.com/KronicDeth) - * Render `OtpErlangExternalFun` correctly as remote captures (`&Mod.fun/arity`). Fixes - decompiling `Ecto.Changeset.validate_number`. -* [#2445](https://github.com/KronicDeth/intellij-elixir/pull/2445) - [@KronicDeth](https://github.com/KronicDeth) - * Protect ExUnit configuration `Producer` from `ElixirFile` without `VirtualFile`. -* [#2447](https://github.com/KronicDeth/intellij-elixir/pull/2447) - [@KronicDeth](https://github.com/KronicDeth) - * `Unquote.treeWalkUp` no longer assumes that the final argument to `unquote` is a `Call`. - * Fix Find Usages for call definitions - * Don't resolve primary Find Usages element. The primary element passed to `FindUsageHandler` is now already - resolved, so resolving it again for call definitions finds usages of `def`, `defmacro`, etc. - * Since the element passed to `FindUsagesProvider#canFindUsageFor`, definers can no longer be excluded, so remove - that check. -* [#2449](https://github.com/KronicDeth/intellij-elixir/pull/2449) - [@KronicDeth](https://github.com/KronicDeth) - * Don't highlight `Quote` or `Sigil` as normal text if part of documentation. Since the annotators will run in - arbitrary order, the `Textual` annotator has to avoid annotating the same nodes as the `ModuleAttribute` annotator - or the colors can get interleaved. -* [#2450](https://github.com/KronicDeth/intellij-elixir/pull/2450) - [@KronicDeth](https://github.com/KronicDeth) - * Put `ENTRANCE` and Initial Visited Element in `__module__.Resolver`. -* [#2452](https://github.com/KronicDeth/intellij-elixir/pull/2452) - [@KronicDeth](https://github.com/KronicDeth) - * Keep searching when resolving type parameters if bitstring is encountered. -* [#2453](https://github.com/KronicDeth/intellij-elixir/pull/2453) - [@KronicDeth](https://github.com/KronicDeth) - * Fix `UnaliasedName.unaliasedName` for atoms. - * Restore `ElixirAtom#getName` - Lost when parser was regenerated when Elixir <= 1.6 support was dropped - in [679a9689cfe097018b9baa4e894d4550a84d7aac](https://github.com/KronicDeth/intellij-elixir/commit/679a9689cfe097018b9baa4e894d4550a84d7aac) - . - -## v12.0.1 - -### Bug Fixes - -* [#2345](https://github.com/KronicDeth/intellij-elixir/pull/2345) - [@KronicDeth](https://github.com/KronicDeth) - * Override `Override org.elixir_lang.*.configuration.Factory.getId` to fix deprecation warning about the default - implementation being accidentally localizable when it shouldn't be. The Elixir plugin didn't localize these name - using message bundles, so this wasn't an actual risk, but overriding is the only way to silence the error. -* [#2346](https://github.com/KronicDeth/intellij-elixir/pull/2346) - [@KronicDeth](https://github.com/KronicDeth) - * Stop look for qualifier at curly braces for `%{Alias}`. - -## v12.0.0 - -### Breaking Changes - -* [#2179](https://github.com/KronicDeth/intellij-elixir/pull/2179) - [@KronicDeth](https://github.com/KronicDeth) - * Drop support for Elixir <= 1.6. Continuing support for Elixir <= 1.6 required special handling of the language level - to support differences in precedence and operators. Removing the language level tracking allows dropping the `Level` - and `FilePropertyPusher` classes and all their usages, including in the parser grammar and the special `ifVersion` - external rule. It also eliminates the need for tests to setup the SDK since it was only needed to get the - appropriate Level. This makes the tests run in 45 seconds instead of 7 minutes. -* [#2339](https://github.com/KronicDeth/intellij-elixir/pull/2339) - [@KronicDeth](https://github.com/KronicDeth) - * Remove code dependent on the Erlang plugin - [Erlang plugin is not 2021.3 compatible yet](https://github.com/ignatov/intellij-erlang/issues/963#issuecomment-986261646) - -### Enhancements - -* [#2179](https://github.com/KronicDeth/intellij-elixir/pull/2179) - [@KronicDeth](https://github.com/KronicDeth) - * Resolve more calls and bindings in `Ecto.Query` calls - * Resolve bindings in `Ecto.Query.lock/3` - * Resolve bindings in `Ecto.Query.windows/3` - * Walk `preload` binding and expression - * Resolve in `update` for Ecto.Query - * Resolve `fragment` in `with_cte` - * Resolve `binding` and `expr` in `Ecto.Query.dynamic/1-2` - * Resolve `field` in `join(..., on: field(..., ...) ...)` - For `join/5`, descend into the options to look for `on: value` and then walk `value` the same as the value - to `having` or `where` in selects since they're all boolean conditions. - * Extract `ecto.query.Nested` - * Resolve `Ecto.Query.WindowAPI` functions - * Resolve reference variable src in `join(query, ..., [{src, counter}], ..., ...)` - Tuple lists in join have two forms: - 1. `{^assoc, a}` - 2. `{src, counter}` - - The pinned association form was already handled because the second element was checked for a declaration, but the - first element was not, so `src` in (2) could not be resolved. - * `from([..] in ...)` - * Treat `or_having` the same as `having` - * Treat `or_where` the same as `where` - * Treat `having:` the same as `where:` in `from` - * Treat `select_merge` the same as `select` for resolving `Ecto.Query.API`. - * `from(..., [elements])` - * Resolve Ecto reference variables in `left in ...` - * `ModuleWalker` and `NameArityRangeWalker` - Reduce code by abstracting common pattern for walking library APIs. - * `ExUnit` - * Find modules declared in `test`s. - * Resolve call definitions inside `describe` blocks. - * Resolve variables in `assert_receive` and `assert_received`. - * Resolve `alias` to modules defined inside the enclosing `describe` block. - * Walk `assert` expression for variable declarations - * Check for earlier bindings of variables in right operand of `=` in `assert`. - * Resolve `require` `as:` arguments as Aliases - * Decompiler - * Erlang - * Decompile private Erlang functions - * Decompile specs from Erlang DbgI - * Decompile function bodies from Erlang DbgI - * Escape "in" when an Erlang Var in type - * Decompile types from Erlang DbgI Fixes #2017 - * Decompile Elixir function bodies using DbgI - * :erlang./(a, b) -> a / b - * :erlang.*(a, b) -> a * b - * Convert :erlang.==(a,b) to a == b - * Rewrite case to `and` when there is a badbool error too - * Decompile %{__struct__: name, ...} as %name{...} - * Rewrite more :erlang functions to Elixir - * Rewrite case to || - * Rewrite `case expr1 do pat1 -> true; _ -> false; end` to `match?(pat1, expr1)` - * Rewrite `if var do false else true` to `!var` - * Rewrite case to or - * Rewrite case to and - * Rewrite :erlang.error(E.exception(M)) to raise E, M - * Rewrite case statements to if - * Rewrite case statements to && - * Indent all lines of spec macro string in case it is multiple @spec - * Resolve module attributes defined outside the immediate modular lexical scope - * Resolve module attributes registered in `elixir_module.erl` to decompiled source - * after_compile - * before_compile - * behaviour - * compile - * derive - * dialyzer - * external_resource - * on_definition - * Index module attributes Use the index to resolve module attributes when it can't be found directly by tree - walking. - - * Defined with `Module.put_attribute/3` - * Defined with `Module.register_attribute/3` - * Defined in `quote` blocks -* Resolve variables to variables in any `quote` blocks If a variable can't be resolved in the scope, try resolving it - to any variable declared at the top-level of a `quote` block. This helps with certain patterns of `quote` - blocks used in Ecto where a variable's declaration and usage are not in the same `quote` block. -* Simplify CallDefinitionClause resolver for modulars Due to the addition of skipping if the entrance is a child call, - the check for only following siblings is no longer needed. Additionally, that check caused a bug because - the `ElixirStabBody` skipped call definitions because they were new scopes. -* Resolve functions declared with `Mix.Generator.embed_template` and `embed_text`. Also, new system for tracking - resolves paths - `import`s, `defdelegate`, and `use` calls are added to the resolve results after the preferred - elements are chosen for source in the same module. This prevents only the `import` showing because the actual - declaration is in another module or the SDK. -* Record a call as visited in its `treeWalkUp` instead of requiring the caller to do it in the pass `ResolveState` - * Record `quoteCall` as visited in `QuoteMacro.treeWalkUp` - * Record `unquoteCall` as visited in `Unquote.treeWalkUp` - * Record `unlessCall` as visited in `Unless.treeWalkUp` - * Record `ifCall` as visited in `If.treeWalkUp` - * Record `importCall` as visited in `Import.treeWalkUp` - * Record `useCall` as visited in `Use.treeWalkUp` -* More macro specialized in Structure View - * `test` - * `describe` -* Resolve `Qualifer.unquote(variable)(...)` to any definition with correct arity in `Qualifier`. -* Only calculate `element.resolvedFinalArity` once in `resolvedQualified` -* Implementations and Protocols - * Redo icons - * Implementations Go To Protocol line markers - * Go to Super for calls to `defimpl` function/macro Goes to corresponding name/arity in the `defprotocol` that - the `defimpl` implements. - * Go to implementations line marker from defprotocol def - * Go to implementations line marker from defprotocol - * Go To Implementation from individual functions in defimpl - * Go To Implementation from defimpl Alias - * Resolve protocol function to `def` in defprotocol - * Resolve defp inside of defimpl Process declarations inside of implementation the same as modules. -* Stop `prependQualifiers` at top of file -* Walk the false and true (else) branch of unless in Modules or Quote -* Walk the true and false (else) branch of if in Modules or Quote -* Port `preferred` and `expand` system from `Callables` to `Modules`. -* Update CI build dependencies -* [#2199](https://github.com/KronicDeth/intellij-elixir/pull/2199) - [@KronicDeth](https://github.com/KronicDeth) - * Regression test for [#2198](https://github.com/KronicDeth/intellij-elixir/issues/2198). -* [#2201](https://github.com/KronicDeth/intellij-elixir/pull/2201) - [@KronicDeth](https://github.com/KronicDeth) - * Use callbacks as completions for calls. -* [#2223](https://github.com/KronicDeth/intellij-elixir/pull/2223) - [@KronicDeth](https://github.com/KronicDeth) - * Decompiler - * Don't require `MacroNameArity` for `accept`, but use `NameArity` only because no decompiler cares about the macro. - * Tests for Code.Identifier and String.Tokenizer -* [#2226](https://github.com/KronicDeth/intellij-elixir/pull/2226) - [@KronicDeth](https://github.com/KronicDeth) - * Structure View for `EEx.function_from_(file|string)` - * Variants (completion) for functions declared by special macros. - * Functions defined by `EEx.function_from_(file|string)` - * `exception/1` and `message/1` defined by `defexception` - * `*_text/0` and `*_template(assigns)` functions defined by `Mix.Generator.embed_text` - and `Mix.Generator.embed_template`. -* [#2334](https://github.com/KronicDeth/intellij-elixir/pull/2334) - [@KronicDeth](https://github.com/KronicDeth) - * Internal Tool for BEAM Bulk Decompilation Decompile all .beam files in the project, modules and SDKs to check for - errors in the generated Elixir code - * Decompiler - * Erlang Abst - * Log decompilation errors - * Error Reports - * Include system information in error reports Instead of just including the plugin version, also include the - Application name, edition, and version; and the Operation System name and version as these are common follow-up - questions I have. - * Remove tab at start of location for title of issues - * Don't include "java.lang.Throwable: " in title of issues The `Throwable` is necessary to get a stacktrace, but not - a real error. -* [#2339](https://github.com/KronicDeth/intellij-elixir/pull/2339) - [@KronicDeth](https://github.com/KronicDeth) - * Build against `2021.3` - * `runPluginVerifier` in GitHub Actions - * Update IDEA version range supports and verified - * Fix reported compatibility warnings - * Inline deprecated bundle messages - * Don't bundle built-in markdown plugin, depend on it instead - -### Bug Fixes - -* [#2074](https://github.com/KronicDeth/intellij-elixir/pull/2074) - [@Thau](https://github.com/Thau) - * Alternative function clause for `put_event` with `suite_finished` -* [#2179](https://github.com/KronicDeth/intellij-elixir/pull/2179) - [@KronicDeth](https://github.com/KronicDeth) - * StackOverflow fixes - * getElementDescription(ElixirAtom, ElementDescriptionLocation) - Override getElementDescription for atoms to prevent StackOverflow while looking for a provider. - * Don't descend into either branch of `if` or `unless` if entrance in either branch when resolving calls. If the - definition were in one of the branch, it would already have been found on processing previous siblings in - the `ElixirStabBody`. - * Treat child of modulars as being at the same level if nested in `if` or `unless` - Prevents `test` in `if` in `supervisor_test.exs` in `ecto` from stack overflowing. - * Fix StackOverflow when looking for earlier bindings in parameters. - * Don't check following siblings of modulars if entrance is a direct child - - Prevent StackOverflow when trying to resolve embed_template when more than one appears in the same module. - - In general, if the entrance is a child of modular then it can only be defined by a previous sibling, usually - an `import` or `use`, but if the entrance is descendant of a child, then it child then it may be a call to a - function or macro defined in the modular to following siblings of the entrance ancestor child needs to be checked - if the entrance is a forward-call to a later declared function or macro. - * Fix StackOverflowError in ifErlangRewriteTo Don't rewriter :erlang.* to a different :erlang.* - * Adjust nameArityInterval in nameArityInAnyModule Ensures that `fragment/1..` used in a `quote` can resolve to one - in `Ecto.Query.API`. - * Resolve variable that are the only child of `quote` - Ecto loves doing `quote do: query` or other variable names in the code and tests, so record those as declarations to - resolve as invalid results. - * Find enclosing macro call when keyword `do:` is surrounded by parentheses Previously, only `quote do: variable` - would work, but now `quote(do: variable)` also works to find the `quote` call. - * Don't mark fields and keys that are not expected to be resolvable yet as unresolvable in Elixir References - inspection. - * `QualifiedBracketOperation` qualifier - * `StructOperation` qualifier - * Expect qualified `unquote` to only have invalid results. - * Don't mark invalid only results for first chained function call. Don't - report `unquote(schema).__schema__(:source)` - * Don't mark invalid only results for chained function calls. Don't - report `Mix.shell().yes?("Are you sure you want to drop the database for repo #{inspect repo}?") ` - * Don't mark invalid resolved function of call output - * Don't mark invalid resolved keys or fields of call output - * Don't mark invalid resolved function call on keys or fields - * Don't mark parentheses calls on variables if the call does not resolve. Can't find exact valid resolves on - variables yet. - * Don't mark keys or fields on the output of a function call. - * Fix some bugs with `Ecto.Query` calls. - * Add missing `state.put(Query.Call, call)` for `join/3-4` `executeOnIn`. - * Walk the operands of `|>` in `select` expressions. - * Resolve pinned variables as normal instead of as reference variables for Ecto.Query calls. - * Don't walk keywords that cannot declare reference variables. - * `hints` - * `lock` - * `intersect` - * `intersect_all` - * `except` - * `except_all` - * `union` - * `union_all` - * `prefix` - * `preload` - * `offset` - * `windows` - * `limit` - * Don't treat signature for call definition as use of Ecto macro - * Don't generate references to aliases, functions, or types that don't have declarations - * `assoc/2` in `join: .. in assoc(_, _)` in a no parentheses `from` call - * `var` in type restrictions Related to elixir-ecto/ecto#3756 - * `BitString` - `BitString` is recognized in `defimpl ..., for: BitString` to define protocol implementations for `<<..>>`, but - the `BitString` module itself does not exist, so can't be resolved. - * Error reporting - * Ignore `at com.intellij.openapi.diagnostic.Logger` when calculating location for error report titles - * Improve error report format sent to GitHub - * Fix the `event` `message` not being included, which meant that the excerpt wasn't included, so no reproducibility - or element class was available. - * Filter stacktrace to stop at last line from the plugin to limit their size and improve chance of URL being short - enough for GitHub. - * Don't include "What I was doing" section unless user actually fills in the additional information in the UI form. - I'm sick of seeing the issue tracker full of "I don't know what I was doing", which is the default text when no - additional info is given in the UI form. - * Set title to the message at start of exception and first `at` that isn't from the `errorreport.Logger` instead - of `[auto-generated]` as this is the pattern I follow when renaming manually. - * Handle `alias __MODULE__.{...}` in prependQualifier Fixes #2153 - * Log error, but don't fail with TODO() for unknown strippedQualifier or null qualifier Fixes #2153 - * Go To Declaration for captures - * Don't allow name to be acceptable named parent in `&name/arity`. Resolves #488 Allows Go To Declaration on `name` - and not just on `/arity`. - * Don't allow `Mod.name` to be acceptable named parent in `&Mod.name/arity`. Resolves #488 Fixes #2101 - - Allows Go To Declaration on `name` and not just on `/arity`. - * Resolve `&name/arity` and `&Mod.name/arity` using same code as callables. Fixes resolving &Mod.name.arity and - ensures that special handling for weird definitions for callables also apply to captures. - * Resolve `__MODULE__` in `quote` to `defmacro __MODULE__` in `Kernel.SpecialForms` - * Performance - * Fix String.Unicode decompiled being PlainText instead of Elixir - `String.Unicode` when decompiled using all information from `DbgI` was 161,171 lines long, which made the - JetBrains API treat it as plain text instead of Elixir. Being that long also made it freeze the UI while being - decompiled. - - Now, don't even attempt to use the `DbgI` if the function has more than 10 clauses. - * Don't decompile private macros and functions if > 500 definitions in one module. - * If body cannot be decompiled, decompile as one-liner with `...` body - * Don't decompile Abst clause bodies that exceed 1024 bytes. - * Decompile Erlang one clauses as Elixir one-liners - * Fix resolving type specs - * Find `ancestorTypeSpec` for qualified type used in parentheses in anonymous function type in an alternation - - ``` - @type run :: ((Ecto.Repo.t, changes) -> {:ok | :error, any}) | {module, atom, [any]} - ``` - * Resolve type parameters used in inline anonymous function types - * Resolve callback heads to themselves when they have type restrictions using when - * Ignore literal parameters - * Decimals - * Aliases - * Check left operand of `\\` for type parameters as they could appear when copying def with defaults. - * putInitialVisitedElement in variable.Variants Fixes #2002 - * Walk `defdelegate`s when walking `import`s Fixes resolving `config` from `use Mix.Config` as it delegates - to `Config` - * Resolve variables used in `match?` guards to pattern declaration Resolves `on_delete` - in `match?(%{on_delete: on_delete} when on_delete != :nothing, reflection)` - * Implementations and Protocols - * Fix calculating definition for stubs of defimpl with `for:` - There was no clause for defimpl being arity 3, which is the case when there is the (1) protocol (2) `for:` - and (3) `do` block. Not having a definition meant that the `defimpl protocol, for: struct do` would be in AllName - index, but not ModularName. - * Get name of enclosing modular for defimpl without `for:` - * Store if stubs are guards - * Decompiler - * Surround `case` statements with parentheses when used in `cond` clause conditions - * Convert OtpErlangString to OtpErlangList for tuple and call argument lists - * Escape ESC character as \e - * Handle Clause arguments being OtpErlangString - * Handle tuple elements being an OtpErlangString - * Add missing `.` after callee when it is a module or fn - * Protect from `Macro.toString(macro)` StackOverflowError when decompiling body of function clauses - * Don't print function names as atoms in captures - * Escape `\x` to `\\x` in OtpErlangStr - * Fix rewrite of :erlang calls - * Surround type unions with parentheses Prevents parsing problems with unions in guard (when) clauses - * Don't use `prependIndent` because it indents blank lines too. This doesn't match `mix format` or the IntelliJ - Elixir formatting. - * Erlang - * Escape fn Erlang variable - * Escape Erlang char \ as \\ - * Don't append lines for clauses or `after` in Erlang `receive` when decompiling if empty. - * Use `Infix`, `Prefix`, and `Unquote` decompolers for Erlang Abst chunk in addition to DbgI chunk - * functions - * typesepcs - * Use `function.macroNameArityMacro.macro` when decompiling Erlang Abst clauses. Don't use `def` anymore when - unexported and therefore private; use `defp` instead. - * Remove space after `...` in decompiled private types. - * Process imports for calls Imports were previously only processed inside of Modules and not in general, which means - that imports in the file were not processed, which is needed for `association.ex` in Ecto. - * Classify ..// as OTHER instead of NOT_CALLABLE, so that it is escaped as a key. - * Fix Macro.ifCaptureModuleNameArity - * Resolve variable to parameter in `%parameter{}` patterns for struct names - * `Unquote.treeWalkUpUnquoted` through tuples - * `Quote.treeWalkUp` through `case` - * Stop searching on numerical index in binding - * Stop searching if atom in wrong place in binding Stops invalid binding test from erroring when resolving it. - * Turn off `tailrec` because it doesn't work correctly for `ElixirAccessExpression` - * Stop searching for qualifier when `ElixirUnqualifiedNoParenthesesManyArgumentsCall`. -* [#2199](https://github.com/KronicDeth/intellij-elixir/pull/2199) - [@KronicDeth](https://github.com/KronicDeth) - * Stop highlighting types when `unquote_splicing/1` is reached. - `unquote_splicing` is being used to splat arguments or fields of a struct into the type. The arguments - to `unquote_splicing` are normal calls or variables, not types. -* [#2201](https://github.com/KronicDeth/intellij-elixir/pull/2201) - [@KronicDeth](https://github.com/KronicDeth) - * Implement `call_definition_clause.Variants#executeOnCallback` -* [#2204](https://github.com/KronicDeth/intellij-elixir/pull/2201) - [@KronicDeth](https://github.com/KronicDeth) - * `CallDefinitionClause.time/1` - * Mark guards as runtime. - * Mark anything unknown as runtime too. - * Log unknown calls. -* [#2207](https://github.com/KronicDeth/intellij-elixir/pull/2207) - [@KronicDeth](https://github.com/KronicDeth) - * Check if `Call` `isValid` before using `containingFile` for `locationString`. -* [#2208](https://github.com/KronicDeth/intellij-elixir/pull/2208) - [@KronicDeth](https://github.com/KronicDeth) - * Check if `project` is not dumb in `nameArityInAnyModule`. -* [#2209](https://github.com/KronicDeth/intellij-elixir/pull/2209) - [@KronicDeth](https://github.com/KronicDeth) - * Take `resolveInScope` only if at least one valid Checking only for an empty collection allowed any prefixes in the - scope to override exact matches in anywhere indexed, which meant that `Ecto` in `defmodule Ecto.Adapter do` - resolved to itself instead of the exact `defmodule Ecto do`. -* [#2214](https://github.com/KronicDeth/intellij-elixir/pull/2214) - [@KronicDeth](https://github.com/KronicDeth) - * When regenerating the parser, `ElixirVisitor` is also regenerated. When it was regenerated it lost the bug fix - for `#visitLiteralSigileLine` calling itself. Added a regression test, so that this can't happen again. -* [#2223](https://github.com/KronicDeth/intellij-elixir/pull/2223) - [@KronicDeth](https://github.com/KronicDeth) - * Ecto - * Walk keyword keys as right operand of `in` in `from` - * Resolving type references - * Walk struct operations for type parameters - * Check keyword values for type parameters - * Check operands of two operations for type parameters - * Stop looking for type parameters on qualified or unqualified alias - * Decompiler - * Only unquote `in` when an Erlang function, otherwise, use operators the same as Elixir for defs and calls. - * Fix apply Erlang arguments, so that they are inside `[]`. - * Quote keyword keys containing `-` - Fixes decompiling of `Elixir.Phoenix.HTML.Tag.beam` - * Use apply with escaped atom when Erlang function call is an Elixir operator - * Port String.Tokenizer.tokenize for use in Identifier.inspectAsKey I was putting off porting all - of `Identifer.inspectAsKey` by adding special cases as needed, but the decompiler kept having bugs, so port all of - it including `String.Tokenizer.tokenize`. It will also work for unicode characters now too. - * Resolve calls that are unquoted values to search for quote blocks in those functions. - * Stop looking for qualifiers to prepend when reaching `=>` - * The parent argument to AccumulatorContinue.childExpressionsFoldWhile should be this and not parent When converting - to an extension function I left `parent` in place because the argument is called `parent`, but since it is an - extension function that value because `this.parent` when it really should have been `this`. Using `this.parent` - meant it would ask for the parent's children and keep looping back to `this`. - * Don't use `tailrec` in function with any body-recursion. It causes issues with `ElixirAccessExpression` recursion - sometimes. -* [#2226](https://github.com/KronicDeth/intellij-elixir/pull/2226) - [@KronicDeth](https://github.com/KronicDeth) - * Implement completion for functions declared with `defdelegate`. - * Fix `LookupElementPresentation.putItemPresentation` `addTailText`. Only append suffix of `presentableText` if it is - prefixed by `itemText`. -* [#2334](https://github.com/KronicDeth/intellij-elixir/pull/2334) - [@KronicDeth](https://github.com/KronicDeth) - * Decompiler - * Elixir - * Decompile local function calls in Elixir DbgI using inspectAsFunction While remote calls - used `inspectAsFunction`, local calls just used the `atomValue`, which meant names that needed to be unquoted - weren't and caused parsing errors. - * Erlang Abst - * Decompile Erlang Abst string with OtpErlangList as strings with non-ASCII codepoints Fixes unknown string format - in `idna.beam` - * Always group for comprehensions in sequence even if there is only 1 element Some forms of `for` - comprehensions cannot be used as the sole argument of a call unless surrounded by parentheses, so always add - those parentheses. - * Decompile Erlang Abst record empty record fields as `[]` for updates - * Decompile Erlang Abst `left xor right` as `:erlang.xor(left, right)` - Elixir does not have a logical xor infix operator, so have to decompile as normal function call - * Decompile Erlang Abst named anonymous function as a macro Named anonymous functions are support in Erlang, but - not Elixir, so fake it as a macro when decompiling. - * Add builtin-types for Erlang Abst - * `bitstring` - * `float` - * `nonempty_improper_list` - * `nonempty_maybe_improper_list` - * Decompile tagged atoms and other complex expression as function name in Abst capture - * Decompile Erlang Abst `float` - * Decompile Erlang Abst `begin` blocks as parenthesized groups separated by ; - * Decompile empty OtpErlangList as "" in Erlang Abst `string` - * Track if decompiled Erlang Abst contains do blocks so that they can be surrounded by parentheses when necessary - * Fix decompiling Erlang Abst `record_index` when record name needs to be unquoted - * Decompile `map` updates in Erlang Abst - * Erlang Abst Function capture names are OtpErlangAtom and not tagged Atoms - * Inspect local function names as atoms instead of as functions when apply/3 is used for operations and unquoted - in Erlang Abst Stops `:unquote(:"NAME")` from happening - * Surround anonymous function definitions that are called immediately with parentheses and call arguments with .( - in Erlang Abst - * Decompile `field_type` in Erlang Abst Fixes decompiling `hipe_icode_call_elim.beam` - * Inspect type name usages as local functions to ensure invalid names are unquoted - * Inspect type names as local functions to ensure invalid names are unquoted - * References - * Stop looking for qualifiers to prepend when exiting interpolation - * Don't safeMultiResolve null call.reference in resolvesToModularName - * Types - * Fix highlighting types declared with unquote and no secondary parentheses - * Performance - * Don't error if a private function mirror cannot be found Private functions are not decompiled if there are too - many public functions. - * Fix CallDefinitionImpl.isExported Used to be hard-coded to return `true`, but this pre-dated decompiling private - functions. Now with decompiling private functions, isExported needs to defer to the `Definition` and count as - unexported if a private function, macro, or guard. -* [#2337](https://github.com/KronicDeth/intellij-elixir/pull/2337) - [@KronicDeth](https://github.com/KronicDeth) - * Walk map constructin arguments, associatons, and variables when resolving type parameters. -* [#2339](https://github.com/KronicDeth/intellij-elixir/pull/2339) - [@KronicDeth](https://github.com/KronicDeth) - * Don't use `PluginId.findId` that doesn't exist in 2021.1.X - -## v11.13.0 - -### Bug Fixes - -* [#2035](https://github.com/KronicDeth/intellij-elixir/pull/2035) - [@theqp](https://github.com/theqp) - * Remove bintray repositories. - -### Enhancements - -* [#2035](https://github.com/KronicDeth/intellij-elixir/pull/2035) - [@theqp](https://github.com/theqp) - * Update build to IntelliJ IDEA 2021.2. - * Upgrade to Gradle 7.1.1. -* [#2036](https://github.com/KronicDeth/intellij-elixir/pull/2036) - [@KronicDeth](https://github.com/KronicDeth) - * Expand compatibility range to 2021.1.2-2021.2. - -## v11.12.0 - -### Bug Fixes - -* [#1988](https://github.com/KronicDeth/intellij-elixir/pull/1988) - [@KronicDeth](https://github.com/KronicDeth) - * Only descend into modular children of modular for Module scope. Prevents recursion loops on use calls. - * Don't search for unquoted variable value variable is value for `do:`. - * Protect from `IndexNotReady` in `resolver.Module.multiResolveProject`. - * Stop walking unquoted variable that resolves to a parameter. - * Walk case in `__using__` to find quote in any clause. Fixes resolving test macro from `use PowerAssert` - * Resolve functions declared in `quote`'s scope when `block` injected with `unquote(block)`. Fixes resolving `field` - , `timestamps`, and `index` in `schema` for `use Yacto.Schema` as it makes the `block` see the `import Yacto.Schema` - above `unquote(block)` in the `quote` in `schema(..., do: block)`. -* [#1990](https://github.com/KronicDeth/intellij-elixir/pull/1990) - [@KronicDeth](https://github.com/KronicDeth) - * Convert MissingSDK errors for Dialyzer into Notifications. -* [#1993](https://github.com/KronicDeth/intellij-elixir/pull/1993) - [@KronicDeth](https://github.com/KronicDeth) - * Log element in psi.scope.Type instead of using `TODO()` - Error will still be reported, but there will be enough information to triage and since `true` is returned now it - won't stop the type resolving from working. -* [#1994](https://github.com/KronicDeth/intellij-elixir/pull/1994) - [@KronicDeth](https://github.com/KronicDeth) - * Add missing mix deps options to non-path influencing list: - * env - * manager - * repo - * sparse - * submodules - * system_env -* [#1995](https://github.com/KronicDeth/intellij-elixir/pull/1995) - [@hurricup](https://github.com/hurricup)] - * Fix incorrect `OuterElementType` in `eex.lexer.TemplateData`. The `EEX` `IElementType` needs to - use `OuterLanguageElementType` instead of the direct `eex.psi.TokenType`. -* [#1996](https://github.com/KronicDeth/intellij-elixir/pull/1996) - [@KronicDeth](https://github.com/KronicDeth) - * Run `QualifiedAlias#text` in `runReadAction` for `QualifiedAlias#name` -* [#1997](https://github.com/KronicDeth/intellij-elixir/pull/1997) - [@KronicDeth](https://github.com/KronicDeth) - * Return `null` `Chunk` instead of throwing `IOException` when read incomplete. Incomplete reads happen often due to - incomplete writes to the file system being read in. As such, they shouldn't generate error reports and instead - should be silently ignored. -* [#1999](https://github.com/KronicDeth/intellij-elixir/pull/1999) - [@KronicDeth](https://github.com/KronicDeth) - * Implement `beam.FileEditor#getFile` to fix `DeprecatedMethodException` as the default implementation is now - deprecated and requires an explicit implementation. - * Use `TabbedPaneWrapper.AsJBTabs` instead of `JBTabbedPane` for "BEAM Chunks" tabs. I'm not sure why `JBTabbedPane` - stopped showing its labels sometime in the 2020.X IDE version series, but by debugging when "BEAM Chunks" name was - retrieved I found that the bottom tabs used `TabbedPaneWrapper.asJBTabs`. Using that, the labels reappeared. -* [#2000](https://github.com/KronicDeth/intellij-elixir/pull/2000) - [@KronicDeth](https://github.com/KronicDeth) - * Don't require Alias qualifier to be a `PsiNamedElement`. It can be an `ElixirAtom` and getting the reference will - still work. -* [#2001](https://github.com/KronicDeth/intellij-elixir/pull/2000) - [@KronicDeth](https://github.com/KronicDeth) - * `Any.isDecompiled` for `CallDefinitionHead`. - -### Enhancements - -* [#1988](https://github.com/KronicDeth/intellij-elixir/pull/1988) - [@KronicDeth](https://github.com/KronicDeth) - * Find `Dep`s in function calls in the `deps()` list. - * `Dep.putPath` from a variable. - * Treat `Memoize` `defmemo` as `def` and `defmemop` as `defp`. - * Resolve `exception/1` and `message/1` to `defexception`. - * Resolve to callbacks when searching in any module. - * Support arity intervals for unquote_splicing in parameters - - Functions defined with unquote_splicing, such as `Ecto.Schema.__schema/2`: - - ```elixir - for clauses <- Ecto.Schema.__schema__(fields, field_sources, assocs, embeds), {args, body} <- clauses do def __ - schema__(unquote_splicing(args)), do: unquote(body) - end - ``` - - Need to have their arity not be the number of PsiElements in the parentheses. Any call to `unquote_splicing(...)` - can end up have 0 to infinite parameters, so it means when one is saw, the range of `minimum...maximum` should - change to an open interval of `minimum...`. This required changing `IntRange resolvedFinalArityChange()` - to `ArityInterval resolvedFinalArityInterval()` on all `Call`s, which was a large change. It also meant changing a - lot of ArityRange types to ArityInterval, and NameArityRange to NameArityInterval, which influenced the variable - names. - - Since all Calls support ArityIntervals now and not just special forms and Ecto DSLs, exportArity is changed to - always state the ResolveState, so that the special form changes can be integrated for all callers. - - The actual implementation of CallImpl.resolvedFinalArityRange is changes to fold over the ArityInterval: - * Normal arguments increase the minimum and maximum. - * Default arguments increase only the maximum. - * unquote_splicing changes the maximum to null to indicate the interval is half open. - -## v11.11.0 - -### Enhancements - -* [#1948](https://github.com/KronicDeth/intellij-elixir/pull/1948) - [@KronicDeth](https://github.com/KronicDeth) - * Reference Resolution - * Allow any Alias in a chain to have references. This allows going to the declaration of `Phoenix` - , `Phoenix.LiveView`, or `Phoenix.LiveView.Socket` depending on whether you're on the `Phoenix`, `LiveView`, - or `Socket` Alias, respectively, in the chain. - * Allow any Alias in Qualified Alias to be resolved This allows going to the declaration of Phoenix, - Phoenix.LiveView, or Phoenix.LiveView.Socket depending on whether you're on the Phoenix, LiveView, or Socket - Alias, respectively, in the chain. - * Update DocumentationProvider to work with improved Alias resolution - - Without these changes the DocumentationProvider double-resolves and so ends up showing the docs for `def` - and `defmodule`, instead of the call definition clause or module, respectively. - * Reimplement Module references Instead of references for only the outermost QualifiableAlias, there is a reference - for each right-most Alias at a given position, so instead of there only be a reference to `App.Context.Schema` - in `App.Context.Schema`, there is now a reference to `App` in the `App` prefix, a reference to `App.Context` - in `Context` in `App.Context`, and a reference to `App.Context.Schema` in `Schema` - in `App.Context.Schema`. Not only is this more useful, being able to jump to parent namespaces, but it fixed some - of the capability issues with Go To Definition in the 2020 line of IDEs. This approach of - using `getRangeInElement` to target the range of the right-most Alias, while the element was still the parent that - contained, but did not go beyond the Alias, was tried after having references only on `Alias`es and - not `QualifiedAlias`es did not fix completion issues. It was the while debugging Go To Declaration actions and - noticing they were sensitive to the range in element AND - the [docs for PsiReference#getRangeInElement](https://github.com/JetBrains/intellij-community/blob/f66e9644fa683fba22f4ce9e30c037720f745989/platform/core-api/src/com/intellij/psi/PsiReference.java#L49-L62) - that I realized that the Go To Declaration and Completion has a hidden requirement that References for things that - behave like namespaces have to work this way. - * Use `ModularName` index for Module Variants Have a smaller index to iterate and remove need for the `isAlias` - check. - * Limit Elixir Module resolution to same JetBrains Project Module - * Change the `GlobalSearchScope` from `allProject` to `moduleWithDependenciesAndLibrariesScope` for faster - searching on multi-module projects. - * Set `includeTests` based whether the referring element is in a test directory. - * Use `StubIndex#processElements` instead of home grown `forEachNavigationElement` as `processElements` is more - efficient. - * Favor Module `ResolveResults` under same `Module` content roots This should favor deps sources in the same module. - * Iterate `function` body in `unquote(function())` when iterating call definition clauses in `quote` - Treats it `function` body the same as a `__using__` body. - * Standardized preferred `ResolveResult` filters between Callables and Modules - - 1. Prefer valid results as long as it doesn't leave no results. - 2. Prefer results in the same module as long as it doesn't leave no results. - - In Go To Declaration also: - - 3. Prefer results in source (that aren't decompiled) as long as it doesn't leave no results. - * Use the second argument to `use` to determine which function is called with apply/3 - - This pattern is used in Phoenix `__using__`, so this lets to differentiate whether `Plug.Conn.assign/3` - or `Phoenix.LiveSocket.assign/3` is resolved in a Controller, LiveComponent, or LiveView. - * In LEEx Templates - * Resolve function calls in `*.html.leex` templates to functions defined in the corresponding LiveComponent/View - module. - * Assigns - * Resolve assigns in LEEx templates to the keyword key in `assign/3` calls in `update/2` in the LiveComponent or - LiveView Had to add back in a `TargetElementEvaluator`, so that the `UnqualifiedNoArgumentCall` (`name`) that - is the identifier in an assign (`@name`) was not counted as valid target for Find Usages / Go To Declaration - by itself. - * Search for assigns in all call definitions in view module Expand from just `update` to any call definition to - cover helper functions and other callbacks. Don't stop on the first valid match because with helper functions - and multiple callbacks, the last write isn't obvious. - * Resolve assigns set with `assign/3` - * Look for `assign` calls in `|>` pipelines - * Resolve assigns set with `assign_new/3` - * Resolve @live_action to where it is assigned Phoenix.LiveView.Channel.assign_action/2 - * Find assigns in maps for assign/2 Since assign/2 accepts either a keyword list or a map, check in both types. - * Resolve @myself to where it is set in `render_pending_components` - * Resolve assigns in macros with do blocks like `case` and `if` - * Find assigns in `live_component` calls If an assign can't be found in the body of a LiveComponent module, then - it maybe passed through from the `live_component` call itself, so look for any references to the view module ( - the LiveComponent) and if it is a `live_component` call, then look at those assigns to try to resolve the - assign name. - * Resolve assigns to `live_modal` calls - `live_modal` is not built into `phoenix_live_view`, but it is generated by `phx.gen.live`, so most projects - will have it. This allows `return_to`, which is used use in `live_modal`, to be resolved. - * Resolve `@socket` to last socket variable or call in view module. - * Resolve `@flash` to `put_flash/3` calls. - * Resolve `@inner_content` to `Phoenix.LiveView.Utils.to_rendered/2` setting the assign with `put_in` - * Resolve aliases in `.leex` templates Generalize the `.leex` and `use` walking from call definition clauses to - any scope processor lambda, so it can be used to resolve uses of `Routes` in `.leex` templates. - * Resolve Types - * Have separate references specifically for Types. - * Resolve to both types declared with `@type`, `@typep`, or `@opaque`; and named type parameters. - * Process declarations for `@type`, `@typep`, and `@opaque`. - * Count `@callback` as declaring a Type - * Resolve type `t` for `defprotocol` to where it is defined in `Protocol.__protocol__` - Unfortunately, this ties all protocol's `t` to the same element, so Find Usage finds all protocol's types - instead of just a specific module's type, but this works for projects that have source, but not yet compiled. - * Favor protocol-specific decompiled `@type t` when available. - * Resolve type variable to the keyword key in guards. - * `__MODULE__` - * Favor source over decompiled per name instead of overall for `ResolveResultOrderedSet` - This allows the `Routes` alias to be resolved to the both the `MyAppWeb.Router.Helpers` - in `alias MyAppWeb.Router.Helpers, as: Routes` in the source of `MyAppWeb`, but also the - decompiled `MyAppWeb.Router.Helpers`, which is necessary as `MyAppWeb.Router.Helpers` is produced on compile - from `router.ex`. - * Resolve references through `defdelegate` calls. - * Resolve `code_reloading?` in MyApp.Endpoint - - The generated `MyApp.Endpoint` for `mix phx.new` has a section to enable code-reloading at compile time: - - ```elixir - # Code reloading can be explicitly enabled under the - # :code_reloader configuration of your endpoint. - if code_reloading? do socket("/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket) - plug(Phoenix.LiveReloader) - plug(Phoenix.CodeReloader) - end - ``` - - Previously, `code_reloading?` variable would not resolve because psi.scope.Variable ignored `use` calls, - not `use` calls are entered and the `var!(code_reloading?)` is found in `Phoenix.Endpoint.config/1` by way of - the `unquote(config(opts))` call in the `quote` block in `__using__(opts)`. - * Resolve qualified calls with unknown resolvable qualifier using only relative identifier and arity. - * `@spec` - * Resolve `@spec` to `defdelegate` calls. - * Resolve @specs to the definitions if the definitions are in a for comprehension - * `Ecto` - * `Query` - * Resolve reference variables in `Ecto.Query` - * Reference variables are introduced in as the left operand of `in` passed to `from/2` and - the `join:` keyword in `from/2`. - * `join/3-5` - * Resolve bindings in `select/2-3`. - * Resolve reference variables in `where/2,3` binding. Also add support for resolving `a` - in `[{^assoc, a}]` binding. - * Resolve `bindings` in `group_by/2-3`. - * Resolve `bindings` and `expressions` in `order_by/2-3`. - * Resolve `bindings` in `having/2-3`. - * Add `select_merge` to declaring `Ecto.Query` macros. - * Add `distinct/2-3` as a declaring `Ecto.Query` macro. - * Resolve `field` calls in Ecto `schema` blocks - - How `field` works in `schema` for `Ecto.Schema` - 1. `use Ecto.Schema` - 2. `Ecto.Schema.__using__` - 3. `import Ecto.Schema, only: [schema: 2, embedded_schema: 1]`` - - Note that only the outer DSLs, schema and embedded_schema are available even though field/2 is defined - in Ecto.Schema. - - So when you call `schema ... do` - 1. `defmacro schema(source, [do: block])` - 2. `schema(__CALLER__, source, true, :id, block)` - 3. `defp schema(caller, source, meta?, type, block)` - 4. There's a big `prelude = quote do` quote block - - At the end of prelude there is - - ```elixir - try do - import Ecto.Schema - unquote(block) - after - :ok - end - ``` - - Hey! An `import Ecto.Schema`, but `prelude` is just floating as a variable. At the end - of `defp schema(caller, source, meta?, type, block)` is - - ```elixir - quote do - unquote(prelude) - unquote(postlude) - end - ``` - - So to statically analyze an `Ecto.Schema` module. - - 1. Resolve `schema/2` to `defmacro schema` by walking the `use`, `__using__`, `quote`, and `import`. - 2. Inside the `schema/2` (or macros in general if you want to get fancy 💅 and support more DSLs), - 3. Go into the body of the macro. If there's a call, resolve it - 4. Go into the called function - 5. Look for a `quote` block at the end (the same as my current `__using__` support) - 6. If there's a `Call` inside an `unquote` see if you can resolve it to a variable in addition to a - call definition (which is already supported for Phoenix). - 7. If it's a variable, check it's value. If it's a `quote`, use the quote block handling - 8. In the quote block handling add support for `try` - 9. Walk the `try` and see the `import`, walk the `import` to find `Ecto.Schema.field/2` - * `API` - * Resolve `Ecto.Query.API` functions in `Ecto.Query` - * `from(order_by: ...)` - * `from(select: ...)` - * `from(select: tuple())` - * `from(where: ...)` - * `group_by/2-3` - * `having/2-3` - * `select/2-3` `expr` argument - * `where` - * Resolve `Ecto.Query.API.fragment` to arity interval `0..`. - * Resolve `fragment` nested in other `Ecto.Query.API` call like `type`. - * Walk `rightOperand` of `join(..., ... in ..., ...)` for `Ecto.Query.API` usages like `fragment`. - * Resolve module attributes defined in `use` `__using__` `quote` block - * Change `org.elixir_lang.reference.resolver.ModuleAttribute` to use `PsiScopeProcessor` for non-`@for` and - non-`@protocol` instead of custom logic. - * Don't descend into a `use` if the `ENTRANCE` is an ancestor since that means the `Alias` on the `use` is - probably being resolved. - * `AtUnqualifiedNoParenthesesCall.processDeclarations` will call `processor.execute` when it isn't a type - spec. - * The `UseScopeSelector` for `AtUnqualifiedNoParenthesesCallImpl` has been changed - to `SELF_AND_FOLLOWING_SIBLINGS` since the module attribute is used that way. The previous `SELF` value - was when the `UseScopeSelector` only applied to variables. - * "Elixir References" inspection for finding unresolved or invalid references. - * `visitAtNonNumericOperation` - Helps "Elixir References" find unresolved assigns. - * Strip `AccessExpression`s from `Qualified` qualifiers automatically - * Documentation - * Show `deprecated`, `impl`, and `spec`, and actual heads in documentation for source functions - * Merge `Documentation` across multiple arities when arity of lookup is ambiguous. - * Find variables defined in EEx element Finds variables defined in EEx PsiElement by creating them the same as a - StabBody, which means that the siblings are checked backwards from the last parent. This fixes resolving the `f` - from `f = form_for ...` in `*input f ...` in LiveView FormComponent templates. - * Highlight named parameters in types. - * Decompilation - * Fake built-in types by decompiling in `:erlang.beam` - For type reference resolution of built-in types to work, they need to be defined somewhere. IntelliJ Erlang does - this by looping usages back on themselves, but this leads to Find Usages not working for built-in types since each - usage is a distinct declaration. By instead defining the types in decompiled `:erlang.beam` (even though they - aren't actually defined there), there is a shared location for all reference to point to and then check for Find - Usages. - * Decompile types from EEP-48 documentation. - * Descend into body of `unless` in `quote` for `treeWalkUp`. - * Descend into `for` when looking for call definition clauses. - * `QuoteMacro.treeWalkUp` into `if` - `unless` was already walked, but not `if`. Fixes resolving `Repo.preload/2`, which is defined inside an `if` - in `use Ecto.Repo`'s `__using__`. - * Add `defguard` and `defguardp` to CallDefinitionClause.`is`. - * Don't generate a reference for `Elixir` - `Elixir` is not declared anywhere. It is the namespace of all Aliases. - * Refactor how sibling sequences are walked Port filtering out comments, white space and end of expressions - from `siblingExpression`. - * Reimplement `fullyQualifiedName` - - Eliminate the specialization for `ElixirAlias` AND `QualifiableAlias` as which was picked as based on the static - casted type. `fullyQualifiedName` will include the following: - * Convert `__MODULE__` to the enclosing modular canonical name - * Combine an ElixirAlias with its qualifier - * If in a `ElixirMultipleAliases` will combine the qualifier (`qualifier.{...}`) outside the `{}` with the - relative name inside `...{relative, ...}`. - * EEx - * `viewFile` for `.eex` files used in same directory as `.ex` using `EEx.function_from_file`. - * Resolve function calls to those defined by `EEx.function_from_file/3-5`. - * Find view modules for templates under the `templates` directory. - * Walk `quote` macros for sibling call definitions - * Always fallback to name/arity in any module if callable not resolved in scope - * Resolve uses of aliased name produced by `alias __MODULE__` -* [#1967](https://github.com/KronicDeth/intellij-elixir/pull/1967) - [@KronicDeth](https://github.com/KronicDeth) - * Updates - * IntelliJ IDEA build version to 2021.1.2 - * Update `ParsingTestCase` to latest APIs. - * Gradle plugins - * intellij 1.0 - * kotlin.jvm 1.5.10 - * Configure `runPluginVerifier` - -### Bug Fixes - -* [#1948](https://github.com/KronicDeth/intellij-elixir/pull/1948) - [@KronicDeth](https://github.com/KronicDeth) - * Fix Ctrl+Click/Cmd+B/Go To Declaration for Aliases. - * Don't index non-canonical names. The non-canonical name for a nested `defmodule` is the Alias given to - that `defmodule` call. While that name should be resolvable within the parent modular, it should not be indexed - because the index is for the global scope. - - Prevents `defmodule Enum` in - - ```elixir - defmodule ExJsonSchema.Validator.Error do ... defmodule Enum do ... end ... end - ``` - - from being indexed as `Enum`, which hides the decompiled version from the standard library because source - references are favored over decompiled versions when resolving references. - * Reference Resolution - * Only favor same file Module resolutions if they are valid Invalid same file results can occur for prefix - matches, but if only prefix matches are available, then a whole project search should occur instead of only - when there are no same file `ResolveResult` of either validity. - * Include library sources in `Module#multiResolveProject` `GlobalSearchScope` - Ensures that library sources can be returned, which are favored over decompiled libraries, so that `__using__` - macros can be followed. - * Protect from `Module` reference element not having a `VirtualFile` when checking if a test file. - * Fix `QualifiableAliasImpl#fullyQualifiedName` - * Include qualifier of `MultipleAliases` - In an `alias` line like `alias Myapp.MyContext.{Schema1, Schema2}`, `Schema1` would think - its `fullyQualifiedName` was only `Schema1`, when it should included the `fullyQualifiedName` of the - qualifier, `MyApp.MyContext` too. This leads to the correct `Schema1` fully-qualified name - of `MyApp.MyContext.Schema1`. This fix makes references to `Schema1` resolve to both the `alias` and - the `defmodule`. - * Include qualifier of `MultipleAliases` for deep aliases In an `alias` line - like `alias Myapp.MyContext.{NestedContext1.Schema1, NestedContext2.Schema2}`, `Schema1` would think - its `fullyQualifiedName` was only `NestedContext1.Schema1`, when it should included - the `fullyQualifiedName` of the qualifier, `MyApp.MyContext` too. This leads to the correct `Schema1` - fully-qualified name of `MyApp.MyContext.NestedContext.Schema1`. This fix makes references to `Schema1` - resolve to both the `alias` and the `defmodule`. - * In LEEx Templates - * Don't check for implicit imports at top of template file if there is a view file The implicit imports - should come last, after the view file has been processed. - * Ignore call definition clauses expressions that can't contain an assign - * Atom keywords (`false`, `true`, `nil`) - * Maps - * Structs - * Keyword lists - * Strings and charlists - * Don't follow variables for assigns For now, don't follow variables to look for assigns. - * Fix finding assigns in `|> case do ... end` - `None` calls were ignored, but when `case` is used in a pipeline it is a `None` since it has no literal - arguments and only resolved arguments, so it was being ignored. - * Ignore Lists and Aliases when resolving assigns - * Fix resolve assigns in `if`s Only looked in `stab` of the `doBlock`, but the `else` is in the `blockList`. - * Don't use the same path for actual aliases and defmodules when resolving aliases Prevents a case of an exact - match and its namespace both being marked as valid (exact matches). - * Types - * Don't generate references for map key optionality (`required/1` and `optional/1`) - * Don't create a reference to `...` in lists in type specs. - * Look above `ElixirStabBody` for `ancestorTypeSpec`. - * Generate `Callable` reference for `unquote` in typespec instead of `Type` reference. - * Allow modular names to resolve to multiple modulars Fix `:systemd.ready()` not resolving because `:systemd` - only exists as a decompiled file from source because it is Erlang and there is no preference given to - different MIX_ENVs. All MIX_ENV `defmodule :systemd` are returned for the `:systemd` and all of them are - checked for `ready/0`. - * Fix resolving qualified calls that are defined through use - - Resolving qualified calls only used `Modular.callDefinitionClauseCallFoldWhile`, which ignores all non call - definition, which means it ignored the `use`, but switching to - use `org.elixir_lang.psi.scope.call_definition_clause.MultiResolve` `PsiScopeProcessor` used for unqualified - calls, but starting on the modular call of the qualifier, all the `use` handling that works for unqualified - calls also works for qualified calls now. - - This fixes resolving `MyAppWeb.Endpoint.config_change(changed, removed)` - in `MyApp.Application.config_change/3` because `use Phoenix.Endpoint, otp_app: :my_app` in `MyAppWeb.Endpoint` - is now walked for qualified calls. - * Fix resolving variables to parameters that are both pattern matched and defaulted - - In functions like - - ```elixir - def f(%Struct{} = s \\ %Struct{}) do - s - end - ``` - - `s` in the body would not resolve to the `s` parameter because the default parameter had to - be `PsiNamedElement`, that is a variable directly. Instead, recurse on any operand before the `\\` to support - pattern matching too. - * Use `keepProcessing()` in `MultiResolve.addToResolveResults` instead of specific return values - - Fixes `def` in `def default_host_flag, do: "--host` resolving as an invalid match to `default_host_flag` - instead of search the implicit imports for `defmacro def`. - * The `nameIdentifier` for a `defdelegate` is the first argument, not the `as:` - The `as:` is the name in the `to:` module only. - * Fix `defdelegate` `MultiResolve` - 1. I had flipped the head name and `as` name for checking for a name match - 2. I only counted the `defdelegate` as matching if the `as` name as found in `to` module, but if the head - alone is prefixed by the name then the head should be a ResolveResult element even if the `to` or `as` - can't be found - 3. Inside the `to`, I only checked if the children were call definition clauses, but this meant that all - the `for` handling was ignored, so start a new `resolveResults()` for each modular. - * Fix `toModulars` not returning all modulars - `fullyResolve` only touched the first modular. - * Favor complete valid results over incomplete invalid earlier bindings for variables. - * Ecto - * Don't generate reference for `assoc/2` pseudo-function in `join(..., _ in assoc(_, _))` - * Fix unaliasing multiple aliases - `UnaliasName` still assumed that `fullyQualifiedName` included the qualifier, but it is just the lexical - qualifier now. - * Check for `MULTIPLE_ALIASES_QUALIFIER` in `ResolveState` for prefix matches. Fixes resolving `SSH.Key` - to `Foo.SSH.Key` when the alias is `alias Foo.{SSH, ...}`. - * Ignore type variables in type restrictions when resolving normal variables. - * Fix `withSelf` for `childExpressions` `siblingExpressions` call While refactoring the walk, I copied the call - for siblings, which shouldn't included self. Children should include self, or the first expression is missed - which showed up as `Repo.transaction` not being found because `transaction` is the first `def` inside an `if` - in `Ecto.Repo.__using__`'s `quote` block. - * Don't try to resolve keys/fields of a capture. - * Don't generate reference for `assoc` in `*join*: .. in assoc(..., ...)`. Already worked for `join/3` calls, - extend to keyword syntax too. - * Fix resolving references to `Modulars` when resolved is in BEAM file The check to see if the resolved was a - modular only worked for source elements because it checked if it was a `Call`, but decompiled modules in BEAM - files are `ModuleImpls`. - * Fix logic error when ignored pinned variables as declaration sites - - The logic was supposed to be that - - * If it is pinned, keep searching - * If it is not pinned, check the operation as a Call - - ... but, the code was `operatorText != "^" && execute(match as Call, state)` which meant that if - the `operatorText` was `"^"`, then the whole expression was `false`, which meant `keepProcessing` was `false`, - so any pin stopped the processing for other unpinned parameters after the pin in addition to processing in the - outer scope of the pin. - * Prefer source only for target candidates for Go To Declaration and not all ResolveResults. Ensures that - functions only defined in decompiled Modules can be found because the Module's ResolveResults include the - decompiled Module in addition to the source ones. - * Don't prefer source over decompiled in `ResolveResultOrderedSet` - Preference is now handled in `Resolver`, so that source preference only happens on Go To Declaration and not - for `multiResolve` because that needs decompiled Modulars for compile-time `for` loops that are too complex to - infer. - * Use primary arity instead of final for resolving Callables - - Fixes `unquote` in `def unquote(...)() do` not resolving. - * Filter out decompiled private functions from completions If they are only available as decompiled functions, it is - unlikely we have the source available to make them public, which was the reasoning to allow private functions at - all. - * Decompiling - * Include module name for "No decompiled source function" errors - * Unquote `and` when not and/2 Fixes decompiling `:hipe_arm_encode`. - * `unquote` `false` when decompiling. Fixes decompiling `:thrift_json_parser`. Add `true` to the `Unquote` list - too since it would have the same issue. - * Unquote `in` when not `in/2` - Fix decompiling `:digraph_utils` - * Use `containingFile.originalFile` for `resolve.Module.multiResolveProject` - Ensures `VirtualFile` is available for decompiled files. - * Performance - * Don't use `.navigationElement` for `Variants` - - Using `navigationElement` forces parsing of the decompiled source, which isn't necessary whe only showing the - lookup string. - * Remove `ModuleOwner` interface - * `BeamFileImpl` is known to have only 1 module in it, so it makes the code more complicated to make it act - like source files. - * Don't use `getChildrenByType`, as it causes the decompiled source to be parsed, which is slow and - unnecessary since all the metadata for modules is available from the binary format. - * Get project from parent in decompiled Module and CallDefinition Not doing this causes an unnecessary parsing - of the decompiled source. - * Fix infinite recursion in `ElixirVisitor#visitLiteralSigilLine` - * Show more scope for keyword key Go To Definition - * Always show the keyword pair, instead of just the keyword key, so that the value being assigned to the key can - be seen before Go To. - * Show the location at the path relative to the content root and the line number as `live_modal` may be used - more than once in the same file. - * Put `entrance` as initial visited in `module.Variants`. - * Check if `PsiElement` has been visited before walking `quote` and `__using__` - * Don't mark qualified calls as unresolved in "Elixir References" inspection I don't have a good approach for - resolving struct fields or map keys for now, don't mark them as unresolved as it clutters finding unresolved calls - I expect to work. - * Don't assume `PsiFile#virtualFile` is `NotNull` in `PsiElement.moduleWithDependentsScope`. - * Don't assume `PsiFile#virtualFile` is `NotNull` in `AtNonNumericOperation.computeReference()`. - * `putInitialVisitedElement` in `variable.MultiResolve` - Fixes resolving variables through `use` statements for variables in the body of `defmodule` blocks. - * Log when `VISITED_ELEMENT_SET` is `null` instead of erroring. - * Fix `resolvePrimaryArity` for `|> case do` - `resolvedPrimaryArity` did not add both the doBlock's arity and the arity from the `|>` at the same time. If the - pipe was there, the `do` was ignored because the pre-existing `resolvePrimaryArity` was not used if the normal - primary arity of the call was zero, which is the case for `|> case do`. - * Find module for elements in libraries Elements in libraries don't have a `Module` - from `ModuleUtil.findModuleForPsiElement`, so scan the element's project's module's content roots for the - closest `Module` for libraries. - * `prependQualifiers` when typing an alias on a new line in the body of a function. - * Don't descend into `quote` blocks if the call being resolved is given to an `unquote` in the `quote` block. -* [#1967](https://github.com/KronicDeth/intellij-elixir/pull/1967) - [@KronicDeth](https://github.com/KronicDeth) - * `updateSinceUntilBuild` to prevent breaking in future IDEs. - * Check if modules loaded before using `findModuleForPsiElement`. - * Use `BasePlatformTestCase` instead of `LightCodeInsightTestCase` because `LightCodeInsightTestCase` is deprecated. - -## v11.10.0 - -### Enhancements - -* [#1893](https://github.com/KronicDeth/intellij-elixir/pull/1893) - [@KronicDeth](https://github.com/KronicDeth) - * Simplify `onlyTemplateDateFileType` -* [#1897](https://github.com/KronicDeth/intellij-elixir/pull/1897) - [@KronicDeth](https://github.com/KronicDeth) - * Add missing opcodes to `Code` disassembler - * OTP 23 opcode `bs_start_match4` - * Current (in-development) OTP 24 opcodes - * `make_fun3` - * `init_yregs` - * `recv_marker_bind` - * `recv_marker_clear` - * `recv_marker_clear` - * `recv_marker_user ` -* [#1899](https://github.com/KronicDeth/intellij-elixir/pull/1899) - [@KronicDeth](https://github.com/KronicDeth) - * Log `PsiElement` if `Call#finalArguments` contain a `null`. -* [#1902](https://github.com/KronicDeth/intellij-elixir/pull/1902) - [@KronicDeth](https://github.com/KronicDeth) - * Suggest ASDF directories as `homepath`s for both Elixir and Erlang for Elixir SDKs. -* [#1821](https://github.com/KronicDeth/intellij-elixir/pull/1821) - [@jacekgajek](https://github.com/jacekgajek) - * Run 'Dialyzer based inspections (Elixir)' using Elixir SDK running `mix dialyzer` or any customized `mix` command. - -### Bug Fixes - -* [#1893](https://github.com/KronicDeth/intellij-elixir/pull/1893) - [@KronicDeth](https://github.com/KronicDeth) - * Use `VirtualFile#fileType` instead of EEx Type::INSTANCE when looking up extensions. Since LEEx file `Type` is a - subclass of EEx's file `Type`, it calls `templateDataFileTypeSet` in EEx's `Type`, but `templateDataFileTypeSet` - uses `INSTANCE` from EEx. By using the `VirtualFile#fileType` instead, it will properly be EEx or LEEx based on the - actual file extension and then it can be used to strip that off and find the DataTemplateLanguage, such - as `HTMLLanguage` for `.html.leex`. -* [#1897](https://github.com/KronicDeth/intellij-elixir/pull/1897) - [@KronicDeth](https://github.com/KronicDeth) - * Compare max opcode in to file to max opcode number, not ordinal. Opcodes are 1-based, but the ordinal of the - Kotlin `Enum`s are 0-based, so the comparison was off-by-1 when a file had the max opcode and would be incorrectly - marked as too new. -* [#1899](https://github.com/KronicDeth/intellij-elixir/pull/1899) - [@KronicDeth](https://github.com/KronicDeth) - * Don't return null left or right infix operands in `primaryArguments` - `operation.infix.Normalized.leftOperand` and `.rightOperand` ensures that `PsiErrorElement` is not returned: they - can return `null` when there is no left or right operand. `Infix.primaryArguments` was not taking this into account - and so could return a `null` as one of the `primaryArguments`, which broke `Call.finalArguments`. -* [#1902](https://github.com/KronicDeth/intellij-elixir/pull/1902) - [@KronicDeth](https://github.com/KronicDeth) - * Don't attempt to execute `elixir -e "System.version |> IO.puts"` to get the version number as it requires too much - of a full SDK to be built and from the Erlang paths to be correct too, which was rarely the case for ASDF. Since for - Homebrew and ASDF, the directory name is the version name, this shouldn't be a loss in naming ability. If the - directory name is not a parseable version it will be of the format `Elixir at `. This is probably more correct - for installs directories that aren't versioned as SDK versions aren't updated if the version installed at the path - changes, such as `/usr/local/elixir` or `/opt/elixir`, etc. - -## v11.9.2 - -### Bug Fixes - -* [#1887](https://github.com/KronicDeth/intellij-elixir/pull/1887) - [@KronicDeth](https://github.com/KronicDeth) - * Protect from nested heredocs in documentation from stopping documentation's heredoc as happens in `Module` - and `Ecto.Query`. - * Use `~S` for `@moduledoc` too, in addition to `@doc`. - * Check if the documentation contains `"""` or `'''` and use the opposite one as the promoter/terminator. - * If neither is used, use `"""`. - * If both are used, use `"""`, but then escape `"""` as `\"\"\"`. - * Trim trailing whitespace from documentation lines to match formatter output. -* [#1890](https://github.com/KronicDeth/intellij-elixir/pull/1890) - [@KronicDeth](https://github.com/KronicDeth) - * Set `runIde` `maxHeapSize` to `7g` - * Set to the same I run my own IDE at, so the debugged instance isn't any slower than the normal IDE when I need to - do extended all day testing to trigger bugs. - * Test that all `FormattingTest` files can be parsed. - * `YYINITIAL` is special - wrappers of the lexer assume that if in `YYINITIAL`, it is safe to shift the lexer over - when there is an error, having `{OPENING_CURLY}` `pushAndBegin(YYINITIAL)` when it was either in `YYINITIAL` - or `INTERPOLATION` (https://github.com/KronicDeth/intellij-elixir/blob/36b53331967950453906c3bde9c7f79dc3f9cd2f/src/org/elixir_lang/Elixir.flex#L812) - means that the lexer looked like it was restartable when it really wasn't. This code has been in the lexer for 6 - years (https://github.com/KronicDeth/intellij-elixir/blame/36b53331967950453906c3bde9c7f79dc3f9cd2f/src/org/elixir_lang/Elixir.flex#L812) - . - * When in `YYINITIAL`, `{` no longer recurses into `YYINITIAL` as `}` does not need to be counted to determine if it - is closing an interpolation. - * When in `INTERPOLATION`, `{` enters `INTERPOLATION_CURLY` to allow counting and matching of `}` until it can exit - and go back to `INTERPOLATION`, where `}` will exit the interpolation. - * When in `INTERPOLATION_CURLY`, `{` enters another level of `INTERPOLATION_CURLY` to allow counting and matching - of `}` until it can exit and go up a level. - * The `}` in `YYINITIAL` did `yybegin(ADDITION_OR_SUBTRACTION_MAYBE)`, but it should have - been `pushAndBegin(ADDITION_OR_SUBTRACTION)` as `ADDITION_OR_SUBTRACTION_MAYBE` or its following states all exit - with `handleInLastState()` or `popAndBegin()`. This was not caught in #1859 because the extra `YYINITIAL` - from `pushAndBegin(YYINTIAL)` hid the bug. - * Prevent nested `YYINITIAL` bugs in the future by erroring - * If trying to `pushAndBegin(YYINITIAL)`. - * If trying to `push(YYINITIAL)` and the state stack is not empty - * Clear the state Stack when `ElixirFlexLexer#reset` is called, as at the level of typing and pasting, - the `ElixirFlexLexer` is wrapped in many layers of lexers including `LexerEditorHighlighter` where - the `ElixirFlexLexer` is no longer re-instantiated when there is no text, but instead, `ElixirFlexLexer#reset` is - only called. This has always been an invariant violation since the stack state was added 7 years ago - in https://github.com/KronicDeth/intellij-elixir/commit/52cb2fbf6368ba551a4784bd1de49e1fc21c969a. It likely only - became more apparent with the changes to +/- parsing in #1859 that made return-to-YYINITIAL less likely. - * Since this `stack.clear()` has to be manually added to `ElixirFlexLexer.java`, which is generated - from `Elixir.flex`, `ResetTest` is added to check that the code is still there. - * For a reason I haven't been able to explain, the `LexerEditorHighlighter` stops working after `:` is typed at the - start of an atom in certain situations, such as before `)` inside a function call, like when adding an argument. In - this case, the old version of the lexer would mark `)` as a `BAD_CHARACTER` and continue to do so until an expected - atom start of [a-zA-Z_], `'`, `"`, or an operator occurred. Now, if an invalid atom start is matched, - the `ATOM_START` state ends and the previous state handles the text, which in the function case mean `)` is parsed - as `CLOSING_PARENTHESIS`. This change allows the highlighting to continue. I do not know if - returning `BAD_CHARACTER` will always break the `LexerEditorHighlighter`, but I don't think, so - since [the `GroovyLexer` in `intellij-community` returns it](https://github.com/JetBrains/intellij-community/blob/f66e9644fa683fba22f4ce9e30c037720f745989/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/lexer/groovy.flex#L538) - , but it may be the case that it isn't actually returned ever when users are typing and only handled by the lexer - for completeness. - -## v11.9.1 - -### Bug Fixes - -* [#1877](https://github.com/KronicDeth/intellij-elixir/pull/1877) - [@KronicDeth](https://github.com/KronicDeth) - * Fix syntax highlighting stopping due to decompiling of `Kernel` failing caused by bugs introduced in #1834. Syntax - highlighting could fail part way through a file when `Kernel` needed to be decompiled to resolve parts of the - syntax. This would lead to the file to be colored above a certain point, but then the default gray after that point. - - * Connect compiled stubs to decompiled source by name/arity. Previously, when the decompiler didn't use the `Docs`, - it was guaranteed that the `PsiCompiled` stubs would correlate, in-order, with the decompiled source call - definitions, and so mirrors could be set by matching up the list of them in order. Since the `Docs` doesn't have - to correspond to and doesn't correspond to the binary precisely for some BEAMs, most - importantly, `Elixir.Kernel.beam`, the PsiCompiled stub and decompiled source is now matched by name and arity. - This means some mirrors are missed, but no errors are produced. - * Allow decompile source to map to entire arity range Since the decompile source from `Docs` can have default - arguments the call definition clauses can have an arity range and not just a fixed arity, so all arities in the - range need to be mappable to `PsiCompiled` functions. - * Use correct macro for signature from `Docs`. Ensures that defmacro is used for macros instead of hard-coding `def` - as in #1834. - * Use `~S"""` for docs from `Docs` chunk. The docs from the `Docs` chunk may contain interpolation in the code - samples or `#{` in regex examples, but these should not be treated as an interpolation start as the `Docs` - format does not support interpolation. Anything that looks like interpolation in the docs text was actually - escaped in the original docs, so also escape it here by using `S"""`, which turns off interpolation. - * Log an error if `Code` function can't be matched to decompiled source. Unlike the old `InvalidMirrorException` - , this won't be an exception and the binary <-> decompile will still work for the other functions/macros in the - file, so it will be a more graceful degradation. -* [1878](https://github.com/KronicDeth/intellij-elixir/pull/1878) - [@KronicDeth](https://github.com/KronicDeth) - * Fix missed references to `DepsWatcher` as project component - `DepsWatcher` was converted to a Project Listener in #1844 to support installing the plugin from the Marketplace - without reloading, but some references to `DepsWatcher` were still trying to get its instance for project - using `project.getComponent()`, which would now return `null`. -* [#1879](https://github.com/KronicDeth/intellij-elixir/pull/1879) - [@KronicDeth](https://github.com/KronicDeth) - * Target Java 1.8 for JPS compatibility. JPS (JetBrains Project System) is the API used to allow External Builders, - like `mix` to build projects. -* [#1880](https://github.com/KronicDeth/intellij-elixir/pull/1880) - [@KronicDeth](https://github.com/KronicDeth) - * Fix matching `unquote(ATOM)` call definitions to compiled function by using the argument to`unquote` when - calculating the name of the call definition clause if possible. Needed to match anonymous function names that - are `unquote`d because they contain `/` to separate the outer function name from the anonymous function naming - convention. - * Don't use `Docs` signature for `MacroNameArity` that is an operator or `unquote`d The signatures for operators - and `unquote`d don't produce valid code that can be parsed. - * Don't use signatures for `__struct__` functions. The signatures for the `__struct__` functions are like `%Module{}`, - but that's not parseable, so bypass the signatures with a specialized `SignatureOverride` - decompiler that matches the actual code in `defstruct`. - * Don't indent empty lines from `Docs` for `@moduledoc` and `@doc` to match the formatter output. -* [#1881](https://github.com/KronicDeth/intellij-elixir/pull/1881) - [@KronicDeth](https://github.com/KronicDeth) - * Fix capitalization of `Docs` `@moduledoc` - `@moduleDoc` -> `@moduledoc` - -## v11.9.0 - -### Enhancements - -* [#1844](https://github.com/KronicDeth/intellij-elixir/pull/1844) - [@KronicDeth](https://github.com/KronicDeth) - * Make plugin updatable without a restart when installing from the JetBrains Marketplace. (If installing from file on - GitHub you still need to restart due to a limitation in the JetBrains API.). JetBrains refers to this as - a [Dynamic Plugin](https://jetbrains.org/intellij/sdk/docs/basics/plugin_structure/dynamic_plugins.html). - * Convert `DepsWatcher` from project component to project listener - * Convert `Watcher` from module component to project listener - * Make org.elixir_lang.packageManager extension point dynamic - * Remove unnecessary `assert`. - * Replace `if` with `when` - * Include `asd` tool version Prevent me screwing up the quoter cache using the wrong elixir version again. - * Update gradle project - * `gradlew` `6.7.1` - * `org.jetbrains.intellij` `0.6.3` - * `org.jetbrains.kotlin.jvm` `1.3.70` - * `de.undercouch.download` to `4.4.1` - * Update to GitHub Environment Files -* [#1859](https://github.com/KronicDeth/intellij-elixir/pull/1859) - [@KronicDeth](https://github.com/KronicDeth) - * Update CI to Elixir 1.11.2 and Erlang 23.1 - * Quoting (for verification of correspondences between plugin and Elixir native lexer and parser.) - * Port elixir-lang/elixir#9725 - * Indentations for sigil binaries with complex content. Makes sure the indentation metadata is added to sigils - that have content with metadata already. - * Quote charlist the same as string when used for a quoted atom - * Port elixir-lang/elixir@e89e9d874bf803379d729a3bae185052a5323a85 - * Add sigil delimiter to metadata Ports elixir-lang/elixir#9671 - * Have 3 character delimiter for heredocs - * Add `no_parens: true` metadata Port elixir-lang/elixir@8e7befb1087bd37d5acb883e21925b1c0eb0a55f - * Remove elixir-lang parsing tests for files that don't exist in Elixir 1.11 - * Add missing `@Deprecated` to match overridden method - * Format expected and actual quoted Makes the diff not be a one-liner. so easier to spot the difference. - * Convert `Quoter` to Kotlin - * Regenerate Parser for newer GrammarParser version. - * Port elixir-lang/elixir@1e4e05ef78b3105065f0a313bd0e1e78b2aa973e -* [#1834](https://github.com/KronicDeth/intellij-elixir/pull/1834) - - [@marcindawidziuk](https://github.com/marcindawidziuk) - * Rewrote the `DocumentationProvider` so it no longer relies on invoking `mix` (which I admit was more like a hack - than a real solution). This now works so quickly that it actually makes sense to show docs on mouse hover. - * It can get the documentation from both the source code and decompiled .beam files. - * Decompilation of documentation was implemented according to EEP-48. - * The experience on navigating through decompiled file has also been improved a bit - * See the `@moduledoc` and `@doc`s - * See if a function has been deprecated - * See the original signature of the function (instead of just `p0`, `p1`, ...). - -### Bug Fixes - -* [#1844](https://github.com/KronicDeth/intellij-elixir/pull/1844) - [@KronicDeth](https://github.com/KronicDeth) - * Fix deprecation warnings for IntelliJ IDEA 2020.2 - * Replace `fileTypeFactory` extensions with `fileType` - * Convert `fileType`s to Kotlin - * Replace uses of deprecated `Project#baseDir` - * Replace uses of deprecated `ContainerUtil.newHashMap` - * Replace `defaultLiveTemplatesProvider` with `defaultLiveTemplates` - * `spaceExistanceTypeBetweenTokens` replaced with `spaceExistenceTypeBetweenTokens` - * Replace `ListCellRendererWrapper` with `SimpleListCellRenderer` - * Replace `StdFileTypes.PLAIN_TEXT` with `FileTypes.PLAIN_TEXT` - * Replace `LanguageSubstitutors.INSTANCE` with `getInstance()` - * Replace `ReportMessages.ERROR_REPORT` with `ReportMessages.getErrorReport()` - * Replace `DefaultProgramRunner` with `GenericProgramRunner` - * Have only one runner for all configurations in plugin since body of runner was all the same for non-debug. - * Don't override deprecated `flushBufferBeforeTerminating()` - * Don't override deprecated `acceptsFile` - * Override `initExtra(Project)` instead of `initExtra(Project, MessageBus, Engine)` - * Replace `NamedFoldingDescriptor` with `FoldingDescriptor` - * Convert `folding.Builder` to Kotlin - * Replace `file` with `value` for `@Storage` annotation - * Replace `checkBox(fieldName, title)` with `checkBox(title, getter, setter)` - * Replace `com.intellij.util.contains.Predicate` with `java.util.function.Predicate` - * Replace `CodeStyleSettingsManager` with `CodeStyle` - * Replace `Comparing.equal` with `Objects.equals` - * Replace `UsageType(String)` with `UsageType(Supplier)` - * Replace `PluginManager` with `PluginManagerCore` - * Replace `WakValueHashMap` with `createWakeValueMap` - * Don't pass `Pass` to `LineMarkerInfo` - * Replace `newArrayListWithCapacity` with `ArrayList` - * Replace `newIdentityHashMap` with `IdentityHashMap` - * Replace `RefElement#element` with `#psiElement` - * Pass `columnMargin` to `setupCheckboxColumn` - * `Extensions.getExtensions(name)` -> `name.extensionList` - * `Extensions.findExtension` -> `ExtensionPointName.findExtensionOrFail` - * `Object` -> `Any` - * Replace `choseAndSetSdk` with `SdkPopupFactory` - * Fix error reporting formatting - * Fix new lines around excerpts so that code blocks quote correctly - * Use FILE:LINE format for excerpt location, so it can be used in editors for rapid lookup. - * Separate title from message - * Remove use of `ErrorBean` - * Pass project for LevelPropertyPusher DumbModeTask - * Don't use constructor injection for `SetupSDKNotificationProvider` - * Don't use `AnnotationHolder::create*` APIs and use `AnnotationBuilder` instead. - * Convert `Annotator`s to Kotlin - * Use `logger.error` directly instead of `LogMessageEx` - * Fix Atom annotator to only annotator within current element. Annotation keyword pair's key and colon instead of - annotating the keyword key and the colon outside of it. - * Fix `Macro` parsing in `DbgI` - * `ifAccessToString` - I missed taking the 3rd element of the tuple to get `[Access, :get]` and was checking the outer tuple directly. - * Convert `beam.assembly.ParserDefinition` to Kotlin - * `ifWhenToString` where `as` should be `as?` - * Suppress unused variables for `TODO()`s - * Remove unnecessary `Line` chunk dependency on `Atom` chunk - * Switch unused `unsignedInt` values to `_` as Kotlin doesn't support `_name` - * Use `key` instead of environment for `computeIfAbsent` - * Replace lambda with constructor reference - * Remove unnecessary `!!`s - * Replace `mapIndexed` with `map` because `index` is unused - * Remove `open` that has no effect in `object` - * Fix `is` overrides by converting to Kotlin - * Remove unused `Call` from `Implementation.` - and `CallDefinitionClause` `.elementDescription(Call, ElementDescriptionLocation)`. - * Don't shadow `resolveResultList` in `addToResolveResultList` - * Remove useless `?:` - * Remove unnecessary `!= null` - * Fix named argument calling by using super argument name - * Change `Float.from(ByteArray, Int)` to `TODO()` as implementation is invalid. - * Remove unused `ModuleChooserDialog` - * Setup `EncodingManager` for `ParsingTestCase` - * Remove redundant `internal` - * Don't highlight resolved callables along with referrers Newest annotation API asserts that the annotator only - annotates the PsiElement being visited, so can't highlight the resolved call definitions at the same time anymore. -* [#1859](https://github.com/KronicDeth/intellij-elixir/pull/1859) - [@KronicDeth](https://github.com/KronicDeth) - * Differentiate signs, unary +/-, and addition/subtraction in lexer. Fix parsing of `-1` for `case` clauses (#1316) - by more strictly parsing decimal exponent signs differently than addition/subtraction and differently from unary `+` - and `-`. No longer have a "dual" operation emitted from the lexer like the Elixir native lexer and instead use - specific tokens for each use case so that the parser doesn't need to decide on the operation. - * Heredoc with escapable newlines (#1843) - Heredocs allow the final newline to be escaped so you can write a heredoc in the code, but have no newlines in the - string term at runtime. - * Fix terminators docs to show closing version and not opening version -* [#1866](https://github.com/KronicDeth/intellij-elixir/pull/1866) - [@KronicDeth](https://github.com/KronicDeth) - * Protect against `IndexOutOfBounds` from `highlighterIterator` in `QuoteHandler`. - -## v11.8.1 - -### Bug Fixes - -* [#1822](https://github.com/KronicDeth/intellij-elixir/pull/1822) - [@KronicDeth](https://github.com/KronicDeth) - * Vendor JInterface 1.11 to support `BIG_CREATION` when debugging. The JInterface on Maven Central has stopped being - updated - because [the OTP Team didn't actually maintain it](https://bugs.erlang.org/browse/ERL-928?focusedCommentId=16521&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16521) - , that was Basho, and Basho is gone now. This version of JInterface, 1.11, is from Erlang 23.0.4 from Homebrew, but - with the formula edited (`brew edit erlang`) to add `--with-java` and then built - with `brew install erlang --build-from-source`. -* [#1823](https://github.com/KronicDeth/intellij-elixir/pull/1823) - [@KronicDeth](https://github.com/KronicDeth) - * On Windows, the `file.path` to the debugger server files has `\`, but they aren't escaped. Therefore, replace them - with escaped version, `\\` to fix debugging on Windows, but leave Linux and macOS unaffected. - -## v11.8.0 - -### Enhancements - -* [#1792](https://github.com/KronicDeth/intellij-elixir/pull/1792) - - [@marcindawidziuk](https://github.com/marcindawidziuk) - * Quick documentation (F1/Ctrl+Q) -* [#1807](https://github.com/KronicDeth/intellij-elixir/pull/1807) - [@niknetniko](https://github.com/niknetniko) - * Run Icons in gutter next to ExUnit tests. The icon changes to the state of the test: green for passing and red for - failing. - -### Bug Fixes - -* [#1788](https://github.com/KronicDeth/intellij-elixir/pull/1788) - [@KronicDeth](https://github.com/KronicDeth) - * Fix Unchecking Show Method Separator still showing on `@doc` and `@spec`. - - Previously, unchecking Show Method Separator would still show the method separator if it was the module attributes ( - such as `@doc` and `@spec`) associated with the call definition (`def`, `defp`, `defmacro`, or `defmacrop`) and only - disabled the ones directly above the call definition. This is fixed by checking if method separators are enabled - in `getLineMarkerInfo(PsiElement)` instead of the specialized `getLineMarkerInfo(Call)`, so that the check happens - for both module attributes and call definitions. -* [#1786](https://github.com/KronicDeth/intellij-elixir/pull/1786) - [@odk211](https://github.com/odk211) - * Remove "Unresolved module attribute" error annotation because module attributes cannot be resolved through `use` - yet, so current annotation is a false positive in those cases. -* [#1801](https://github.com/KronicDeth/intellij-elixir/pull/1801) - [@niknetniko](https://github.com/niknetniko) - * Use `SimpleTemplateLanguageFormattingModelBuilder` for EEx files, so that the `TemplateDataLanguage` (i.e. `html` - when the extension is `.html.eex`) formatter is used instead of the Elixir formatter. - -## v11.7.0 - -### Enhancements - -* [#1781](https://github.com/KronicDeth/intellij-elixir/pull/1781) - [@KronicDeth](https://github.com/KronicDeth) - * Convert `annotator.ModuleAttribute` to Kotlin - * Apply optional Kotlin transformations. - -### Bug Fixes - -* [#1781](https://github.com/KronicDeth/intellij-elixir/pull/1781) - [@KronicDeth](https://github.com/KronicDeth) - * Check if at least one resolution for module attribute references is valid - - Previously, it was checked if module attributes resolved to exactly one declaration, but this is no longer true with - the looser reference resolution that allows invalid results for PisPolyVariantReference. `resolve()` will - return `null` when there is more than one result from `multiResolve` even if some are invalid, so we need to - explicitly check if the `PsiReference` is a `PsiPolyVariantReference` and if so check if any are valid. - * Fix deprecation warnings for `annotator.ModuleAttribute`. - * Quick fixes for inlinables in `annotator.ModuleAttribute`. -* [#1774](https://github.com/KronicDeth/intellij-elixir/pull/1774) - [@odk211](https://github.com/odk211) - * Fix `iex` and `erl` arguments not being saved for IEx Mix Run Configurations. - -## v11.6.1 - -### Bug Fixes - -* [#1762](https://github.com/KronicDeth/intellij-elixir/pull/1762) - [@KronicDeth](https://github.com/KronicDeth) - * Support diffs in pattern matching added in Elixir `1.10.0` in the ExUnit formatter. - Ports [elixir-lang/elixir@98c6bba436cc4833363295e5fedd3f819504d79d](https://github.com/elixir-lang/elixir/commit/98c6bba436cc4833363295e5fedd3f819504d79d) - . -* [#1773](https://github.com/KronicDeth/intellij-elixir/pull/1773) - [@KronicDeth](https://github.com/KronicDeth) - * Only require at least the number of children to safely get a specific child instead of exact number to allow getting - prefix children when there are grammatical errors. - -## v11.6.0 - -### Enhancements - -* [#1691](https://github.com/KronicDeth/intellij-elixir/pull/1691) - [@KronicDeth](https://github.com/KronicDeth) - * Treat `.leex` files as `.eex` files, so same features apply to both. -* [#1735](https://github.com/KronicDeth/intellij-elixir/pull/1735) - [@KronciDeth](https://github.com/KronicDeth) - * Switch build to GitHub Actions. -* [#1738](https://github.com/KronicDeth/intellij-elixir/pull/1738) - [@Koziolek](https://github.com/Koziolek) - * Update build to IntelliJ IDEA 2020.1 - -### Bug Fixes - -* [#1646](https://github.com/KronicDeth/intellij-elixir/pull/1646) - [@seanwash](https://github.com/seanwash) - * Swap improperly sized `General.QuestionDialog` icon for `RunConfigurations.TestUnknown` icon for Unknown icon in - Structure View. -* [#1632](https://github.com/KronicDeth/intellij-elixir/pull/1632) - [@ortex](https://github.com/ortex) - * Fix `MODULENAME` variable in `defm` live template, so that the file name is camel-cased before being capitalized. -* [#1643](https://github.com/KronicDeth/intellij-elixir/pull/1643) - [@zrma](https://github.com/zrma) - * Update `README.md` about information for Goland IDE since has been released for awhile and no longer only an EAP. -* [#1735](https://github.com/KronicDeth/intellij-elixir/pull/1735) - [@KronciDeth](https://github.com/KronicDeth) - * Restore - canary [builds being published to JetBrains Marketplace](https://plugins.jetbrains.com/plugin/7522-elixir/versions) - . -* [#1738](https://github.com/KronicDeth/intellij-elixir/pull/1738) - [@Koziolek](https://github.com/Koziolek) - * JetBrains IDEs 2020.1 compatibility - * Change obsolete references to `AllocIcons` in `Icons` to new ones in `AlllIcons` that are recommended in - documentation. - * Update to `@NotNull` annotation on `PsiElementVisitor` - * `DepGatherer` - * `QuotableImpl.quote` -* [#1745](https://github.com/KronicDeth/intellij-elixir/pull/1745) - [@KronciDeth](https://github.com/KronicDeth) - * Fix tests for IDEA 2020.1. -* [#1753](https://github.com/KronicDeth/intellij-elixir/pull/1753) - [@KronciDeth](https://github.com/KronicDeth) - * Get `ProjectImportProvider` builder in `doGetBuilder` instead of constructor. - - Fixes use of deprecated constructor dependency injection that is incompatible with dynamic, injectable plugins in - 2020.1. - - ``` - com.intellij.diagnostic.PluginException: getComponentAdapterOfType is used to get org.elixir_lang.mix.project._ - import.Builder( - requestorClass=org.elixir_lang.mix.project._import.Provider, requestorConstructor=protected - org.elixir_lang.mix.project._import.Provider(org.elixir_lang.mix.project._import.Builder) - ). - - Probably constructor should be marked as NonInjectable. [Plugin: org.elixir_lang] - ``` -* [#1685](https://github.com/KronicDeth/intellij-elixir/pull/1685) - [@gerritwalther](https://github.com/gerritwalther) - * Allow underscores in binary (`0b`), octal (`0o`) , and hexadecimal (`0x`) numbers. - -## v11.5.0 - -### Enhancements - -* [#1630](https://github.com/KronicDeth/intellij-elixir/pull/1630) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore the `incompleteCode` flag and instead always use the criteria used when `incompleteCode` was set. - - | name prefix | exact name | ResolveResult | valid | - |-------------|------------|---------------|-------| - | ❌ | N/A | ❌ | N/A | - | ✅ | ❌ | ✅ | ❌ | - | ✅ | ✅ | ✅ | ✅ | - - This extends #1617 to more cases. - * Qualified calls (`Process.flag(...)`, etc) - * Type specs (`@spec foo(...)`) - * Aliases (`alias Foo...`) - * Module Attributes (`@attribute`) - * Variables (`foo`) - * `Protocol` reserved module attributes (`@protocol` and `@for`) - -### Bug Fixes - -* [#1650](https://github.com/KronicDeth/intellij-elixir/pull/1650) - [@KronicDeth](https://github.com/KronicDeth) - * Fix debugger evaluator for Elixir >= 1.9.2. - Ports [elixir-lang/elixir@7002554](https://github.com/elixir-lang/elixir/commit/7002554a478f4c99dc4b63786a13cc7dca67799d) - . - -## v11.4.0 - -### Enhancements - -* [#1617](https://github.com/KronicDeth/intellij-elixir/pull/1617) - [@KronicDeth](https://github.com/KronicDeth) - * Previously, the arity of a function or macro could only disagree with the definition and resolve if - - 1. The arity of the call was in the arity range of the defintion and the `ResolveResult` was marked as a `validResult` - . - 2. The code is marked as `incomplete` (because the IDE detects typing, etc) and the arity mismatches and - the `ResolveResult` is marked as an invalid result. - - By marking all arity mismatches, regardless of incompleteness of the code as an invalid result, Go To Definition and - Show Parameters works when the the arity is incorrect. This males Show Parameters work while typing out a call without - the correct number of commas and allows jumping to the definition while typing out the call too. - -## v11.3.0 - -### Enhancements - -* [#1600](https://github.com/KronicDeth/intellij-elixir/pull/1600) - [@KronicDeth](https://github.com/KronicDeth) - * Show Parameter Info (⌘+P/Ctrl+P) - -### Bug Fixes - -* [#1607](https://github.com/KronicDeth/intellij-elixir/pull/1607) - [@hoodaly](https://github.com/hoodaly) - * Fix must specify non-empty 'commandLine' parameter -* [#1608](https://github.com/KronicDeth/intellij-elixir/pull/1608) - [@KronicDeth](https://github.com/KronicDeth) - * `GeneralCommandLine`'s escaping for Windows can't handle the parentheses in a way that both works for the Windows - shell and Elixir running the code the shell hands off. Removing the parentheses leaves runnable code even if it is - no longer formatted. - - Fixes "Unknown Version" naming for Elixir SDKs and the "Probably SDK installed in ... is corrupt" dialog from - appearing. - -## v11.2.0 - -### Enhancements - -* [#1592](https://github.com/KronicDeth/intellij-elixir/pull/1592) - [@alex-dukhno](https://github.com/alex-dukhno) - * Add `ExUnit` `describe` block template. - -### Bug Fixes - -* [#1589](https://github.com/KronicDeth/intellij-elixir/pull/1589) - [@KronicDeth](https://github.com/KronicDeth) - * Don't error on `runtume` in mix deps. `guardian` is too common of a dependency and too many users have the version - with the typo installed. -* [#1569](https://github.com/KronicDeth/intellij-elixir/pull/1569) - [@chitacan](https://github.com/chitacan) - * Fix IEx Mix Run/Debug Configuration for `asdf` by using absolute path to `mix`. -* [#1595](https://github.com/KronicDeth/intellij-elixir/pull/1595) - [@KronicDeth](https://github.com/KronicDeth) - * Add OTP 22 and 23 opcodes to Code BEAM Chunk Viewer - * `put_tuple/2` - * `bs_get_tail/3` - * `bs_start_match3/4` - * `bs_get_position/3` - * `bs_set_position/2` - * `swap/2` - -## v11.1.0 - -### Enhancements - -* [#1587](https://github.com/KronicDeth/intellij-elixir/pull/1587) - [@KronicDeth](https://github.com/KronicDeth) - * Update gradle plugins - * `gradle-intellij-plugin` (`org.jetbrains.intellij`) to `0.4.10` - * `org.jetbrains.kotlin.jvm` to `1.3.50` - * `de.undercrouch.download` to `4.0.0` - * Update IDEA version in builds - * `2019.2` -> `2019.2.2` - -### Bug Fixes - -* [#1582](https://github.com/KronicDeth/intellij-elixir/pull/1582) - [@KronicDeth](https://github.com/KronicDeth) - * Don't log if partial or no header typeID is read. It happens too often due to `.beam` files being written partially - to disk during the build process. They will be re-indexed when they are complete. -* [#1587](https://github.com/KronicDeth/intellij-elixir/pull/1587) - [@KronicDeth](https://github.com/KronicDeth) - * Update gradle intellij plugin to fix `runIde` on newer macOS. -* [#1588](https://github.com/KronicDeth/intellij-elixir/pull/1588) - [@KronicDeth](https://github.com/KronicDeth) - * Fix `ConcurrentModificationException` in Structure View - - Java 9 fixed a bug (https://bugs.openjdk.java.net/browse/JDK-8071667) in `HashMap` where `computeIfAbsent` did not - check for concurrent modifications, and it turns out that `TreeElementList` was using concurrent modifications, so - it was now broke. - - Fixed by use `get` or `put` if it is absent, so that `putNew` can ensure that the `CallDefinition` is in - the `TreeElementList` before it is added to the `MutableList`, which was the original reason why there - was a `put` inside of `computeIfAbsent`, which would have `put` when the function returned anyway. - -## v11.0.1 - -### Bug Fixes - -* [#1548](https://github.com/KronicDeth/intellij-elixir/pull/1545) - [@KronicDeth](https://github.com/KronicDeth) - * The java plugin dependency needs to be declared so that it shows up for compiling the JPS builder system and the - project importer in IntelliJ and Android Studio, but it needs to be optional, so that the plugin is still compatible - with Rubymine and the other small IDEs. - -## v11.0.0 - -### Enhancements - -* [#1545](https://github.com/KronicDeth/intellij-elixir/pull/1545) - [@KronicDeth](https://github.com/KronicDeth) - * Simplifications due to only supporting IntelliJ 2019.2 - * Don't use reflection for error report Submitter - * Don't use deprecated WeakHashMap. It was needed for backwards compatibility, but since this build is for 2019.2 - only, no compatibility is necessary and it clears up the long warnings from the logs for end users. - * Remove reflection from OutputToGeneralTestEventsConverters. Only 2019.2 is now supported, so no need for - complicated backwards compatibility. - * Only support IntelliJ 2019.2 in Travis CI - * Remove Elixir 1.5 and 1.6 builds as they are both > 1 year since the last release approximately. - -### Bug Fixes - -* [#1545](https://github.com/KronicDeth/intellij-elixir/pull/1545) - [@KronicDeth](https://github.com/KronicDeth) - * IntelliJ 2019.2 compatibility - * Explicitly depend on java plugin. 2019.2 extracted the Java functionality to a plugin (as - outlined [here](https://blog.jetbrains.com/platform/2019/06/java-functionality-extracted-as-a-plugin/)), which - includes the JPS builder used for Project Build functionality. - * Remove project converterts. Project converters are broken in 2019.2 because the `DialogWrapper` they try to launch - isn't being launched in the Event Dispatch Thread ( - EDT) (https://youtrack.jetbrains.com/issue/IDEA-218071). - - As this is bug in code wholey controlled by upstream, the only option is to remove the project converters. The - work-around is for users to re-import projects when a project layout update is necessary. - * Fix nullability of `override` arguments in `ChooseByNameModel` - * Don't use dependency injection for OpenProcessor builder. JetBrains has removed dependency injection for - Extensions in 2019.2. - * Don't pass a null name ot findSdk - -### Incompatible Changes - -* [#1545](https://github.com/KronicDeth/intellij-elixir/pull/1545) - [@KronicDeth](https://github.com/KronicDeth) - * Changes needed for 2019.2 compatibility make this build incompatible with earlier releases. - -## v10.6.0 - -### Enhancements - -* [#1492](https://github.com/KronicDeth/intellij-elixir/pull/1492) - Add Linux Mint Erlang and Elixir home paths to SDK - home path suggestions. Linux Mint installs to `/usr/lib/erlang` and `/usr/lib/elixir` instead - of `/usr/local/lib/erlang` and `/usr/local/lib/elixir`. - [@KronicDeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#1491](https://github.com/KronicDeth/intellij-elixir/pull/1491) - [@KronicDeth](https://github.com/KronicDeth) - * Elixir 1.8 made `:elixir.quoted_to_erl/3` private, so in Elixir 1.8+, the debugger needs to inline the private - version to maintain < 1.8 and >= 1.8 compatibility. - * Reformat debugger for Elixir 1.8 - -## v10.5.1 - -### Bug Fixes - -* [#1483](https://github.com/KronicDeth/intellij-elixir/pull/1483) - [@KronicDeth](https://github.com/KronicDeth) - * Numerous users have reported that annotation can encounter a `StackOverflowError` - . [A reproduction case](https://github.com/KronicDeth/intellij-elixir/issues/1475#issuecomment-491616192) shows - that they are called by Phoenix `Web` modules where one function containing `quote` block `use`s the same module - again, such as an `admin_view` depending on the base `view` through `use App.Web, :view`. When - the `use App.Web, :view` is resolving, the `defmacro __using__` is re-entered as is the `admin_view` because there - was no tracking of already visited `PsiElement`s. The fix is to track the visited elements and not re-enter the - visited elements so that `admin_view` is skipped and the other call definition clauses can be checked to find `view` - . - -## v10.5.0 - -### Enhancements - -* [#1445](https://github.com/KronicDeth/intellij-elixir/pull/1445) - [@KronicDeth](https://github.com/KronicDeth) - * Replace comparator with Comparator.reverseOrder() - * The correct home path for `kiex` is `~/.kiex/elixirs/elixir-VERSION/lib/elixir` as that contains the true `lib` - and `bin` directory, but users may select other directories by mistake, so doing the following adjustments: - * Adjust `bin` home path to `lib/elixir`. - * Adjust `elixirs/elixir-VERSION` home path to `elixirs/elixir-VERSION/lib/elixir`. -* [#1462](https://github.com/KronicDeth/intellij-elixir/pull/1462) - Use reflections to allow saving settings when - creating the projects before in 2018.3 and 2019.1 even though the API changed. - - [@KronicDeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#1443](https://github.com/KronicDeth/intellij-elixir/pull/1443) - [@KronicDeth](https://github.com/KronicDeth) - * 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_MODULE`s: - 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`](https://github.com/JetBrains/intellij-community/blob/1f49fc455d01f4b887463853db48e814f6700fb3/platform/platform-impl/src/com/intellij/platform/PlatformProjectOpenProcessor.java#L186-L188) - will trigger `DirectoryProjectConfigurator`s to - be [run](https://github.com/JetBrains/intellij-community/blob/1f49fc455d01f4b887463853db48e814f6700fb3/platform/platform-impl/src/com/intellij/platform/PlatformProjectOpenProcessor.java#L206) - , 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. -* [#1444](https://github.com/KronicDeth/intellij-elixir/pull/1444) - Increase suspect `nameSet` size to `15` to - support [`geo`](https://hex.pm/packages/geo). `geo` - has [13 `String.Chars` implementations](https://hexdocs.pm/geo/3.1.0/api-reference.html). - - [@KronicDeth](https://github.com/KronicDeth) -* [#1445](https://github.com/KronicDeth/intellij-elixir/pull/1445) - [@KronicDeth](https://github.com/KronicDeth) - * Remove obsolete `SdkType`. I keep confusing it with its replacement `org.elixir_lang.sdk.elixir.Type`! - * Check that HomePath has `ebin` paths when validation. Prevents selecting false HomePaths for `kiex`. -* [#1446](https://github.com/KronicDeth/intellij-elixir/pull/1446) - Adding missing ESpec template. When reviewing #1410 - I missed that the template wasn't in `resources`. 🤦‍♂️ - [@KronicDeth](https://github.com/KronicDeth) -* [#1447](https://github.com/KronicDeth/intellij-elixir/pull/1447) - Ignore `targets` when calculating `Dep` path. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1448](https://github.com/KronicDeth/intellij-elixir/pull/1448) - Ignore `organization` when calculating `Dep` path. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1449](https://github.com/KronicDeth/intellij-elixir/pull/1449) - Get view provider document in read action. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1450](https://github.com/KronicDeth/intellij-elixir/pull/1450) - Support `rebar.config` deps that are name only. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1456](https://github.com/KronicDeth/intellij-elixir/pull/1456) - Always use `containingFile` - for `QualifiableAlias` `maxScope` for `getReference`. Prevents cache capturing `maxScope`, which can vary based on - invocation. - [@KronicDeth](https://github.com/KronicDeth) -* [#1462](https://github.com/KronicDeth/intellij-elixir/pull/1462) - [@KronicDeth](https://github.com/KronicDeth) - * Create new project before attaching it in Small IDEs. When attaching a directory to a project during startup, saving - is disallowed, so the attached directory only has a `workspace.xml` in its `.idea` when the attach is attempted. - Attaching requires the `.idea/*.iml` Module file, so the attaching fails, saying the directory is an unsupported - format. - - Experimentation showed that manually attaching the directory also did not work, but opening the directory in a - separate window, then opening and attaching it again would make the directory have the full project files. To mimic - this manual process: - - 1. The internals of `doOpenProject` are copied - 2. A save of the project files is forced, bypassing the normal "startup" save blocker - 3. The project is attached to the root project. - - Tested to work when upgrading from 10.4.0 to 10.5.0-pre in Rubymine when no project was already open. - * Check if project can be attached instead of if RubyMine Although GoLand supports attaching projects, it doesn't work - for non-Go projects, so it is also excluded. How the support appears in each non-IntelliJ IDEA is shown below: - - | IDE | Works? | | - |:---------------|:-------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| - | Android Studio | YES | Android Studio is built on top of IntelliJ, so it has full multi-Module support. It is not Small IDE. | - | CLion | NO | No Attach to Project support to multiple module support. | - | DataGrip | No | DataGrip doesn't have a Project View and doesn't support Attach to Project. You can still run tests if you directly open the file. | - | GoLand | NO | Modules show up, but independent projects are not attached as in other Small IDEs, so disabled. In general, the Go settings, like Test Runners always win, so it is recommended to not use GoLand at all for Elixir development. | - | PHPStorm | YES | The projects are listed in Directories. The Languages & Frameworks > Elixir shows all 3 projects. Right-clicking on the marked Test directory will not show the Elixir Run Configuration, Python ones win, but subdirectories and `*_test.exs` will show up in the context menu. | - | PyCharm | YES | The root project is listed in Project. `app/*` projects are listed listed as Project Dependencies of the root Project. The Languages & Frameworks > Elixir shows all 3 projects. Right-clicking on the marked Test directory will not show the Elixir Run Configuration, Python ones win, but subdirectories and `*_test.exs` will show up in the context menu. | - | Rider | No | Solution system is separate from Project system. | - | Rubymine | YES | The projects are listed in Project Structure. The Languages & Frameworks > Elixir shows all 3 projects. Right-clicking on the marked Test directory will not show the Elixir Run Configuration, Python ones win, but subdirectories and `*_test.exs` will show up in the context menu. | - | WebStorm | NO | No Attach to Project support or multiple module support. | - * Don't count Android Studio as a Small IDE. It includes Project Structure menu with multiple-language, - multiple-Module per Project support from IntelliJ. - -## v10.4.0 - -### Enhancements - -* [#1410](https://github.com/KronicDeth/intellij-elixir/pull/1410) - * ESpec Test Runner - [alex-dukhno](https://github.com/alex-dukhno) - * ESpec Graphical Test Results - [@KronicDeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#1410](https://github.com/KronicDeth/intellij-elixir/pull/1410) - [@KronicDeth](https://github.com/KronicDeth) - * Only show Run/Debug ExUnit when `*_test.exs` files exist. - * Only show Run/Debug ESpec when `*_spec.exs` files exist. -* [#1415](https://github.com/KronicDeth/intellij-elixir/pull/1415) - - Wrap `UnqualifiedNoArgumentCall.quote` `identifier.text` in `runReadAction`. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1419](https://github.com/KronicDeth/intellij-elixir/pull/1419) - Fix typos in `CONTRIBUTING.md` - - [@nschulzke](https://github.com/nschulzke) -* [#1420](https://github.com/KronicDeth/intellij-elixir/pull/1420) - Prevent the module attribute annotator from running - in EEx files. - [@nschulzke](https://github.com/nschulzke) - -## v10.3.0 - -### Enhancements - -* [#1404](https://github.com/KronicDeth/intellij-elixir/pull/1404) - Add Type Specifications to Dbgi tab for :elixir_erl - backend. - [@KronicDeth](https://github.com/KronicDeth) -* [#1407](https://github.com/KronicDeth/intellij-elixir/pull/1407) - Bug Report issue template. - - [@KronicDeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#1408](https://github.com/KronicDeth/intellij-elixir/pull/1408) - [@KronicDeth](https://github.com/KronicDeth) - * Cache all computed Elixir levels at the file, module, project, and SDK levels. The computed Elixir level is used to - determine how to emulate the various grammar changes made for the different Elixir versions. This bug was - potentially introduced as earlier as[v7.0.0]() (2017-12-15) and as late - as [v7.5.0](https://github.com/KronicDeth/intellij-elixir/releases/tag/v7.5.0) (2018-06-03) as - that's [the history for `LevelPropertyPusher.java`](https://github.com/KronicDeth/intellij-elixir/commits/da149f8430cd378e964ae5a53a127754b3a00bc9/src/org/elixir_lang/file/LevelPropertyPusher.java) - and has affected all later versions. If you ever experienced the 6.X series as faster than the 7.X series and later, - this bug may be why and you should upgrade/reinstall immediately. - -## v10.2.0 - -### Enhancements - -* [#1353](https://github.com/KronicDeth/intellij-elixir/pull/1353) - [@KronicDeth](https://github.com/KronicDeth) - * Improve support for umbrella projects in Small IDEs like Rubymine by creating a separate module for each `mix.exs` - when opening a directory (`DirectoryConfigurator`). This matches the pre-existing support in Rich IDEs (IntelliJ - Community & Ultimate Edition) when using Import From External Model and Quick Import when opening a directory. - * Ignore `assets` directory when looking for `mix.exs` files for Import From External Model, Quick Import and - Directory Configurator. -* [#1355](https://github.com/KronicDeth/intellij-elixir/pull/1355) - [@KronicDeth](https://github.com/KronicDeth) - * Update Build Matrix - * Add `2018.3`. - * Update `gradlew` to `5.0`. - * Update `org.jetbrains.intellij` to `0.3.12`. - * Update `org.jetbrains.kotlin.kvm` to `1.3.10`. - * Update Kotlin `apiVerision` to `1.3`. - * Update `de.undercouch.download` to `3.4.3`. - * Don't configure Kotlin in projects that don't use it. - * Remove `2017.3` to keep version count at `3`. - -### Bug Fixes - -* [#1355](https://github.com/KronicDeth/intellij-elixir/pull/1355) - Prevent `ConcurrentModificationException`s when - updating `gradle` by using `allprojects` less. - [@KronicDeth](https://github.com/KronicDeth) -* [#1359](https://github.com/KronicDeth/intellij-elixir/pull/1359) - [@KronicDeth](https://github.com/KronicDeth) - * Remove unused variables in Elixir debugger server. - * Protect from `AssertionError` when `VirtualFileCache` is disposed. -* [#1360](https://github.com/KronicDeth/intellij-elixir/pull/1360) - Protect from `AssertionError` - when `VirtualFilePointerContainer` is disposed. - [@KronicDeth](https://github.com/KronicDeth) -* [#1364](https://github.com/KronicDeth/intellij-elixir/pull/1364) - Use `:path` for deps for paths external to project. - Unfortunately, even though they show up in the Project Structure, only `ebin` directories are shown as it is - restricted to those marked as `CLASSES` and the `:path` `lib` is a `SOURCES`. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1367](https://github.com/KronicDeth/intellij-elixir/pull/1367) - Ignore `:tag` when finding path to dep. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1368](https://github.com/KronicDeth/intellij-elixir/pull/1368) - No longer use the forked version - of `TerminalExecutionConsole` as `2018.3`'s version doesn't have the text echoing behavior that was being bypassed - before. - [@KronicDeth](https://github.com/KronicDeth) -* [#1372](https://github.com/KronicDeth/intellij-elixir/pull/1372) - Ignore `:ref` when finding path to dep. - - [@KronicDeth](https://github.com/KronicDeth) - -## v10.1.0 - -### Enhancements - -* [#1330](https://github.com/KronicDeth/intellij-elixir/pull/1330) - [@KronicDeth](https://github.com/KronicDeth) - * Add IntelliJ Elixir Help to Help menu that opens link in browser using plugin version to link to README.md on - GitHub. - - ![screen shot 2018-11-02 at 12 06 52 pm](https://user-images.githubusercontent.com/298259/47929684-cfa62400-de97-11e8-9542-2d4bc2b3c825.png) - - The link will work on released versions that have a tag. -* [#1334](https://github.com/KronicDeth/intellij-elixir/pull/1334) - [@KronicDeth](https://github.com/KronicDeth) - * Allow creating `ExUnit.Case` modules from template. Template contains - * `use ExUnit.Case` - * `alias` of the source module - * `@moduletag :capture_log` - * `doctest` - * `test` that checks that the source module exists. - * Convert `CreateElixirModuleAction` to Kotlin. - * Drop "Elixir" prefix from templates name in Elixir File dialog since you already know you're creating an Elixir - File. - -### Bug Fixes - -* [#1327](https://github.com/KronicDeth/intellij-elixir/pull/1327) - Fix deadlinks to Run Configurations, which broke - when section was renamed Run/Debug Configurations and auto-anchor changed name. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1328](https://github.com/KronicDeth/intellij-elixir/pull/1328) - Fix image links in `README`. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1331](https://github.com/KronicDeth/intellij-elixir/pull/1331) - Ensure `defmodule` one-liner isn't mistaken for - call definition head in Go To Symbol. - [@KronicDeth](https://github.com/KronicDeth) -* [#1336](https://github.com/KronicDeth/intellij-elixir/pull/1336) - Wrap `packagePisToDepSet` in read action because - checking the validity of the dependencies requires a read action. - [@KronicDeth](https://github.com/KronicDeth) - -## v10.0.1 - -### Bug Fixes - -* [#1322](https://github.com/KronicDeth/intellij-elixir/pull/1322) - [@KronicDeth](https://github.com/KronicDeth) - * Eliminate freezes when calculating Module and Library dependencies during project import and dependency updates. - * Run library syncing in tasks: When importing projects, run sync as a modal task while when `VirtualFileSystem` - events occur, run sync as background tasks. Either style of task is cancellable and importantly, it allows to show - what is happening during the syncing. This converts the unresponsive UI beachball on macOS during import to an - updating progress bar. - * Calculate dep sets iteratively with a work queue instead of recursively to limit the calculation of dep set for a - root to 1 time. Then use normal transitive walk to get complete dep set for module. Vastly speeds up project - import. - * Cache dep set on package `PsiFile` to allow faster refreshes when indirect dependencies don't change. -* [#1323](https://github.com/KronicDeth/intellij-elixir/pull/1323) - [@KronicDeth](https://github.com/KronicDeth) - * Log `nameSet` when it reaches suspect size (`10`) to allow triaging if it is a real bug or just something with a lot - of valid names. - * Fix inverted condition around when to warn and when to error and use `readAheadLength`. - -## v10.0.0 - -### Enhancements - -* [#1272](https://github.com/KronicDeth/intellij-elixir/pull/1272) - [@KronicDeth](https://github.com/KronicDeth) - * Go To Symbol and completion will only resolve in project source unless non-project sources are turned on. - * `deps` are properly marked as Libraries and no longer count as being in the project scope for the Go To tools. - * In umbrella projects, when `in_umbrella` is used, the Project Module for each `apps/#{APP_NAME}` will be marked a - dependency, - * Library and Modules are properly connected as dependencies, so that only declared dependencies will resolve, - lessening false completions and declarations when different OTP app share common Module or function names. - * `deps` and the `_build/#{MIX_ENV}/lib/#{DEP_NAME}` will be marked as Excluded, so that Libraries appear in External - Libraries at the bottom of the Project Pane. -* [#1275](https://github.com/KronicDeth/intellij-elixir/pull/1275) - [@KronicDeth](https://github.com/KronicDeth) - * Go To Class action (Cmd+O) to go to modules separately from all functions as would happen with Go To Symbols ( - Alt+Cmd+O). - * New ModuleName index keeps track of only the names of modulars: - * defmodule - * defimpl - * defprotocol - - It is used to power gotoClassContributor for Go To Class action. -* [#1280](https://github.com/KronicDeth/intellij-elixir/pull/1280) - Handle `commit` and `override` for `Mix.Dep`. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1283](https://github.com/KronicDeth/intellij-elixir/pull/1283) - Add `.eex` to `.ex` and `.exs` for accepted file - extensions used to hyperlink files in stacktraces. - [@KronicDeth](https://github.com/KronicDeth) -* [#1285](https://github.com/KronicDeth/intellij-elixir/pull/1285) - [@KronicDeth](https://github.com/KronicDeth) - * Resolve unaliased name when using `alias __MODULE__, as: Mod` - * Resolve usage of `Mod` in `alias __MODULE__, as Mod` - 1. `Mod` - 2. `__MODULE__` in `alias __MODULE__` - 3. `defmodule MyModule` that is enclosing `__MODULE__`. - * Disable `ProcessCanceledException` for `runIde` gradle task, to allow for easier manual testing of completion and Go - To actions during development. - * Completion of functions in current module when using `Mod.` after `alias __MODULE__, as: Mod`. - * Show more context for `alias` calls in presentations, like "Choose Declaration" pop up for Go To Declaration. - * Show resolved `__MODULE__` name (`alias MyModule`) when using `alias __MODULE__`. - * Show full `alias MyModule, as: Mod` when listing `Mod` in `alias __MODULE__, as Mod`. -* [#1293](https://github.com/KronicDeth/intellij-elixir/pull/1293) - [@KronicDeth](https://github.com/KronicDeth) - * Exclude common directories when importing projects - * `cover` for test coverage - * `doc` for `ex_doc` - * `logs` for log files - * `assets/node_modules/phoenix` for `phoenix` - * `assets/node_modules/phoenix_html` for `phoenix_html` - * Setup Libraries and Module dependencies when importing projects from Mix. -* [#1299](https://github.com/KronicDeth/intellij-elixir/pull/1299) - Regression test - for [#1270](https://github.com/KronicDeth/intellij-elixir/issues/1270). - [@KronicDeth](https://github.com/KronicDeth) -* [#1313](https://github.com/KronicDeth/intellij-elixir/pull/1313) - [@KronicDeth](https://github.com/KronicDeth) - * Update gradle wrapper to 3.5 to allow for environment variable overrides - * Setup datetime based pre-release versioning to ensure that correct version of pre-release plugin is used when - testing Install Plugin From Disk. -* [#1318](https://github.com/KronicDeth/intellij-elixir/pull/1318) - [@KronicDeth](https://github.com/KronicDeth) - * Canary, pre-release builds (`vMAJOR.MINOR.PATCH-pre+YYYYMMDDHHMMSS`) from `master` branch - * GitHub pre-release [releases](https://github.com/KronicDeth/intellij-elixir/releases) - * Release on the [canary channel](https://plugins.jetbrains.com/plugins/list?channel=canary&pluginId=7522) in - the [JetBrains Plugin Repository](https://plugins.jetbrains.com/plugin/7522-elixir) - -### Bug Fixes - -* [#1277](https://github.com/KronicDeth/intellij-elixir/pull/1277) - Don't include `null` `useCall` as `__MODULE__` - dependency. - [@KronicDeth](https://github.com/KronicDeth) -* [#1279](https://github.com/KronicDeth/intellij-elixir/pull/1279) - [@KronicDeth](https://github.com/KronicDeth) - * Wrap `LibraryTable#removeLibrary` in write action. - * Wrap `Library#modifiableModule#commit` in write action. -* [#1282](https://github.com/KronicDeth/intellij-elixir/pull/1282) - Check if `Mix.Dep` has already been seen to prevent - recursive loops. - [@KronicDeth](https://github.com/KronicDeth) -* [#1287](https://github.com/KronicDeth/intellij-elixir/pull/1287) - [@KronicDeth](https://github.com/KronicDeth) - * More closely - match [ExUnit.CliFormatter](https://github.com/elixir-lang/elixir/blob/v1.7.3/lib/ex_unit/lib/ex_unit/cli_formatter.ex) - output in Test Runner. - * Don't `inspect` ExUnit failure `reason` as `##teamcity` `message`. - * Add captured logs to failure - * Colorize test failures - including diff colorization - * `.formatter.exs` input globs would not match file paths because it was default that needed `lib` on top and not - version-dependent paths used in `resources/exunit`. -* [#1291](https://github.com/KronicDeth/intellij-elixir/pull/1291) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore branch and hex options when finding path of Mix.Dep - * Map Elixir 1.7 `:excluded` and `:skipped` (added - in [elixir-lang/elixir#7245](https://github.com/elixir-lang/elixir/pull/7245)) to `testIgnored` teamcity message, - thereby restoring ignored test counts and markers from Elixir 1.6. -* [#1293](https://github.com/KronicDeth/intellij-elixir/pull/1293) - [@KronicDeth](https://github.com/KronicDeth) - * When the entire deps directory has updated sync the children deps directories and then sync all modules instead of - syncing them after each dep. - * For an unknown reason, when sync occurs at `initComponent` time in `DepsWatcher` or `mix.Watcher`, the child - directories of the project `basedDir` aren't shown in the Project Pane until a change is applied in Project - Structure. - * Use `invokeAndWait` instead of `invokeLater` to ensure order of syncs. -* [#1299](https://github.com/KronicDeth/intellij-elixir/pull/1299) - When finding a `defmodule`, check that it is an - ancestor of the entrance of the `ResolveState`, so that nested sibling modules are not scanned for potential call - definition clauses, but only the outer module of the entrance. - [@KronicDeth](https://github.com/KronicDeth) -* [#1300](https://github.com/KronicDeth/intellij-elixir/pull/1300) - Improve error message - for `org.elixir_lang.debugger.settings.stepping.module_filter.editor.table.Model.getValueAt`, so we can detect if - there is an off-by-1 error. - [@KronicDeth](https://github.com/KronicDeth) -* [#1304](https://github.com/KronicDeth/intellij-elixir/pull/1304) - Remove `@2x` and `@3x` SVG icons that render wrong - size in 2018.3 EAP. - [@KronicDeth](https://github.com/KronicDeth) -* [#1305](https://github.com/KronicDeth/intellij-elixir/pull/1305) - [@KronicDeth](https://github.com/KronicDeth) - * Fix unused variables in `TeamCityExUnitFormatting` - * `reason` was completely unused. - * `details` should have been used. -* [#1306](https://github.com/KronicDeth/intellij-elixir/pull/1306) - [@KronicDeth](https://github.com/KronicDeth) - * `flushBufferBeforeTerminating` was deprecated and in newer IntelliJ the call to `processStatuses` does not occur - unless `flushBufferOnProcessTermination` is also overridden. - * Treat `== Compilation error` in `STDOUT` as `ERROR` for ExUnit reporter - * Convert `(CompileError)` of a test file to test failure. The "Test framework quit unexpectedly" is converted to a - failed run with a single test with the compilation error as the failure message. -* [#1308](https://github.com/KronicDeth/intellij-elixir/pull/1308) - [@KronicDeth](https://github.com/KronicDeth) - * Don't treat redefinition of `defmodule` macro as module definition (as occurs - in [@bitwalker](https://github.com/bitwalker)'s [distillery](https://github.com/bitwalker/distillery)' - s `Mix.Tasks.Release.Init.MixMock` - * Bump `AllName` `VERSION` to re-index and drop bad call definition head - from [#1301](https://github.com/KronicDeth/intellij-elixir/issues/1301). -* [#1310](https://github.com/KronicDeth/intellij-elixir/pull/1310) - Don't log compilation errors as test failures - unless a test has started. Test name being called `mix test` does not work, so log those compilation errors as normal - build messages instead. - [@KronicDeth](https://github.com/KronicDeth) -* [#1311](https://github.com/KronicDeth/intellij-elixir/pull/1311) - Don't interpret `:crypto` by default: `:crypto` - includes NIFs that can't be reloaded and so kills the debugger. - [@KronicDeth](https://github.com/KronicDeth) -* [#1312](https://github.com/KronicDeth/intellij-elixir/pull/1312) - Protect from `null` `containingFile` for modular - names during completion. - [@KronicDeth](https://github.com/KronicDeth) -* [#1313](https://github.com/KronicDeth/intellij-elixir/pull/1313) - Wrap `syncPublisher(JDK_TABLE_TOPIC)` - in `invokeLater` `runWriteAction`. - [@KronicDeth](https://github.com/KronicDeth) - -### Incompatible Changes - -* [#1272](https://github.com/KronicDeth/intellij-elixir/pull/1272) - [@KronicDeth](https://github.com/KronicDeth) - * Dependencies are now counted as external to the project, so the Go To tools, like Go To Symbol will no longer - include matches for both project sources and dependencies sources together, instead they will follow the more - JetBrains native behavior - * Project sources will be shown by default - * If there are no project matches, dependencies will be shown instead. - * If you want to include dependency (non-project) matches, you can check the box or hit Cmd+O. -* [#1293](https://github.com/KronicDeth/intellij-elixir/pull/1293) - Modules and Libraries won't be automatically setup - when a project or module is opened, but instead only when `apps` or `deps` directories or subdirectories change. - - [@KronicDeth](https://github.com/KronicDeth) - -## v9.0.0 - -### Enhancements - -* [#1255](https://github.com/KronicDeth/intellij-elixir/pull/1255) - [@KronicDeth](https://github.com/KronicDeth) - * Resolve calls through `use AnAlias` calls - 1. `AnAlias` will be resolved to its modular (module, implementation, or protocol) - 2. The `__using__` macro in the modular is found - 3. The last call in `__using__` is checked - - * If it is a `quote` block, check for call definitions recursively inside the block - * If it is an `apply/3` call - 1. Resolve the first argument as a modular - 2. Scan for each function in `modular` - 3. In each function Goto Step 3 above - - This handling is what specifically makes `use MyAppWeb, :controller` in Phoenix apps now work. - * If it is a general call - 1. Resolve the call to its definition - 2. Goto Step 3 above -* [#1259](https://github.com/KronicDeth/intellij-elixir/pull/1259) - [@KronicDeth](https://github.com/KronicDeth) - * Go To Related (`Ctrl+Cmd+Up`) can be used to Go To the decompiled Module or call definitions when on a source - modular (`defimpl`, `defmodule`, or `defprotocol`) or callable (`def`, `defp`, `defmacro`, `defmacrop`). This - somewhat restores the ability to go to both source and decompiled module and calls before 9.0.0, but now the source - is preferred for Go To Declaration and the decompiled will only be available if there is no source and if you - definitely want decompiled, you'll need to use Go To Related. - -### Bug Fixes - -* [#1245](https://github.com/KronicDeth/intellij-elixir/pull/1245) - Specify that Kotlin Plugin is needed - in `CONTRIBUTING.md`, so IntelliJ plays nice. - [@sfat](https://github.com/sfat) -* [#1246](https://github.com/KronicDeth/intellij-elixir/pull/1246) - [@KronicDeth](https://github.com/KronicDeth) - * Resolve unqualified bracket operation identifiers (`var` in `var[key]`) to variables or `0`-arity calls. - * Fixes renames of variables not renaming usage of variables for Access lookups (i.e. `var[key]`). -* [#1248](https://github.com/KronicDeth/intellij-elixir/pull/1248) - [@KronicDeth](https://github.com/KronicDeth) - * Go To Symbol will no longer show redundant entries - * Call Definitions (`name/arity`) is no longer shown if the Call Definition Clause is also included. This isn't a - large loss because the `/arity` was not searchable and only part of the presentation. - * If there is a decompiled and a source version of a symbol, only the source version will be shown. - * The source Implementation will be shown and not the decompiled Module with the same fully-qualified - name (`.`). - * Items will be deduped if they point to the same element, such as function clauses with default arguments because - when presented they look the same even if internally one is representing `/1` and `/2`, for example. -* [#1249](https://github.com/KronicDeth/intellij-elixir/pull/1249) - Ensure that Go To Declaration for qualified calls - such as `Module.function(...)` where `Module` is an alias does not return the decompiled version of `Module` when the - source is available. - [@KronicDeth](https://github.com/KronicDeth) -* [#1256](https://github.com/KronicDeth/intellij-elixir/pull/1256) - [@KronicDeth](https://github.com/KronicDeth) - * Fix completion not working for unqualified functions from `import`s. - * When I switched to using `?.let` I accidentally hid the `if` from running when there was - no `ENTRANCE_CALL_DEFINITION_CLAUSE`, so the correct form is add if there is no entrance or if there is a - non-equivalent entrance. - * I just straight up forgot an ! on a contains check. I moved to computeIfAbsent, so it is more obvious what the - intent is. - -### Incompatible Changs - -* [#1248](https://github.com/KronicDeth/intellij-elixir/pull/1248) Go To Symbol and Go To Declaration will no longer - suggest decompiled modules or functions if source modules or functions of the same name or module/name/arity exists. - - [@KronicDeth](https://github.com/KronicDeth) - -## v8.1.0 - -### Enhancements - -* [#1226](https://github.com/KronicDeth/intellij-elixir/pull/1226) - Flat icons to - match [IntelliJ IDEA 2018.2 design rules](https://blog.jetbrains.com/blog/2018/06/26/new-icons-in-intellij-platform-2018-2/) - . Thanks to [@nk8](https://github.com/nk8) for consulting on the design and showing me how to use Figma. - - [@KronicDeth](https://github.com/KronicDeth), [@nk8](https://github.com/nk8) -* [#1233](https://github.com/KronicDeth/intellij-elixir/pull/1233) - Regression test - for [#1228](https://github.com/KronicDeth/intellij-elixir/issues/1228) - [@KronicDeth](https://github.com/KronicDeth) -* [#1239](https://github.com/KronicDeth/intellij-elixir/pull/1239) - Use icon provided by Lidiya - Chernigovskaya ([@LChernigovskaya](https://github.com/LChernigovskaya)) and created by JetBrains UX (Alina Mishina) - for `pluginIcon` compatibility with IntelliJ IDEA 2018.3. - [@KronicDeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#1233](https://github.com/KronicDeth/intellij-elixir/pull/1233) - Look above `Enum.reduce` for enclosing macro call. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1234](https://github.com/KronicDeth/intellij-elixir/pull/1234) - [@KronicDeth](https://github.com/KronicDeth) - * Add Facet SDK as External Library to re-enable indexing. When the External Library was removed - in [4297287](https://github.com/KronicDeth/intellij-elixir/commit/42972876c219e9da7283513bc5677e5121b5e0fe) in favor - of a real SDK, completion for SDK `.beam` modules was lost because Small IDEs don't index SDKs, but only External - Libraries, so add Application-wide External Libraries for SDKs when they are created (and update, remove on edit or - delete), which are then added as a Dependency for the facet's module when the SDK is set for the Small IDE project. - * Convert old modules with Elixir facets to also have External Library, so that users don't need to remove and add - the SDKs to get the External Library. -* [#1237](https://github.com/KronicDeth/intellij-elixir/pull/1237) - [@KronicDeth](https://github.com/KronicDeth) - * Use #AEB9C0 for JetBrains Default/Light Gray. Use #87939A for JetBrains Darcula Gray. Colors based on IntelliJ's - color picker picking its own colors. - - Icon matching testing done under both themes in 2018.2.1. Weirdly, the colors are different in the SVGs in my - intellij-community@master. Hopefully, this doesn't mean the colors change again in 2018.3. -* [#1244](https://github.com/KronicDeth/intellij-elixir/pull/1244) - [@KronicDeth](https://github.com/KronicDeth) - * Run `createLibrary` inside `runWriteAction`. - * Remove test that leaks threads and so causes builds to fail. - -## v8.0.0 - -### Enhancements - -* [#1175](https://github.com/KronicDeth/intellij-elixir/pull/1175) - [@KronicDeth](https://github.com/KronicDeth) - * New and improved Run/Debug Configurations - * Distillery Release CLIs for running `console`, `foreground`, etc Options for configuring each part of the command - line - * Path to Release CLI - * Release CLI arguments (like a command `console`) - * Settings that are normally hidden in environment variables - * `erl` arguments (`ERL_OPTS`) - * `elixir -extra` arguments (`EXTRA_OPTS`) - * Code Loading Mode (`CODE_LOADING_MODE`) - * Log Directory (`RUNNER_LOG_DIR`) - * Replace OS Vars (`REPLACE_OS_VARS`) - * `sys.config` file (`SYS_CONFIG_PATH`) - * Release Config Directory (`RELEASE_CONFIG_DIR`) - * Pipe directory (`PIPE_DIR`) - * Use Pseudo-Terminal (PTY) to allow overriding console type when it can't be inferred from the Release CLI - arguments, such as using PTY for `console` because it uses an `iex`-like shell. - * Working Directory - * Environment Variables - * `iex` console with proper PTY support (colors, tab completion, history) - Options for configuring each part of the command line - * `iex` arguments - * `erl` arguments - * Working Directory - * Environment Variables - * `elixir` with colors Options for configuring each part of the command line - * `elixir` arguments - * `erl` arguments - * Working Directory - * Environment Variables - * `mix` tasks getting expanded options to match the new configurations - * `mix` arguments, which used to be called "Program Arguments" (I figured out how to customize that name. 😉) - * `elixir` arguments - * `erl` arguments - * Working Directory - * Environment Variables - * `iex -S mix` - Options for configuring each part of the command line - * `mix` arguments - * `iex` arguments - * `erl` arguments - * Working Directory - * Environment Variables - * `mix test` - * `mix test` arguments, which used to be called "Program Arguments" - * `elixir` arguments - * `erl` arguments - * Working Directory - * Environment Variables - * Debugger enhancements - * All the above configurations can be debugged using the debugger. It is no longer restricted to only working - with `mix`-based configurations. - * Filter more common dependency modules from being interpreted by default. - * `credo` - * `inch_ex` - * `earmark` - * `ex_doc` - * More ways to filter interpreted modules - * Run Configurations now have an Interpreted Modules tab, next to Configuration, which by default imports the - Application-wide settings, but allows - * Disabling inherited filters - * Adding configuration-specific filters - * Remove configuration-specific filters - * Allow interpreted modules to be uninterpreted when the debugger is running, using the "Interpreted Modules" tab. - * Improved Variables pane by showing the Elixir name of variables instead of Erlang names - * Evaluate can evaluate an Elixir expression in any stack frame. -* [#1192](https://github.com/KronicDeth/intellij-elixir/pull/1192) - [@KronicDeth](https://github.com/KronicDeth) - * Add all OTP 21 opcodes to disassembler. Previous opcode set was frozen prior to OTP 21 release and missed some later - additions. - - | number | name | Added | - |:-------|:-------------------|:----------------------| - | `160` | `build_stacktrace` | Before OTP 21 release | - | `161` | `raw_raise` | Now | - | `162` | `get_hd` | Now | - | `163` | `get_tl` | Now | -* [#1196](https://github.com/KronicDeth/intellij-elixir/pull/1196) - [@KronicDeth](https://github.com/KronicDeth) - * Spell checking for identifiers, aliases, comments, and literals (charlists, strings, and sigils). - * Dictionaries for common dependencies - * Elixir - * Ecto -* [#1203](https://github.com/KronicDeth/intellij-elixir/pull/1203) - [@KronicDeth](https://github.com/KronicDeth) - * Elixir 1.7 debugger Variables and Evaluate compatibility - * Elixir 1.7 names Erlang variables like `_@` while Elixir 1.6 - used `V@` - * Elixir 1.7 changed `elixir_erl` record and `%Macro.Env{}`, which changed how `:elixir.quoted_to_erl` needed to be - called. -* [#1208](https://github.com/KronicDeth/intellij-elixir/pull/1208) - Update `2018.2` to `2018.2.1` in build matrix. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1210](https://github.com/KronicDeth/intellij-elixir/pull/1210) - Regression test - for [#1141](https://github.com/KronicDeth/intellij-elixir/issues/1141) - [@KronicDeth](https://github.com/KronicDeth) -* [#1212](https://github.com/KronicDeth/intellij-elixir/pull/1212) - Improve Cannot Create SDK error message (additions - in **bold**): "You need to configure an Erlang SDK for Elixir SDK. **Click OK to be take through the Erlang SDK - configuration. Click Cancel to stop configuring this SDK AND the Erlang SDK.**" - - [@KronicDeth](https://github.com/KronicDeth) -* [#1223](https://github.com/KronicDeth/intellij-elixir/pull/1223) - Convert mix and mix test run configurations to new - format. - [@KronicDeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#1188](https://github.com/KronicDeth/intellij-elixir/pull/1188) - Show `...` for module name when `Dbgi` has no - module name as happens for instrumented modules from `IEx.break/4`. - [@KronicDeth](https://github.com/KronicDeth) -* [#1189](https://github.com/KronicDeth/intellij-elixir/pull/1189) - Don't assume `callDefinitionClause` is non-`null`. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1190](https://github.com/KronicDeth/intellij-elixir/pull/1190) - Don't assume parent of list access expression - is `QuotableKeywordPair`- [@KronicDeth](https://github.com/KronicDeth) -* [#1191](https://github.com/KronicDeth/intellij-elixir/pull/1191) - Don't assume parent of keywords is a list. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1208](https://github.com/KronicDeth/intellij-elixir/pull/1208) - `TerminalExecutionConsole` itself echos input - in `2018.2` and `2018.2.1`, which was introduced - in https://github.com/JetBrains/intellij-community/commit/fd7bbd0cb7f3c2a5add8872e0e6c5172be5f074a#diff-5acc2eb2e78fe52d7458d4a48b0eac9f - , but it was reverted in JetBrains/intellij-community@5f4465b, so this uses that version to maintain compatibility - across supported versions. - [@KronicDeth](https://github.com/KronicDeth) -* [#1210](https://github.com/KronicDeth/intellij-elixir/pull/1210) - In `Phoenix.Router.Helpers`, a `quote` block - appears as the head of `[head | tail]` list, so add support for search for enclosing macro call above `|`. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1213](https://github.com/KronicDeth/intellij-elixir/pull/1213) - Treat EEx tag the same as `StabBody` for use scope. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1214](https://github.com/KronicDeth/intellij-elixir/pull/1214) - Use `ATOM` for keyword keys instead - of `IDENTIFIER_TOKEN` as `ATOM` allows for `@`, which is needed for correctness. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1215](https://github.com/KronicDeth/intellij-elixir/pull/1215) - In `eachEbinPath`, the ebin directories were found - by iterating `/lib` and then iterating grandchild of that, so that all paths - matching `/lib//ebin` would be added, but for some installs from source, like SDK, there are - non-OTP-app files in `/lib`, so filter `/lib/` to only directories. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1216](https://github.com/KronicDeth/intellij-elixir/pull/1216) - - `org.elixir.lang.psi.scope.Module.aliasedName(QualifiedAlias)` was already converted to - use `org.elixir_lang.psi.operation.Normalized` and `org.elixir_lang.psi.infix.Normalized`, which makes it work with - errors in the PSI tree, so there's no need protect with an assert and that assert would be wrong in times of errors - handled by `Normalized`. - [@KronicDeth](https://github.com/KronicDeth) -* [#1217](https://github.com/KronicDeth/intellij-elixir/pull/1217) - - `org.elixir_lang.reference.module.UnaliasedName.down(PsiElement)` only expects `ElixirAccessExpression` - or `QualifiableAlias`, but for unexpected classes of elements, it was a simple Kotlin `TODO()`, which didn't log - anything useful for enhancements. Replace the `TODO()` with an `org.elixir_lang.errorreport.Logger.error`, so that - the element's class and content can be reported when this happens again. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1164](https://github.com/KronicDeth/intellij-elixir/pull/1168) - Use `/` in paths passed to Erlang, even on Windows - - [@notriddle](https://github.com/notriddle) - -### Incompatible Changes - -* [#1175](https://github.com/KronicDeth/intellij-elixir/pull/1175) - Drop support for IntelliJ IDEA before 2017.3 as - they lack the `TerminalExecutionConsole` used to run `iex` in a PTY. - [@KronicDeth](https://github.com/KronicDeth) - -## v7.5.0 - -### Enhancements - -* [#1055](https://github.com/KronicDeth/intellij-elixir/pull/1055) - Refactor `ElixirPsiImplUtil` into separate files - tied to specific classes or interfaces to shrink its size. - [@KronicDeth](https://github.com/KronicDeth) -* [#1073](https://github.com/KronicDeth/intellij-elixir/pull/1073) - Complete `#{` with `}`. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1109](https://github.com/KronicDeth/intellij-elixir/pull/1109) - [@KronicDeth](https://github.com/KronicDeth) - * Read Write Accessor Detector - * Variable/Parameter declarations/rebindings are highlighted as writes while other usages are highlighted as reads. - * Improved Find & Show Usages - * Added Find & Show Usages for Functions at declaration and usage site - * Multi-clause functions use all clauses as targets and find usages of all clauses. - * Improved Find & Show Usages for Modules/Aliases - * Improved Element Descriptions - * It is easier to distinguish `alias`es and the `defmodule` that is being aliased because element description now - include `alias` or `defmodule` before the Alias name based on how the Alias is defined in the scope. - * Call definitions use the same presentation for Structure View and Find Usages, so that Compile/Runtime time icons, - and visibility are the same in both. -* [#1111](https://github.com/KronicDeth/intellij-elixir/pull/1111) - Regression test - for [#1091](https://github.com/KronicDeth/intellij-elixir/issues/1091) - [@KronicDeth](https://github.com/KronicDeth) -* [#1120](https://github.com/KronicDeth/intellij-elixir/pull/1120) - Add regression tests - for [#1116](https:/github.com/KronicDeth/intellij-elixir/issues/1116) that test that parameter and variables can be - renamed. - [@KronicDeth](https://github.com/KronicDeth) -* [#1124](https://github.com/KronicDeth/intellij-elixir/pull/1124) - Update IntelliJ versions in build matrix to - include `2018.1` and latest patch version of other versions. - [@KronicDeth](https://github.com/KronicDeth) -* [#1126](https://github.com/KronicDeth/intellij-elixir/pull/1126) - [@KronicDeth](https://github.com/KronicDeth) - * Add Elixir 1.6.X to build matrix - * Update grammar and quoter to match native 1.6 behavior when SDK is >= 1.6. - * New default SDK level is 1.7 to handle builds from `master`. -* [#1127](https://github.com/KronicDeth/intellij-elixir/pull/1127) - Regression test - for [#1105](https://github.com/KronicDeth/intellij-elixir/issues/1105) - [@KronicDeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#1056](https://github.com/KronicDeth/intellij-elixir/pull/1056) - Certain `.beam` files in the OTP source are - purposely invalid, so ignore them when trying to parse and don't log the expected error. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1060](https://github.com/KronicDeth/intellij-elixir/pull/1060) - Log available bytes and total size when header is - not `FOR1`. - [@KronicDeth](https://github.com/KronicDeth) -* [#1071](https://github.com/KronicDeth/intellij-elixir/pull/1071) - `erl_abstract_code` format `Dbgi` chunks can now be - navigated similar to how `elixir_erl` format Dbgi chunks can be navigated. Instead of converting - the [Erlang Abstract Code](http://erlang.org/doc/apps/erts/absform.html) back to Erlang, which would not be - highlighted if [intellij-erlang](https://github.com/ignatov/intellij-erlang) and requires the user to know Erlang, the - Erlang Abstract Code is translated back to Elixir source, so you can use the Dbgi chunk view to translate Erlang to - Elixir. - [@KronicDeth](https://github.com/KronicDeth) -* [#1111](https://github.com/KronicDeth/intellij-elixir/pull/1111) - Allow zero or more new lines after the struct name - before the opening curly brace (`{`). - [@KronicDeth](https://github.com/KronicDeth) -* [#1112](https://github.com/KronicDeth/intellij-elixir/pull/1112) - [@KronicDeth](https://github.com/KronicDeth) - * In order to prevent `Access is allowed from event dispatch thread only` errors when creating read-only code editor - in subtabs of the BEAM Chunks editor, only create those editors when their parent tab is selected. - - Affected tabs: - * Code (Elixir & Erlang) - * ExDc - * Dbgi (Elixir & Erlang) -* [#1114](https://github.com/KronicDeth/intellij-elixir/pull/1114) - Check for suffix instead of full match to detect - predefined macros when annotating. Location strings have become more complex, such as including the file path for root - level modules, so the old exact matching on the module name no longer works. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1120](https://github.com/KronicDeth/intellij-elixir/pull/1120) - Restore parameter and variable rename. It broke - because the changes to make Find Usages work and have Go To Declaration default to Find Usage when there is only one - target disabled the default selected element code that the `VariableInplaceRenameHandler` used. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1121](https://github.com/KronicDeth/intellij-elixir/pull/1121) - [@KronicDeth](https://github.com/KronicDeth) - * Allow module attribute declaration to resolve to itself, so that unused module attributes don't say they can't find - the declaration. - * Restore rename module attributes. -* [#1127](https://github.com/KronicDeth/intellij-elixir/pull/1127) - Allow `true` and `false` to be keyword keys. - - [@KronicDeth](https://github.com/KronicDeth) - -## v7.4.0 - -### Enhancements - -* [#1036](https://github.com/KronicDeth/intellij-elixir/pull/1036) - [@KronicDeth](https://github.com/KronicDeth) - * Clean up debugger - * `mix format` debugger - * Restructure debugger. - * Convert IDE-side to Kotlin - * Allow files to skip interpreting in the debugger to be configured in Preferences > Build, Execution, Deployment > - Debugger > Stepping. It is recommended to customize these settings instead of - using `INTELLIJ_ELIXIR_DEBUG_BLACKLIST` environment variable. `INTELLIJ_ELIXIR_DEBUG_BLACKLIST` should be reserved - to additional modules that need to not be interpreted only for specific runs. - * Ship a set of patterns that excludes Elixir standard library by default and most `mix phx.new` dependencies, so - that debugger boots faster for most users. - * Support debugging `.eex` templates - * Detect MFAs that refer to template functions in Phoenix view modules derived from `.eex` template files, to allow - stepping through Elixir tags in those templates. - * Allow setting breakpoints in `.eex` files when a `.beam` file using the template's relative can be found. ** - This means that the Phoenix view module `.beam` file must exist in `_build` prior to setting a breakpoint. Run the - Run Configuration once, before debugging to complete the build if setting a breakpoint does not work.** - * `.beam` files are now indexed by their `Line` chunk `filenames` subsection to power this feature. - * Cache `.beam` `Beam` `Cache` on `VirtualFile`. Cache is invalidated and refreshed on modification of - the `VirtualFile`. Cache is used for both BEAM Chunks read-only editors and `Line` chunk file name index. -* [#1037](https://github.com/KronicDeth/intellij-elixir/pull/1037) - Each package manager uses a different root path and - which directory to pick above the ebins varies by package manager, so document package manager install paths. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1041](https://github.com/KronicDeth/intellij-elixir/pull/1041) - [@KronicDeth](https://github.com/KronicDeth) - * Restructure JPS code to remove prefixes and suffixes in class names that redundant with package names. - * Show warnings-as-errors checkbox - as [original blocker](https://github.com/elixir-lang/elixir/issues/3116#issuecomment-87316125) has been fixed for - awhile and `ProcessAdapter` turns warning text into errors that IDE understands. -* [#1045](https://github.com/KronicDeth/intellij-elixir/pull/1045) - [@KronicDeth](https://github.com/KronicDeth) - * When importing Mix projects, don't exclude compiler output from indexing because it is needed to resolve Elixir Line - Breakpoints in EEx files. - * For pre-existing Elixir modules, they will be converted to not exclude compiler output. -* [#1047](https://github.com/KronicDeth/intellij-elixir/pull/1047) - [@KronicDeth](https://github.com/KronicDeth) - * Exclude known uninterpretable modules - * `Bcrypt.Base` - * `:erocksdb` - * `:lz4` - * `:re2` - -### Bug Fixes - -* [#1036](https://github.com/KronicDeth/intellij-elixir/pull/1036) - [@KronicDeth](https://github.com/KronicDeth) - * Turn off `dbeug` flag when starting `IntelliJElixir.DebugServer`, which removes the `*DBG*` statements that kept - printing in the ExUnit output when using the debugger. - * Fix conversion of Elixir module names to Erlang module names for `INTELLIJ_ELIXIR_DEBUG_BLACKLIST` environment - variable. - * Cache `null` SDK `Release`, so that when Elixir is configured, but the Erlang path is broken (such as after - a `brew unlink erlang`, the `Release` calculating using `elixir` - * Implement `Macro.atomToString` - * Properly render improper lists - * Show improper list with explicit `|` for presenation - * Children of improper lists show `head` and `tail` instead of index. - * Show Elixir indices (`0`-based) instead of Erlang indices (`1`-based`) for lists and tuples. -* [#1037](https://github.com/KronicDeth/intellij-elixir/pull/1037) - Loosen check on the path suffix by looking for - only `lib` and not `lib/erlang/lib`, so that it works for both Homebrew's `ebin` paths and ASDF's `ebin` paths. - - [@KronicDeth](https://github.com/KronicDeth) -* [#1041](https://github.com/KronicDeth/intellij-elixir/pull/1041) - [@KronicDeth](https://github.com/KronicDeth) - * Remove unused `MixBuilder` because building with `mix` is just an option in `ElixirBuilder`. - * Harmonize JPS compile server's invoking of `mix` to pattern used in Run Configuration runners. - * Use `mix` path from SDK - * No longer say the build succeeded when there are obvious `mix` errors - * Parse `mix compile` output for compilation errors and warnings - * When "warnings-as-errors" is enabled in "Elixir compiler" settings, IDE also shows warnings as errors. - * IDE will know build failed if there are errors (or warnings treated as errors) and properly allow rebuild. -* [#1045](https://github.com/KronicDeth/intellij-elixir/pull/1045) - [@KronicDeth](https://github.com/KronicDeth) - * Group alternatives in `erlang_module_name_patterns_to_regex` before pinning: I always forget that the `|` swallows - the `^` and `$` in regexes. - * Reject vs filter accumulation got flipped when switching to `Enum.reduce` to track rejections. -* [#1047](https://github.com/KronicDeth/intellij-elixir/pull/1047) - [@KronicDeth](https://github.com/KronicDeth) - * Some modules, like NIF modules, can't be loaded into the debugger. Individual modules not being debuggable shouldn't - kill the debugger task, so rescue the known error and record it for later debugging of the debugger. - * Add `:` to start of Erlang module names for included debugger excludes - -## v7.3.0 - -### Enhancements - -* [#988](https://github.com/KronicDeth/intellij-elixir/pull/988) - [@KronicDeth](https://github.com/KronicDeth) - * Update build matrix - * Update IntelliJ IDEA version `2017.3` to `2017.3.2` - * Update Elixir version `1.5.2` to `1.5.3` -* [#1015](https://github.com/KronicDeth/intellij-elixir/pull/1015) - [@KronicDeth](https://github.com/KronicDeth) - * Add supplemental file editor for `.beam` files: "BEAM Chunks". The decompiled binary file will continue to be shown - on the default "Text" editor tab. - ![screen shot 2018-02-01 at 6 38 07 pm](https://user-images.githubusercontent.com/298259/35710803-17198a52-077f-11e8-8991-2aebe7f3eb38.png) - The BEAM Chunks editor is subdivided into further tabs, one for each chunk in the `.beam` file. - ![screen shot 2018-02-01 at 6 45 23 pm](https://user-images.githubusercontent.com/298259/35710979-1d367930-0780-11e8-8a40-acaef92e621c.png) - The tabs are listed in the order that the chunks occur in the `.beam` file. - * The `Atom` chunk holds `LATIN-1` atoms while `AtU8` holds `UTF8` atoms. There will only be one of these - atom-related chunks in any given `.beam` file. `AtU8` is used in newer versions of OTP that support UTF8 atoms. - - The `Atom`/`AtU8` tab shows a table with the columns - - | Column | Description | Source | - |:-----------|:----------------------------------------------------------------------------------------------------------------------|:--------| - | Index | Which is 1-based to match Erlang convention. In the `Code` chunk, `atom(0)` is reserved to always translate to `nil` | Derived | - | Byte Count | The byte count for the atom's bytes | Raw | - | Characters | From encoding the bytes as LATIN-1 for `Atom` chunk or UTF-8 for `AtU8` chunk | Derived | - - ![screen shot 2018-02-01 at 7 01 43 pm](https://user-images.githubusercontent.com/298259/35711460-9aeea9ae-0782-11e8-9d3f-074c05326b4c.png) - - Index 1 is always the module name for the `.beam` file. Since `.beam` is originally an Erlang format, for Elixir - modules, you'll see the full atom name of with the `Elixir.` prefix instead of the Alias name used in Elixir - source. - * The `Attr` chunk holds the module attributes, but only those that are persisted. - - The `Attr` tab shows a table with the columns - - | Column | Description | Source | - |:-------|:-----------------------------------------------------------------------------------------------------------------|:-------| - | Key | Attribute name | Raw | - | Value | Attribute value. **Note: The value always appears as a list as read from the binary format. I don't - know why.** | Raw | - - ![screen shot 2018-02-02 at 2 34 22 pm](https://user-images.githubusercontent.com/298259/35753689-576eaf18-0826-11e8-838c-f00fc93fd667.png) - - All modules will have a `:vsn` attribute that is either set explicitly or defaults to the MD5 of the module. - * The `CInf` chunk is the Compilation Information for the Erlang or Erlang Core compiler. Even Elixir modules have - it because Elixir code passes through this part of the Erlang Core compiler. - - The `CInf` tab shows a table with the columns - - | Column | Description | Source | - |:-------|:----------------|:-------| - | Key | Option name | Raw | - | Value | Inspected value | Raw | - - ![screen shot 2018-02-02 at 3 19 50 pm](https://user-images.githubusercontent.com/298259/35755542-4d769c76-082d-11e8-84d9-ef04ff45b346.png) - * The `Code` chunk contains the byte code for the module. It is encoded - in [BEAM Compact Term Encoding](http://beam-wisdoms.clau.se/en/latest/indepth-beam-file.html#beam-compact-term-encoding) - , which differs from the binary format produced by `term_to_binary`. - - The `Code` tab shows a read-only editor with one byte code operation on each line. For ease of reading, operations - are grouped by function and then label block with indentation indicating scope. - - ![screen shot 2018-02-02 at 9 35 59 pm](https://user-images.githubusercontent.com/298259/35762701-18b0882e-0861-11e8-9d3d-675811bd45dd.png) - - By default as many references to other chunks and references to other parts of `Code` chunk are inlined to ease - understanding. If you want to see the raw byte code operations, you can turn off the various inliners. - * The `Dbgi` chunk contains Debug Info. It was [introduced](https://github.com/erlang/otp/pull/1367) in OTP 20 as a - replacement for the `Abst` chunk. While the `Abst` chunk was required to contain the Erlang AST, the `Dbgi` format - can contain the debug info for other languages, such as Elixir `quoted` form AST. - - Because the format is language neutral, the format is a set of nested, versioned formats. The outer most layer is - - ```elixir - {:debug_info_v1, backend, metadata | :none} - ``` - - For `:debug_info_v1`, Elixir's `backend` is `:elixir_erl`. The `metadata` for `:elixir_erl` is further - versioned: `{:elixir_v1, map, specs}`. - - `map` contains the bulk of the data. - - | Key | Value | - |:----------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| - | `:attributes` | Attributes similar to the `Attr` chunk, but at the Elixir, instead of Core Erlang level. Usually they match with the exception that `attributes` doesn't contain `vsn` when `Attr` contains the `MD5` version | - | `:compile_opts` | Compilation options similar to `CInf` chunk's `options` key, but at for Elixir, instead of Core Erlang level. | - | `:definitions` | The Elixir `quoted` AST for reach function clause. | - | `:file` | The name of the file the module was generated from. | - | `:line` | The line in `:file` where the module was defined, such as the line `defmodule` occurred. | - | `:module` | The name of the module as an `atom` | - | `:unreachable` | Unreachable functions | - - The `Dbgi` tag show the single value map entries: `:file`, `:line`, and `:module` - - ![screen shot 2018-02-02 at 5 26 04 pm](https://user-images.githubusercontent.com/298259/35759265-33c33742-083e-11e8-9a4f-97cfd52bbe8e.png) - - For the multi-value keys: `:attributes`, `:compile_opts`, and `:definitions`, there are individual tabs. - - ![screen shot 2018-02-02 at 5 27 29 pm](https://user-images.githubusercontent.com/298259/35759293-6117c83e-083e-11e8-8327-ec7c66cade69.png) - - The Attributes tab has the same format as the `Attr`s chunk - - ![screen shot 2018-02-02 at 6 47 49 pm](https://user-images.githubusercontent.com/298259/35760967-9c7e0914-0849-11e8-8d53-e402653b70fa.png) - - The Compile Options tab is usually empty, much like the `CInf` `options` key for Erlang. - - ![screen shot 2018-02-02 at 6 48 34 pm](https://user-images.githubusercontent.com/298259/35760988-c3ef0f52-0849-11e8-9ca6-2cbeba8eda23.png) - - The Definitions tab is split between a tree of Module, Function/Arity and clauses. - - ![screen shot 2018-02-02 at 6 50 14 pm](https://user-images.githubusercontent.com/298259/35761058-3710d04c-084a-11e8-99e3-0f2aa4f8837d.png) - - Clicking on a clause will show only that clause, but clicking on a higher level in the tree will show all - clauses in the function or the entire Module. - - ![screen shot 2018-02-02 at 6 53 17 pm](https://user-images.githubusercontent.com/298259/35761087-7a6e0b8e-084a-11e8-9f86-6e4840eab25d.png) - - ![screen shot 2018-02-02 at 8 47 05 pm](https://user-images.githubusercontent.com/298259/35762314-55fb0dd2-085a-11e8-8381-faacc880d29e.png) - - ![screen shot 2018-02-02 at 8 47 20 pm](https://user-images.githubusercontent.com/298259/35762317-5b9f9136-085a-11e8-8b53-03be16b7a06c.png) - - The AST stored in the `definitions` tab and the process of converting it back to code is not format preserves, - so it will not look precisely like the source code as the AST has undergone some macro expansion before its - put in the Dbgi chunk. *As common idioms are understood, reversals will be add to the renderer.* - * The `ExDc` chunk stores ExDoc. Not the rendered HTML from the `ex_doc` package, but the the `@doc` - , `@moduledoc`, and `@typedoc` attribute values that work even without `ex_doc` installed. This chunk is what - is consulted when the `h` helper is used in `iex`. - - The `ExDc` binary format is from `term_to_binary`, so it can be reversed with `binary_to_term`. The term - format is a versioned as `{version, versioned_format}`. The current `version` tag is `:elixir_docs_v1` and - the `versioned_format` is a [Keyword.t](https://hexdocs.pm/elixir/Keyword.html#t:t/0) with `:callback_docs` - , `:docs`, `:moduledoc`, and `:type_docs` keys. - - Like `Dbgi`, the `ExDc` tab is split between a tree to navigate and an editor to show the decompiled value. - - ![screen shot 2018-02-02 at 8 58 38 pm](https://user-images.githubusercontent.com/298259/35762423-024913d0-085c-11e8-88ee-c794474a5da5.png) - - ![screen shot 2018-02-02 at 9 07 03 pm](https://user-images.githubusercontent.com/298259/35762502-139d2b8e-085d-11e8-97a6-4b16d19dfccb.png) - - | Node | Description | - |:-------------------------|:-----------------------------------| - | *Root* | All docs | - | Module | `@moduledoc` | - | Types | All `@typedoc`s | - | Types *child* | A specific `@typedoc` | - | Callbacks | All `@callback` `@doc`s | - | Callbacks *child* | A specific `@callback`'s `@doc` | - | Functions/Macros | All `@doc`s for functions/macros | - | Functions/Macros *child* | A specific function/macro's `@doc` | - - * The `ExpT` chunk is the Export Table. The name "Export" derives from the `Erlang` module attribute `-export`, - which is used to "export" functions from a module. It is the equivalent of making a function or macro public - with `def` and `defmacro` as opposed to making it private with `defp` and `defmacrop` in Elixir. - - The `ExpT` tab shows a table with the columns - - | Column | Description | Source | - |:-----------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------| - | Atom Index | Index into the `Atom` or `AtU8` chunk for the function's name | Raw | - | Name | The atom referenced by "Atom Index" | Derived | - | Arity | The arity (argument count) of the function | Raw | - | Label | Label index in the `Code` chunk where the function is defined. This label is usually immediately after the `func_info` operation and before the first pattern match or guard operation. | Raw | - - ![screen shot 2018-02-01 at 8 21 13 pm](https://user-images.githubusercontent.com/298259/35713581-b36f17ba-078d-11e8-87e3-0c50b2624676.png) - - You'll notice the first entry starts with `MACRO-`. This is because the BEAM, being made for Erlang has no - concept of macros. It only understands functions, so Elixir macros, like `__using__/1` called by `use` are - compiled to plain Erlang functions with `MACRO-` prefixed to their name and an extra argument ( - the `__CALLER__` environment) as the first argument, which increases the arity, yielding a full MFA - of `MACRO-__using__/2` as seen above. - - * The `ImpT` chunk is the Import Table. It **DOES NOT** encode just the Erlang `-import` attributes or - Elixir `import` macro calls: it tracks any external function or macro called from another - module. `call_ext_*` operations in the `Code` chunk don't store the Module and Function (MF) of the function - they will call directly in the bytecode, instead, one of the arguments is an index into the `ImpT` chunk. This - way, all external calls are normalized into the `ImpT` chunk instead of being denormalized to the call site. - The arity still appears at the call site to help with checking the argument count. - - The `ImpT` tab shows a table with the columns - - | Column | Description | Source | - |:--------------------|:-------------------------------------------------------------|:--------| - | Index | 0-based index used by references in the `Code` chunk. | Derived | - | Module Atom Index | Index into the `Atom` or `AtU8` chunk for the Module's name | Raw | - | Module Atom | The atom referenced by "Module Atom Index". | Derived | - | Function Atom Index | Index into the `Atom` or `AtU8` chunk for the functon's name | Raw | - | Function Atom | The atom referened by "Function Atom Index". | Derived | - - ![screen shot 2018-02-01 at 8 07 15 pm](https://user-images.githubusercontent.com/298259/35713189-93432ff0-078b-11e8-8856-df067459adf9.png) - - You may notice that `erlang.byte_size/1` is included in the table. This is because even bifs are referenced by - MFA and not a pre-assigned number as would be the case for system calls in operating systems like Linux. BEAM - is like an Operation System, but not in all ways. - * The `LitT` chunk contains literals loaded as arguments in `Code` chunk. Confusingly, in the `Code` chunk - sometimes the `literal(N)` term is used to encode integer `N`, an index into another chunk, or an - actual `index` into the `LitT`. How `literal` terms are handled is completely dependent on the specific - operation, so without having outside knowledge about the bytecode operation arguments for BEAM, the best way - to figure out if `literal` terms are an integer or an index is to toggle the various controls in the `Code` - tab to see if `literal` with no inlining turns into a `LitT` literal, `FunT` function reference, `ImpT` - function reference, or integer. - - The `LitT` tab shows a table with the columns - - | Column | Description | Source | - |:-------|:---------------------------------------------------------|:--------| - | # | 0-based index used by references in the `Code` chunk. | Derived | - | Term | The equivalent of `raw |> binary_to_term() |> inspect()` | Raw | - - ![screen shot 2018-02-01 at 9 25 07 pm](https://user-images.githubusercontent.com/298259/35715153-674f088c-0796-11e8-89e8-fd3c6c083a45.png) - * The `LocT` chunk is the dual to the `ExpT` chunk: it contains all private functions and macros. - - The `LocT` tab shows a table with the columns - - | Column | Description | Source | - |:-----------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------| - | Atom Index | Index into the `Atom` or `AtU8` chunk for the function's name | Raw | - | Name | The atom referenced by "Atom Index" | Derived | - | Arity | The arity (argument count) of the function | Raw | - | Label | Label index in the `Code` chunk where the function is defined. This label is usually immediately after the `func_info` operation and before the first pattern match or guard operation. | Raw | - - ![screen shot 2018-02-01 at 9 27 49 pm](https://user-images.githubusercontent.com/298259/35715229-ca135b1c-0796-11e8-80a4-971470f1c6d2.png) - - You'll notice the first entry `-__struct__/1-fun-0-`, starts with `-` and have a `/` suffix with `fun` in it. - This naming scheme is used for anonymous functions such as those defined with `fn` or the capture - operator (`&`) in Elixir. Much like how macros don't really exist and use a `MACRO-` suffix, anonymous - functions/lambdas don't exist, and instead use a distinct naming scheme `-/*fun*`. - Unlike `MACRO-`, which is an Elixir invention, anonymous functions/lambdas really being local named functions - with derived names is also done in pure Erlang modules. Erlang's anonymous functions are defined with `fun`, - which is where the `fun` part of the naming scheme comes from. - * The `StrT` chunk contains a single contiguous pool of all Erlang strings (that is, Elixir charlists) used in - the `Code` chunk. These strings are used for byte code operations like `bs_put_string`. Not all strings appear - in `StrT`. Some strings, including most Elixir strings (Erlang binaries) appear in the `LitT` chunk that holds - literals. - - ![screen shot 2018-02-01 at 7 56 15 pm](https://user-images.githubusercontent.com/298259/35712876-040796d8-078a-11e8-8eb6-6b7f203bbd4a.png) - - The `StrT` is contiguous with no separation of strings. Instead of encoding the start and length of each - string in the chunk itself, the start and length for any given string is passed as arguments to the byte code - operations in the `Code` chunk. By doing this, shared substrings can be efficiently encoded in `StrT`. -* [#1021](https://github.com/KronicDeth/intellij-elixir/pull/1021) - [@KronicDeth](https://github.com/KronicDeth) - * Support for https://github.com/elixir-lang/elixir/commit/23c7542d95683a497a7b93071b9ccbbeb9e45d2f - - | Version | Struct | Started Event | Finished Event | `%ExUnit.Test{}` field | - |----------|----------------------|-------------------|--------------------|------------------------| - | < 1.6.0 | `%ExUnit.TestCase{}` | `:case_started` | `:case_finished` | `case` | - | > = 1.6.0 | `%ExUnit.TestCase{}` | `:module_started` | `:module_finished` | `module` | - - Because Elixir 1.6.0 could not introduce a breaking change, the `< 1.6.0` event are fired, - but `resources/exunit/1.6.0/team_city_ex_unit_formatting.ex` will ignore them and only convert the `>= 1.6.0` - event to TeamCity event used in the JetBrains Test Runner UI. -* [#1018](https://github.com/KronicDeth/intellij-elixir/pull/1018) - Expose Declarations > Functions and Declarations > - Macros in Color Settings - [@dimcha](https://github.com/dimcha) - -### Bug Fixes - -* [#1019](https://github.com/KronicDeth/intellij-elixir/pull/1019) - Don't use `StreamEx` because support is - inconsistent across IDEs - [@KronicDeth](https://github.com/KronicDeth) -* [#999](https://github.com/KronicDeth/intellij-elixir/pull/999) - [@ronanboiteau](https://github.com/ronanboiteau) - * Jetbrains' Gogland is now named GoLand, updated README accordingly - * In donors list, Garrett Hart had his GitHub URL (`@https://github.com/thirdshift`) shown instead of his GitHub - username (`@thirdshift`) - -## v7.2.1 - -### Bug Fixes - -* [#980](https://github.com/KronicDeth/intellij-elixir/pull/980) - Use `documentionRootType` to indirectly get the - documentation `OrderRootType` in the Erlang SDK Type, so that it works in Small IDEs that have more than `CLASSES` - and `SOURCES` root types installed. - [@KronicDeth](https://github.com/KronicDeth) -* [#981](https://github.com/KronicDeth/intellij-elixir/pull/981) - [@KronicDeth](https://github.com/KronicDeth) - * The [`credo`](https://github.com/rrrene/credo) annotator is disabled by default as numerous users find - running `mix credo` in the background has a negative impact on their system performance. If you like to try enabling - the annotation, you can turn it on using the configuration. - - 1. Preferences > Editor > Inspections > Elixir - 2. Check "Credo" - 3. Click OK to save and close Preferences - - If you notice a degradation the in the responsiveness of the editor, it is recommended you disable the annotator - again. - - 1. Preferences > Editor > Inspections > Elixir - 2. Uncheck "Credo" - 3. Click OK to save and close Preferences -* [#982](https://github.com/KronicDeth/intellij-elixir/pull/982) - Protect from `PsiFile` being `null` in `Local` credo - inspector - [@KronicDeth](https://github.com/KronicDeth) -* [#983](https://github.com/KronicDeth/intellij-elixir/pull/983) - Run `Qualified#moduleName` `getText` in Read Action. - - [@KronicDeth](https://github.com/KronicDeth) -* [#985](https://github.com/KronicDeth/intellij-elixir/pull/985) - Scratch Files have a `Project`, but not a `Module`, - so change flow to use `Project` when `Module` is `null` in credo annotator. - - [@KronicDeth](https://github.com/KronicDeth) -* [#986](https://github.com/KronicDeth/intellij-elixir/pull/986) - Don't add `.bat` to `mix` on Windows. `mix` is never - run as an executable. It is either run as a script to `elixir.bat` OR as an argument to `erl.exe` when `erl.exe` is - running `elixir`. - [@KronicDeth](https://github.com/KronicDeth) - -## v7.2.0 - -### Enhancements - -* [#963](https://github.com/KronicDeth/intellij-elixir/pull/963) - `mix` runs will be faster as they will no longer - check to see if the SDK is updated. - [@KronicDeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#963](https://github.com/KronicDeth/intellij-elixir/pull/963) - Avoid problems with read and write locks when - updating Elixir SDK on-demand by instead updating them when any project is open using a project converter. - - [@KronicDeth](https://github.com/KronicDeth) -* [#964](https://github.com/KronicDeth/intellij-elixir/pull/964) - - [JetBrains/intellij-community@9adbba0](https://github.com/JetBrains/intellij-community/commit/9adbba0b6fe279bcc65ad96ab7332d7bf5b59a83) - added `@NotNull` to `OrderRootType.getOrderRootType`, which `JavaDocRootType.getInstance` calls, which means any - Small IDE using `intellij-community` since 4 months ago, including the newest CLion cannot - have `JavadocOrderRootType.getInstance` safely called. - [@KronicDeth](https://github.com/KronicDeth) -* [#966](https://github.com/KronicDeth/intellij-elixir/pull/966) - Path changes were not being written back to disk - because the `projectSdksModel.apply()` was being called before the `editor.apply()`, which would have copied to - the `editor'`s path changes to the `projectSdksModel`. - [@KronicDeth](https://github.com/KronicDeth) - -## v7.1.0 - -### Enhancements - -* [#955](https://github.com/KronicDeth/intellij-elixir/pull/955) - [@KronicDeth](https://github.com/KronicDeth) - * Start using Kotlin for new development. - * Elixir Facet in Small IDEs - * Preferences > Languages & Frameworks > Elixir can set the Elixir Facet SDK for the Project Module used in Small - IDEs as a per-project settings. - * Preferences > Languages & Frameworks > Elixir> SDKs can add, delete, and configure Elixir SDKs as per-application - settings. - * Preferences > Languages * Frameworks > Elixir > Internal SDKs can add, delete, and configure Erlang SDK for Elixir - SDKs as per-application settings. - * Configure SDK before running `mix` when importing mix projects, so that the `mix` path does not need to be - configured separately from the SDK path. - * The `mix` path no longer needs to be setup independently from the Elixir SDK. -* [#957](https://github.com/KronicDeth/intellij-elixir/pull/957) - Add Local shared `credo` inspection, so the - the `credo` inspection works for Code > Code Cleanup. - [@KronicDeth](https://github.com/KronicDeth) -* [#958](https://github.com/KronicDeth/intellij-elixir/pull/958) - [@KronicDeth](https://github.com/KronicDeth) - * Show Mix ExUnit in context menu in Elixir Facets, so that - * Run 'Mix ExUnit ...' - * Debug 'Mix ExUnit ...' - * "Create "Mix ExUnit ...'" - - appear in Rubymine when you right-click the `test` directory and it is Marked as a Test Sources Root. It will appear - green in Rubymine if already marked. To mark it, do the following: - - 1. Right-Click `test` directory - 2. Select "Mark Directory as > Test Sources Root" - -### Bug Fixes - -* [#955](https://github.com/KronicDeth/intellij-elixir/pull/955) - [@KronicDeth](https://github.com/KronicDeth) - * Protect access to `JavadocOrderRootType.getInstance()` so that it doesn't cause an error in Small IDEs where its - Extension Point is not defined. - * If the explanation tooltip is empty, fallback to the message for the credo annotator instead. -* [#956](https://github.com/KronicDeth/intellij-elixir/pull/956) - Check if `SdkAdditionalData` is `null` before - getting `ErlangSDK` as it can be `null` in certain scenarios in Rubymine. - - [@KronicDeth](https://github.com/KronicDeth) -* [#958](https://github.com/KronicDeth/intellij-elixir/pull/958) - [@KronicDeth](https://github.com/KronicDeth) - Fix `isConfigurationFromContext`, so that it works on Mix ExUnit Run Configurations generated from directories. Check - if the `programParameters` and `workingDirectory` match by just generating another configuration from the context as - this ensures the logic matches and includes support for `PsiDirectory`. - -## v7.0.0 - -### Enhancements - -* [#944](https://github.com/KronicDeth/intellij-elixir/pull/944) - [@KronicDeth](https://github.com/KronicDeth) - * Eliminate the majority of the `eolStar` parser rules around operators where they do not matter leaving only - the `eolStar` after `COMMA` and the the ones that help differentiate unary and binary `+`/`-`. This simplifies the - parser and under certain conditions should prevent reparsing when only `WHITE_SPACE` changes in size. - * Look-ahead in the lexer, where it's cheaper than the parser to see if the next token does not care if there's - an `EOL` or normal `WHITE_SPACE`. - * After operators that don't care if they are followed by `EOL`, try to match all following `WHITE_SPACE` - , `ESCAPED_EOL` and `EOL`. -* [#950](https://github.com/KronicDeth/intellij-elixir/pull/950) - [@KronicDeth](https://github.com/KronicDeth) - * If you want to limit the performance impact of the credo annotator because `mix credo` spikes your CPU, you can - limit the number of `mix credo` runs to 1 per open file by disabling the Explanation tooltip - - 1. Preferences > Editor > Inspections > Credo - 2. Uncheck "Include Explanation" - - If you don't want the annotator to run at all on open editors, then you can disable the paired inspection - - 1. Preferences > Editor > Inspections - 2. Uncheck Elixir > Credo - - If you've unchecked the inspection, it disables both the annotation and the pair inspection when Analyze > Inspect - Code... is run. You can still run the Credo inspection by name. - - 1. Analyze > Run Inspection By Name... (⌥⇧⌘I) - 2. Type "Credo" - 3. Select "Credo" from the shortened list - 4. Hit Enter. - - You'll be presented with a "Run 'Credo'" dialog - - 1. Change the "Inspection scope" from "Whole project", which would include the `deps` to "Custom scope" - 2. Select "Project Production Files" from the "Custom scope" dropdown - 3. Click "OK" -* [#951](https://github.com/KronicDeth/intellij-elixir/pull/951) - [@KronicDeth](https://github.com/KronicDeth) - * Setup `VirtualFilePointerManager` during `ParsingTestCase` - * Put `LineMarkerInfo` on leaf elements for Method (Call Definition) Separators for a performance improvement. - * Add IntelliJ IDEA 2017.3 to the build matrix - -### Bug Fixes - -* [#947](https://github.com/KronicDeth/intellij-elixir/pull/947) - When the SDK changes, record what `Release` of Elixir - is used indirectly, using a `Level` `enum` that only cares about the major and minor version. Changing the `Level`, - will mark the open files and .beam files as invalidated, so that if the SDK is changed, the stubs and code `Level` - will agree, so there isn't a stub incompatibility with the PSI. - [@KronicDeth](https://github.com/KronicDeth) -* [#950](https://github.com/KronicDeth/intellij-elixir/pull/950) - Allow credo section to be empty when processing credo - explanations - [@KronicDeth](https://github.com/KronicDeth) -* [#951](https://github.com/KronicDeth/intellij-elixir/pull/951) - [@KronicDeth](https://github.com/KronicDeth) - * Prevent negative indent, not supported in 2017.3 - * Cleanup SDKs from MixProjectImportBuilderTest - -## Incompatible Changes - -* [#951](https://github.com/KronicDeth/intellij-elixir/pull/951) - Drop support for IntelliJ IDEA before 2016.3 - - [@KronicDeth](https://github.com/KronicDeth) - -## v6.7.0 - -### Enhancements - -* [#943](https://github.com/KronicDeth/intellij-elixir/pull/943) - [@KronicDeth](https://github.com/KronicDeth) - * Regression test for #580 - * `{EOL}|.` -> `{ANY}` in `Elixir.flex` - * Convert (some) unimportant newlines from `EOL` to `WHITE_SPACE` token, as GrammarKit is smarter about reparsing when - only `WHITE_SPACE` changes in size. - * After - * `fn` - * `do` - * `->` - * block identifier (`after`, `catch`, `else`, and `rescue`) - * keyword pair colon - * `(` - * Before - * Comments - -### Bug Fixes - -* [#943](https://github.com/KronicDeth/intellij-elixir/pull/943) - [@KronicDeth](https://github.com/KronicDeth) - * Remove `!stabOperationPrefix` before `expression`, since `stabOperationPrefix` itself starts with `expression` and - instead put a negative look-ahead, `!(infixComma | stabInfixOperator)` after `expression`. This now works when it - previously didn't because `COMMA` was added to `expressionRecoverUntil`, which means both `COMMA` - and `STAB_OPERATOR` are now in both not eaten by `expression`'s error recovery. - - This drops Fn1 through Fn8 to ~176ms instead of the previous time of the last optimization of 13 seconds for Fn8. It - started at 26 seconds and now it appears that the time no longer grows with the number of `fn`. It also eliminates - the pause when hitting entering inside the `fn` nesting. - - [Data and Chart](https://docs.google.com/spreadsheets/d/1mASN4BB3IAd5ZLQR5dz0Tzx2Yl-w4g5VUjz3bgd5kD4/edit?usp=sharing) - -## v6.6.0 - -### Enhancements - -* [#923](https://github.com/KronicDeth/intellij-elixir/pull/923) - [@KronicDeth](https://github.com/KronicDeth) - * EEx support - * Lexer for EEx format - * Parser for EEx format - * EEx as a Template Language - * Any file with `.eex` as the final extension will be treated as EEx. To determine the Template Data Language, - the `.eex` extension will be stripped and any remaining extension will be looked up to get the File Type and its - associated Language. For example, `*.txt.eex` will be EEx with Plain Text (`.txt`) as the Data Template - Language. Likewise, `*.html.eex` will be EEx with HTML as the Data Template Language. There's no need to - register `*.txt.eex` or `*.html.eex` or any other `*.DATA_TEMPLATE_LANGUAGE_EXTENSION.eex` pattern explicitly: - the nested extension will be looked up using the normal extension setup. - * Update Build Matrix - * IDEA `2016.2` is dropped because it's over a year old. It is still supported, but not actively tested. -* [#931](https://github.com/KronicDeth/intellij-elixir/pull/931) - Decompile `LocT` chunk for private macros and - functions and the derived names of anonymous functions. - [@KronicDeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#910](https://github.com/KronicDeth/intellij-elixir/pull/910) - `mix hex.local --force` -> `mix local.hex --force` - in `README` - [@bryanhuntesl-lowpriv](https://github.com/bryanhuntesl-lowpriv) -* [#930](https://github.com/KronicDeth/intellij-elixir/pull/930) - [@KronicDeth](https://github.com/KronicDeth) - * Parse `HEAD-` as `0.0.` for sorting versions from homebrew homepath. It will almost always be last - unless there is an unknown version, which uses `0.0.0`. - * Ensure any unparsable version sorts as `0.0.0` (`UKNOWN_VERSION`). -* [#932](https://github.com/KronicDeth/intellij-elixir/pull/932) - [@KronicDeth](https://github.com/KronicDeth) - * Look at parent of `eexTag` to resolve `fn` parameters - * Ensure functions `fn` in `eex` tags don't error by looking at `eex` element parent. - * Search above `eexTag` and `eex` to determine if variable. - -## v6.5.1 - -### Bug Fixes - -* [#904](https://github.com/KronicDeth/intellij-elixir/pull/904) - Don't do `project instanceOf MockProjectEx` because - not all IDEs, such as Rider, ship with `MockProjectEx`; instead, do a `Class#getCanonicalName()` check. - - [@KronicDeth](https://github.com/KronicDeth) - -## v6.5.0 - -### Enhancements - -* [#898](https://github.com/KronicDeth/intellij-elixir/pull/898) - [@KronicDeth](https://github.com/KronicDeth) - * Update Build Matrix - * Only include IDEA versions within the last year. Prior versions are supported, but not tested. It is up to users - stuck on older versions to report incompatibilities and then I'm specifically fix those bugs. - * Add `2017.2` - * Drop `2016.1.4` - * Only include Elixir versions within the last year. Prior versions are supported, but not tested. It is up to users - stuck on older versions to report incompatibilities and then I'm specifically fix those bugs. - * Add `1.5.2` - * Drop `1.3.4` - * Only include OTP versions within the last year. Prior versions are supported, but not tested. It is up to users - stuck on older versions to report incompatibilities and then I'm specifically fix those bugs. - * Add `20.1` - * Drop `18.3` - * Support `not in` grammar added by elixir-lang/elixir#5620 shipped with Elixir 1.5. - * Don't treat numeric operands to `@` and unary operators as separate operations from non-numeric operands to port - elixir-lang/elixir@9747e58db773c716c01c210642ec1d91475e0c83 that shipped with Elixir 1.5.0. This only kicks in if - the Elixir SDK is version >= 1.5.0 or not set. With an earlier SDK, you'll get the earlier behavior. - -### Bug Fixes - -* [#898](https://github.com/KronicDeth/intellij-elixir/pull/898) - Make binary infix vs unary prefix `+`/`-` handling - more robust to support `one(two, - three)` used in Elixir 1.5 `enum.ex`. - - [@KronicDeth](https://github.com/KronicDeth) -* [#901](https://github.com/KronicDeth/intellij-elixir/pull/901) - Call `withCharSet(Charsets.UTF_8)` on - all `GeneralCommandLines` to prevent encoding errors on Windows. - [@KronicDeth](https://github.com/KronicDeth) - -## v6.4.0 - -### Enhancements - -* [#861](https://github.com/KronicDeth/intellij-elixir/pull/861) - Regression test - for [#860](https://github.com/KronicDeth/intellij-elixir/issues/860) - [@KronicDeth](https://github.com/KronicDeth) -* [#862](https://github.com/KronicDeth/intellij-elixir/pull/862) - Regression test - for [#859](https://github.com/KronicDeth/intellij-elixir/issues/859) - [@KronicDeth](https://github.com/KronicDeth) -* [#863](https://github.com/KronicDeth/intellij-elixir/pull/863) - Convert ANSI escape codes to colored output in `mix` - Run and Debug output - [@KronicDeth](https://github.com/KronicDeth) -* [#886](https://github.com/KronicDeth/intellij-elixir/pull/886) - Regression test - for [#883](https://github.com/KronicDeth/intellij-elixir/issues/883) - [@KronicDeth](https://github.com/KronicDeth) -* [#887](https://github.com/KronicDeth/intellij-elixir/pull/887) - Regression test - for [#878](https://github.com/KronicDeth/intellij-elixir/issues/878) - [@KronicDeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#861](https://github.com/KronicDeth/intellij-elixir/pull/861) - [@KronicDeth](https://github.com/KronicDeth). - * Quote `-` in addition to `#` in `Unquoted` `MacroNameArity` decompiler. - * Quote `-` in decompiled module names. -* [#862](https://github.com/KronicDeth/intellij-elixir/pull/862) - Wrap call definitions with name `nil` - as `unquote(:nil)` in the decompiler. - [@KronicDeth](https://github.com/KronicDeth) -* [#884](https://github.com/KronicDeth/intellij-elixir/pull/884) - `Application#runWriteAction` MUST be run from - EventDispatch thread. This is true when run from a Run Configuration runner, but when the Credo annotator - runs `runWriteAction`, it's not in an EventDispatch thread, so - followed [IntelliJ Platform SDK DevGuide - General Threading Rules](https://www.jetbrains.org/intellij/sdk/docs/basics/architectural_overview/general_threading_rules.html) - and wrapped the `runWriteAction` in `Application#invokeAndWait`. - [@KronicDeth](https://github.com/KronicDeth) -* [#885](https://github.com/KronicDeth/intellij-elixir/pull/885) - Wrap `sdkModificator::commitChanges` - in `invokeAndWait` `runWriteAction` in `MixRunningStateUtil#updateRoots`. - - [@KronicDeth](https://github.com/KronicDeth) -* [#886](https://github.com/KronicDeth/intellij-elixir/pull/886) - [@KronicDeth](https://github.com/KronicDeth) - * Generalize what needs to be double quoted for `Unquoted` decompiler - * Aliases and special forms are bare atoms - * Anything that is NEITHER an identifier NOR a prefix operator is a double quoted atom. - - Normal identifiers and prefix operators then fall through to the `Default` decompiler. -* [#887](https://github.com/KronicDeth/intellij-elixir/pull/887) - Add `end` to `Unquoted` decompiler bare atoms. - - [@KronicDeth](https://github.com/KronicDeth) -* [#888](https://github.com/KronicDeth/intellij-elixir/pull/888) - Replace `assert`s in `Credo` external annotator with - extended log messages that record the unexpected line. - [@KronicDeth](https://github.com/KronicDeth) - -## v6.3.0 - -### Enhancements - -* [#854](https://github.com/KronicDeth/intellij-elixir/pull/854) - [@KronicDeth](https://github.com/KronicDeth) - * `credo` external annotator - * Once modifications have settled on a file and all internal annotators have run, `mix credo` will be run on any - modified file. - * Each check failure reported by `mix credo` will be turned into a warning annotation (yellow highlight) of the - line or line and column credo identified. - * If you hover over the annotation (either in the source or on right gutter), the `mix credo PATH:LINE(:COLUMN)` - explanation will be shown. Links in the tooltip are clickable and allow you to jump to the specific line or line - and column of the failure. -* [#856](https://github.com/KronicDeth/intellij-elixir/pull/856) - [@KronicDeth](https://github.com/KronicDeth) - * Explain Rich vs Small IDEs more - * Add feature support table for Rich vs Small IDEs with links to alternatives for Rich IDEs features not in Small - IDEs. - * Reorder Project subsections based on usage. - -### Bug Fixes - -* [#854](https://github.com/KronicDeth/intellij-elixir/pull/854) - Rename package with typo `org.elixir_lang.annonator` - -> `org.elixir_lang.annotator`. - [@KronicDeth](https://github.com/KronicDeth) -* [#855](https://github.com/KronicDeth/intellij-elixir/pull/855) - [@KronicDeth](https://github.com/KronicDeth) - * Change error to say mix, elixir, or erlang path is not set instead of just mix path. - * Rewrite of `MixRunningStateUtil#setElixir` to support calling `erl` directly in IntelliJ IDEA added a check that sdk - type was the Elixir SDK Type, but there was no `else` clauses to handle that there IS an SDK, but its NOT Elixir, - which is the common case on all Small IDEs (like Rubymine). To fill this gap, if the SDK is not Elixir and a Small - IDE is detected, then the SDK Home from Preferences > Other Settings > Elixir External Tools > Elixir SDK > Path - will be used to get the absolute path to the `elixir` (or `elixir.bat` executable and set it in - the `GeneralCommandLine`. -* [#856](https://github.com/KronicDeth/intellij-elixir/pull/856) - [@KronicDeth](https://github.com/KronicDeth) - * Add missing `**` for bold. - * Document alternative setup in Small IDEs - * Put Import from external model first in Project subsections, so that people are more likely to import as a mix - project correctly. - -## v6.2.0 - -### Enhancements - -* [#817](https://github.com/KronicDeth/intellij-elixir/pull/817) - * Add note to README that atom module names should be - prefixed with `:` - [@merqlove](https://github.com/merglove) -* [#827](https://github.com/KronicDeth/intellij-elixir/pull/827) - [@KronicDeth](https://github.com/KronicDeth) - * Elixir SDK will now have an Internal Erlang SDK, which can be supplied one of two ways: - 1. If `intellij-erlang` is installed: its Erlang SDK can be used - 2. Otherwise: the Erlang SDK for Elixir SDK from this plugin can be used - - Either Internal Erlang SDK's home path is used to locate the `erl` (or `erl.exe` on Windows) executable and it is - used to run Elixir; bypassing the `elixir` (or `elixir.bat` on Windows) script. Instead, as was done in #789, the - ebin directories for the Elixir SDK are passed as `-pa` options to `erl`. - - The Elixir SDK's configuration becomes more important: the classpath entries are now the list of `ebin` - directories to pass to `erl` using `-pa` instead of scanning for ebins in the homepath, so additional code paths can - be added to the Classpaths configuration and they will be used when running `mix` and `mix test`. The classpaths - will be initialized to the ebin directories under the home path. - - * To support migrating from earlier version of the plugin, an SDK will be updated when it is used for Mix ExUnit Run - Configurations - * The default Internal Erlang SDK will be set, which uses the latest version of Erlang that can be found on the - system. When `intellij-erlang` is installed, `intellij-elixir`'s Erlang version suggestion is still used - because `intellij-elixir` favors the latest version while `intellij-erlang` favors the first found, which is - usually the oldest version. - * Update roots (class path, source paths, documentation paths): - * Class path of `HOMEPATH/lib` is replaced with `HOMEPATH/lib/APP/ebin`. - * Source path of `HOMEPATH/lib` is replaced with `HOMEPATH/lib/APP/lib` IF it exists (so only for source SDKs) - * Documentation of `http://elixir-lang.org/docs/stable/elixir/` will be replaced - with `https://hexdoc.pm/APP/VERSION` for every `APP` in `HOMEPATH/lib`. -* [#839](https://github.com/KronicDeth/intellij-elixir/pull/839) - [@KronicDeth](https://github.com/KronicDeth) - * All `ebin` paths in the Internal Erlang SDK will be copied to the Elixir SDK, so that they are indexed, which makes - the Internal Erlang SDK modules show up in Symbol search. - * Erlang SDK modules can be completed and then functions in those modules can be completed after typing `.`. - * Atoms have References. - * Indexed atoms (from decompiled Erlang `.beams` from the Internal Erlang SDK) will be used for completing atoms - as soon the atom is parseable: either after the first letter `:` or inside the quotes when making a quoted atom. - * Atoms will resolve to modules if the atom is a module name. If the atom is quoted and contains interpolation, it - will treat each interpolation as `.*` and look for regex matches to this derived potential atom name. - * Completions for functions after `.` will now work at the end of file. Previously, completions only worked in the - middle of a file, where the `.` could parse the next work an existing call, now if that parse doesn't work and the - only thing after is a new line, it will still complete. -* [#830](https://github.com/KronicDeth/intellij-elixir/pull/830) - Auto test for mix test case runner will automatically - run tests after a change is detected in the project files, which normally happens on save, which happens when losing - focus on a changed editor tab by default. - [@nivanson](https://github.com/nivanson) -* [#840](https://github.com/KronicDeth/intellij-elixir/pull/840) - Regression test - for [#821](https://github.com/KronicDeth/intellij-elixir/issues/821) - [@KronicDeth](https://github.com/KronicDeth) -* [#841](https://github.com/KronicDeth/intellij-elixir/pull/841) - Regression test - for [#803](https://github.com/KronicDeth/intellij-elixir/issues/803) - [@KronicDeth](https://github.com/KronicDeth) -* [#842](https://github.com/KronicDeth/intellij-elixir/pull/842) - Regression test - for [#833](https://github.com/KronicDeth/intellij-elixir/issues/833) - [@KronicDeth](https://github.com/KronicDeth) -* [#843](https://github.com/KronicDeth/intellij-elixir/pull/843) - - Port [elixir-lang/elixir#2774](https://github.com/elixir-lang/elixir/pull/2774): Allow `A-Z` as sigil modifiers in - addition to `a-z` to support `U` ungreedy modifier that replaced `r` ungreedy modifier for regexes. - - [@KronicDeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#816](https://github.com/KronicDeth/intellij-elixir/pull/816) - Add notice for debug blacklist that it uses atoms, - not Aliases, so you need to qualifier module aliases with `Elixir.` - [@merqlove](https://github.com/merqlove) -* [#817](https://github.com/KronicDeth/intellij-elixir/pull/817) - Support atoms (prefixed with `:`) and`Elixir.` and - plain Aliases for debugger blacklist. - [@merqlove](https://github.com/merglove) -* [#832](https://github.com/KronicDeth/intellij-elixir/pull/832) - Add space to import window text - - [@kentongray](https://github.com/kentongray) -* [#840](https://github.com/KronicDeth/intellij-elixir/pull/840) - Add `END` to allowed `keywordKey` tokens - - [@KronicDeth](https://github.com/KronicDeth) -* [#841](https://github.com/KronicDeth/intellij-elixir/pull/841) - [@KronicDeth](https://github.com/KronicDeth) - * Only use "Macros" as first header in decompiled `.beam` files if `macro` is `defmacro`. "Macros" header was being - printed when there was only functions because the check when there was no `lastMacroNameArity` didn't care what the - current `macroNameArity.macro` was. - * When an `.erl` file has `-compile([compressed])`, it will be compiled normally, and then gzipped, so that - the `.beam` will not contain the BEAM magic number `FOR1`, but instead the gzip magic number `0x1f` `0x8b`. So, to - properly handle normal and compressed, the decompiler needs to look-ahead 2-bytes and check the gzip magic number. - If the gzip magic number is detected, the InputStream will be passed through `GZIPInputStream` before the the normal - decoding process. -* [#842](https://github.com/KronicDeth/intellij-elixir/pull/842) - When decompiling function and macro names from Erlang - module, its possible for the name to contain `#` and they would be interpreted as comments. Accepting those names - in `Unquoted` wouldn't escape the `#` from being treated as a comment, so in addition to `unquote`ing the name, - surround it in double quotes. - [@KronicDeth](https://github.com/KronicDeth) -* [#848](https://github.com/KronicDeth/intellij-elixir/pull/848) - [@KronicDeth](https://github.com/KronicDeth) - * `AdditionalDataConfigurable` only copied the the Internal Erlang SDK Code Paths when the selection in the `ComboBox` - was changed, which meant if the there was only one Erlang SDK or the user never changed the selection, the Code - Paths were never copied. To get the Code Paths copied when the Elixir SDK is first created and `setupSdkPaths` - interface method is called - 1. All paths are set directly on the Elixir SDK as before - 2. The default Erlang SDK, which should be the one that was last created, is configured in `SdkAdditionalaData` - 3. The Code paths from the Erlang SDK are copied to the Elixir SDK - 1. If the the Erlang SDK is from intellij-elixir and does not have `ebin` directories for its Class Paths, then the - Class Paths is expanded to Code Paths. -* [#851](https://github.com/KronicDeth/intellij-elixir/pull/851) - The Code Paths from the Internal Erlang SDK were not - being copied from the default Erlang SDK to the Elixir SDK when the default Erlang SDK was set during `mix test` runs, - which meant that the Elixir SDK would not upgrade correctly from 6.1.1 to 6.2.0 without the user deleting the Elixir - SDK and recreating it. - [@KronicDeth](https://github.com/KronicDeth) - -## v6.1.1 - -### Bug Fixes - -* [#795](https://github.com/KronicDeth/intellij-elixir/pull/795) - - When [#754](https://github.com/KronicDeth/intellij-elixir/issues/794) made `intellij-erlang` a soft-dependency, it - broke the debugger's icons that referenced `ErlangIcons`, but it turns out all the icon constants were aliases - to `AllIcons.Debugger` constants, so by using the `AllIcons.Debugger` icons directly, the dependency on `ErlangIcons` - can be removed without the need to copy the image files into `intellij-elixir`. - - [@KronicDeth](https://github.com/KronicDeth) -* [#796](https://github.com/KronicDeth/intellij-elixir/pull/796) - When `do ... end` template is inserted, it did not - have a previous child whose attributes to use, so it used the default, which left the cursor unindented. To get the - cursor indented by default, When the `ElementType` is `DO`, apply the `stabChildrenIndent` rules: indent normal and - determine whether to indent relative to direct parent using code style setting. - - [@KronicDeth](https://github.com/KronicDeth) -* [#797](https://github.com/KronicDeth/intellij-elixir/pull/797) - Include `VirtualFile` path in Beam read errors - - [@KronicDeth](https://github.com/KronicDeth) - -## v6.1.0 - -### Enhancements - -* [#792](https://github.com/KronicDeth/intellij-elixir/pull/792) - [@KronicDeth](https://github.com/KronicDeth) - * Since the process of requiring resource files is the same, `org.elixir_lang.ElixirModules` has static methods for - copying resources out to a temporary directory and adding the `-r ` for one or more resource files - to a new or existing ParametersList. These are now shared for the Mix ExUnit and Debugger code paths. - * Format class - * `ElixirXDebugProcess` - * `MixExUnitRunningState` - * `MIxRunningState` - -### Bug Fixes - -* [#792](https://github.com/KronicDeth/intellij-elixir/pull/792) - The compiled `.beam` files were removed in 58e7d4a, - which was before v5.1.0, but not all users had problems with using the - debugger. [#739](https://github.com/KronicDeth/intellij-elixir/issues/739) [persisted](https://github.com/KronicDeth/intellij-elixir/issues/739#issuecomment-322032123) ( - as reported by [@erikreedstrom](https://github.com/erikreedstrom)) when 6.0.0 was released; I retried reproducing on a - clean VM and I got it. I'm not sure why it worked for some people in prior releases since the `.beam` don't exist that - were being copied, but now the debugger uses the same system of copying `.ex` files and requiring them with `-r` - instead of copying `.beam` and using `-pa` to add the `ebin` directory. Fix was verified local under macOS and in - Windows VM that reproduced [#739](https://github.com/KronicDeth/intellij-elixir/issues/739). - - [@KronicDeth](https://github.com/KronicDeth) - -## v6.0.0 - -### Enhancements - -* [#724](https://github.com/KronicDeth/intellij-elixir/pull/724) - [@KronicDeth](https://github.com/KronicDeth) - * Code Formatter - * `do` block lines are indented - * `do` blocks `end` as the last argument of a no parentheses call unindents to the start of the call - * If one clause of a multi-clause anonymous function wraps, all clauses wrap. - * Indent after `else` - * Indent map and struct keys - * All keys wrap if any key wraps - * No spaces around... - * `.` - * Spaces around... - * `and` - * `in` - * `or` - * `when` - * Configure spaces around... - * `=` - * `<-` and `\\` - * `!=`, `==`, `=~`, `!==`, and `===` - * `<`, `<=`, `>=`, and `>` - * `+` and `-` - * `*` and `/` - * Unary `+`, `-`, `!`, `^`, and `~~~` - * `->` - * `::` - * `|` - * `||` and `|||` - * `&&` and `&&&` - * `<~`, `|>`, `~>`, `<<<`, `<<~`, `<|>`, `<~>`, `>>>`, and `~>>` - * `..` - * `^^^` - * `++`, `--`, `..`, `<>` - * `=>` - * Configure spaces before... - * `,` - * No space after... - * `@` - * Spaces after... - * `not` - * `fn` - * `after` - * `catch` - * `rescue` - * `key:` - * Configure space after... - * `&` - * `,` - * Configure spaces within... - * `{ }` - * `<< >>` - * `[ ]` - * `( )` - * No space around `/` in `&NAME/ARITY` and `&QUALIFIER.NAME/ARITY` - * `when` wraps when its right operand wraps, so that guards start with `when` on a newline when they are too long. - * Align `|>` at start of indented line for pipelines - * Align `end` with start of call instead of start of line for `do` blocks in pipelines - * Indent list elements when wrapped - * Indent tuple elements when wrapped - * Align type definition to right of `::` - * Align guard to right of `when` when guards span multiple lines - * Align two operator (`++`, `--`, `..`, `<>`) operands, so that `<>` binaries are multiple lines align their starts - instead of using continuation indent and being indented relative to first operand. - * Align pipe `|` operands, so that alternates in types and specs are aligned instead of continuation indented - relative to the first operand. - * Comments in `spec` (that is above operands to `|` align with the operands - * Remove newlines from pipelines, so that all pipelines start with an initial value or call and each `|>` is the - start of a successive line. - * Key exclusivity: if an association operation or keyword key is already on a line, the container value - automatically has it's elements wrapped if there is nested associations or keyword pairs, so that two levels of - keys are not on the same line. - * Indent bit string (`<< >>`) elements when wrapped -* [#732](https://github.com/KronicDeth/intellij-elixir/pull/732) - [@KronicDeth](https://github.com/KronicDeth) - * Update IntelliJ IDEA version to latest in each MINOR version: - * `2017.1.1` -> `2017.1.5` - * `2016.3.5` -> `2016.3.7` - * Update Elixir version `1.4.2` -> `1.4.5` -* [#738](https://github.com/KronicDeth/intellij-elixir/pull/738) - [@KronicDeth](https://github.com/KronicDeth) - * `TeamCityExUnitFormatting.put_event` - * Always match on `%__MODULE__{}` for state in clauses to prevent state update errors - * Match on `:suite_finished` and `:suite_started` event, so that only event added to the interface will be unknown - and `IO.warn` can be used tell anyone spotting the new event to file an issue. -* [#741](https://github.com/KronicDeth/intellij-elixir/pull/741) - Instead of pinning position (`1` for lines or `3` for - heredocs), `pin` `*_PROMOTER` token, so it's more obvious the pattern is that the promoter is pinned. - - [@KronicDeth](https://github.com/KronicDeth) -* [#747](https://github.com/KronicDeth/intellij-elixir/pull/747) - Regression test - for [#659](https://github.com/KronicDeth/intellij-elixir/issues/659) - [@KronicDeth](https://github.com/KronicDeth) -* [#629](https://github.com/KronicDeth/intellij-elixir/pull/629) - Search for Elixir SDKs in `/nix/store` on Mac if - homebrew path does not exist - [@KronicDeth](https://github.com/KronicDeth) -* [#749](https://github.com/KronicDeth/intellij-elixir/pull/749) - Regression test - for [#672](https://github.com/KronicDeth/intellij-elixir/issues/672) - [@KronicDeth](https://github.com/KronicDeth) -* [#750](https://github.com/KronicDeth/intellij-elixir/pull/750) - Regression test - for [#674](https://github.com/KronicDeth/intellij-elixir/issues/674) - [@KronicDeth](https://github.com/KronicDeth) -* [#751](https://github.com/KronicDeth/intellij-elixir/pull/751) - [@KronicDeth](https://github.com/KronicDeth) - * Regression test for [#683](https://github.com/KronicDeth/intellij-elixir/issues/683) - * Store expected decompilation in files to shrink `DecompilerTest` length -* [#754](https://github.com/KronicDeth/intellij-elixir/pull/754) - Update to `org.jetbrains.intellij` `0.2.15` - - [@KronicDeth](https://github.com/KronicDeth) -* [#755](https://github.com/KronicDeth/intellij-elixir/pull/755) - Regression test - for [#687](https://github.com/KronicDeth/intellij-elixir/issues/687) - [@KronicDeth](https://github.com/KronicDeth) -* [#756](https://github.com/KronicDeth/intellij-elixir/pull/756) - Regression test - for [#692](https://github.com/KronicDeth/intellij-elixir/issues/692) - [@KronicDeth](https://github.com/KronicDeth) -* [#758](https://github.com/KronicDeth/intellij-elixir/pull/758) - Regression test - for [#694](https://github.com/KronicDeth/intellij-elixir/issues/694) - [@KronicDeth](https://github.com/KronicDeth) -* [#759](https://github.com/KronicDeth/intellij-elixir/pull/759) - Regression test - for [#699](https://github.com/KronicDeth/intellij-elixir/issues/699) - [@KronicDeth](https://github.com/KronicDeth) -* [#760](https://github.com/KronicDeth/intellij-elixir/pull/760) - Use `Elixir.LDAPEx.ELDAPv3.beam` as regression test - for [#703](https://github.com/KronicDeth/intellij-elixir/issues/703) - [@KronicDeth](https://github.com/KronicDeth) -* [#764](https://github.com/KronicDeth/intellij-elixir/pull/764) - Show `quote`s in list in macros in Structure View - - [@KronicDeth](https://github.com/KronicDeth) -* [#768](https://github.com/KronicDeth/intellij-elixir/pull/768) - References will be cached until the file containing - the PSI element changes, so that results from `Callable#multiResolve`, `CallDefinitionClause#multiResolve` - , `Module#multiResolve`, and `ModuleAttribute#multiResolve`, which are all the extant references, can be cached and - invalidated correctly. - [@KronicDeth](https://github.com/KronicDeth) -* [#769](https://github.com/KronicDeth/intellij-elixir/pull/769) - Use `ParameterLists` to support Path Variables in - program parameters. - [@KronicDeth](https://github.com/KronicDeth) -* [#774](https://github.com/KronicDeth/intellij-elixir/pull/774) - [@KronicDeth](https://github.com/KronicDeth) - * Adjust SDK home path when `bin`, `lib,` or `src` to parent directory. - * Format `ElixirSdkType`. -* [#775](https://github.com/KronicDeth/intellij-elixir/pull/775) - Regression test - for [#354](https://github.com/KronicDeth/intellij-elixir/issues/354) - [@KronicDeth](https://github.com/KronicDeth) -* [#777](https://github.com/KronicDeth/intellij-elixir/pull/777) - [@KronicDeth](https://github.com/KronicDeth) - * Include specific message for each decompilation error reason. - * Regression test for #772 - * `AtU8` UTF8 atoms chunk decompilation to support OTP 20 compiled `.beam` files. - * Regression test for Elixir 1.5.0 announcement to ensure that unicode from `AtU8` chunk can be read from beam file - produced by following Elixir code: - ```elixir defmodule AtU8Test do def こんにちは世界 do - :こんにちは世界 - -   saudação = "Bom dia!" - -    saudação - end - end - ``` -* [#771](https://github.com/KronicDeth/intellij-elixir/pull/771) - Guard against read/write mismatch in stubs - - [@KronicDeth](https://github.com/KronicDeth) -* [#782](https://github.com/KronicDeth/intellij-elixir/pull/782) - Always install `IdeaVIM` in the gradle sandbox - because it got annoying having to reinstall it when the sandbox reset. - [@KronicDeth](https://github.com/KronicDeth) -* [#786](https://github.com/KronicDeth/intellij-elixir/pull/786) - [@KronicDeth](https://github.com/KronicDeth) - * Merge both homebrew and nix store on Mac - * Merge default and nix store on Linux -* [#789](https://github.com/KronicDeth/intellij-elixir/pull/789) - Format `MixRunningStateUtil` and fix warnings. - - [@KronicDeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#726](https://github.com/KronicDeth/intellij-elixir/pull/726) - [@KronicDeth](https://github.com/KronicDeth) - * Treat `::` the same as `:` in `key:` after `when` in type specifications as it's a realistic error. - * Change `.` to `#` when referring to constants in javadocs - * Remove `@param` without descriptions - * Remove explicit type from generics when the type can be inferred. - * Check if `atNonNumericOperation` reference is non-`null` before resolving - * Swap empty branches to inverted conditions for final `else`. - * Check if `Type` `leftOperand` is `null` before using it. - * Remove empty `highlightTypesAndTypeParameterUsages(When...)` - * Remove unused `highlightTypesAndSpecificationTypeParameterDeclarations` - * Flip `equals` to eliminate need for `null` check - * Remove redundant type arguments (`<...>`) - * Change `Collections.EMPTY_SET` to `Collections.emptySet()` to prevent uncheck cast warnings. - * Inline constant argument for errors. - * Check if `when` `rightOperand` is non-`null` before scanning it for parameter names. - * Fix typos -* [#732](https://github.com/KronicDeth/intellij-elixir/pull/732) - [@KronicDeth](https://github.com/KronicDeth) - * When compilation error is detected during `mix test`, it will be turned into a test failure. - * Compilation errors are any stacktraces to `stderr` that end in ` (elixir) lib/kernel/parallel_require.ex:`. - * The test failure for the compilation will be attributed to either `mix test` or the inferred module name of test - file. - * If the first line of the stacktrace contains `test/.*_test.exs:\d+: \(module\)` - * The file and line from that line will be used as the location of failure - * The `test/` and `.exs` will be stripped from the file and it will be camelized to produce the derived test - module name of the failure - * Otherwise, `mix test` is used - * Rearrange doc test names to emphasize the function being tested: `"test doc at MODULE.FUNCTION/ARITY (COUNT)"` - becomes `"MODULE.FUNCTION/ARITY doc (COUNT)"` - * If `MODULE` is the same as the test case without the `Test` suffix, then `MODULE.` is stripped too and the test - name becomes only `FUNCTION/ARITY doc (COUNT)` - * Fix parallel test cases nesting under each other due to asynchronous reporting from - formatter. `##teamCity` `testSuiteStarted` messages automatically nest, so switched to using `nodeId` - and `parentNodeId` system, so that nesting is explicit. This will allow multiple parallel tests to show up in GUI - too. - * `Elixir.` prefix is stripped from test case names. -* [#728](https://github.com/KronicDeth/intellij-elixir/pull/728) - Handle Elixir versions with non-numeric parts - - [@pazustep](https://github.com/pazustep) -* [#734](https://github.com/KronicDeth/intellij-elixir/pull/734) - Use a separate formatter, one GenEvent-based and one - GenServer-based, depending on whether the SDK is >= 1.4.0 as that's when GenEvent was deprecated and GenServer was - preferred. - [@KronicDeth](https://github.com/KronicDeth) -* [#736](https://github.com/KronicDeth/intellij-elixir/pull/736) - [@KronicDeth](https://github.com/KronicDeth) - * Merge `Callable` and `Kernel` annotators - * Use `PsiElementVisitor` instead of `PsiRecursiveElementVisitor`, so that macros in `defmodule` block don't get - double annotated. - * Instead of erasing and then applying multiple `TextAttributeKey`, erase as before, but then merge - the `TextAttributeKey`'s `TextAttributes` and apply as single `setEnforcedTextAttributes`. For some reason, this - fixes the inconsistency of whether `PREDEFINED_CALL` or `MACRO_CALL` is applied first. - * In case of multiple `resolved`s, make those that need `PREDEFINED_CALL` to win. -* [#738](https://github.com/KronicDeth/intellij-elixir/pull/738) - [@KronicDeth](https://github.com/KronicDeth) - * `TeamCityExUnitFormatting.new` should return struct only because none of the formatters expects an `:ok` tuple. - * Fix order of `TeamCityExUnitFormatting.put_Event` catchall parameters. - * `FileReferenceFilter` - * Add `.exs` to pattern for stacktrace linking. - * Highlight only stacktrace path and line umber instead of entire line - * Better path match in stacktraces - * Only accept VirtualFile if it has a suffix matching the stacktrace's path instead of accepting the first index - file with a matching basename. - * Allow multiple VirtualFiles to be linked if it turns out there is a true file path collision between two OTP - apps in the Project or Libraries. - * Format and fix warnings -* [#741](https://github.com/KronicDeth/intellij-elixir/pull/741) - [@KronicDeth](https://github.com/KronicDeth) - * Pin promoter for all quotes, including the previously missing `stringLine` and `charListLine`. - * Only insert closing quote if previous token was an opening quote. -* [#742](https://github.com/KronicDeth/intellij-elixir/pull/742) - [@KronicDeth](https://github.com/KronicDeth) - * On `unquote`, include argument in name of call definition clause - * Look outside tuple containing `quote` for `enclosingMacroCall`, which allows going - to [Phoenix.Template.compile's quote's defp](https://github.com/phoenixframework/phoenix/blob/v1.2.4/lib/phoenix/template.ex#L380-L392) - * Treat `Module.create` as `Modular - * `Or` interface to unify `Matched` and `Unmatched` `Or`s. - * Look at both side of `Or` operation for nested child calls for Structure view. - * Make `unquote(ARG1)` name for `getName` and indexing -* [#744](https://github.com/KronicDeth/intellij-elixir/pull/744) - [@KronicDeth](https://github.com/KronicDeth) - * `ElementDescription` for `ElixirVariable` - * Mark `UnqualifiedParenthesesCall`s as `call` instead of `variable`. -* [#745](https://github.com/KronicDeth/intellij-elixir/pull/745) - [@KronicDeth](https://github.com/KronicDeth) - * `mix local.hex --force` before `mix deps.get` during project import to prevent prompt for hex update when local hex - is earlier than that required by `mix`. - * Fix warnings and format `MixProjectRootStep` -* [#746](https://github.com/KronicDeth/intellij-elixir/pull/746) - [@KronicDeth](https://github.com/KronicDeth) - * Mark `ElixirDecimalFloat` as error in types. - * If in a Range: "Floats aren't allowed in Ranges" - * Otherwise: "Float literals are not allowed in types. Use float() instead". -* [#747](https://github.com/KronicDeth/intellij-elixir/pull/747) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore `jps-*/out` directories. - * Look at parent for `isParameter` for `AtUnqualifiedBracketOperation`. - * Treat `AtUnqualifiedBracketOperation` the same as `UnqualifiedBracketOperation` for `isVariable`. -* [#748](https://github.com/KronicDeth/intellij-elixir/pull/748) - Include path in error messages from `buildFileStub` - - [@KronicDeth](https://github.com/KronicDeth) -* [#749](https://github.com/KronicDeth/intellij-elixir/pull/749) - Erlang allows `do` as a function name, but it's a - keyword in Elixir, so wrap it as `unquote(:do)`. The `SpecialForm` decompiler already did this `unquote(...)` - wrapping, but `do` is a keyword and not a special form, so rename the decompiler to `Unquoted`. - - [@KronicDeth](https://github.com/KronicDeth) -* [#750](https://github.com/KronicDeth/intellij-elixir/pull/750) - [@KronicDeth](https://github.com/KronicDeth) - * Move {3} inside `|` for `SIGIL` `PROMOTER` and `TERMINATOR`: - > ``` - > SIGIL_HEREDOC_PROMOTER = ({SIGIL_DOUBLE_QUOTES_PROMOTER}|> - > {SIGIL_SINGLE_QUOTES_PROMOTER}){3} - > SIGIL_HEREDOC_TERMINATOR = ({SIGIL_DOUBLE_QUOTES_TERMINATOR}|> - > {SIGIL_SINGLE_QUOTES_TERMINATOR}){3} - > ``` - > -- https://github.com/KronicDeth/intellij-elixir/blob/v5.1.0/src/org/elixir_lang/Elixir.flex?utf8=%E2%9C%93#L524-L525 - - The `|` is inside group that is then `{3}`'d, so it allows either `'` or `"` in groups of three. This is only - applies to the sigils. It's correct for normal string and charlist heredocs: - - > ``` - > CHAR_LIST_HEREDOC_PROMOTER = {CHAR_LIST_PROMOTER}{3} - > CHAR_LIST_HEREDOC_TERMINATOR = {CHAR_LIST_TERMINATOR}{3} - > - > STRING_HEREDOC_PROMOTER = {STRING_PROMOTER}{3} - > STRING_HEREDOC_TERMINATOR = {STRING_TERMINATOR}{3} - > - > QUOTE_HEREDOC_PROMOTER = {CHAR_LIST_HEREDOC_PROMOTER} | {STRING_HEREDOC_PROMOTER} - > QUOTE_HEREDOC_TERMINATOR = {CHAR_LIST_HEREDOC_TERMINATOR} | {STRING_HEREDOC_TERMINATOR} - > ``` - > -- https://github.com/KronicDeth/intellij-elixir/blob/v5.1.0/src/org/elixir_lang/Elixir.flex?utf8=%E2%9C%93#L441-L448 -* [#751](https://github.com/KronicDeth/intellij-elixir/pull/751) - Unquote function names that start with an uppercase - codepoint, so that they aren't parsed as Aliases. These function names occur in the CORBA modules in OTP. - - [@KronicDeth](https://github.com/KronicDeth) -* [#754](https://github.com/KronicDeth/intellij-elixir/pull/754) - [@KronicDeth](https://github.com/KronicDeth) - * Using intellij.plugins will prevent packaging intellij-erlang as a runtime dependency, which leads to duplicate - templates. - * Don't use the `JPS` `type` for `jps-*` projects because their deps become incompatible with other projects. -* [#755](https://github.com/KronicDeth/intellij-elixir/pull/755) - Add missing `break`s to `case` statement - in `processDeclarations(Match, ...)` that caused the logic of whether to check left, right, or both operand based on - the whether the treeWalkUp came from always fell through to the `RIGHT` case, so it was only, always checking the - right operand of the match and never the left operand. - [@KronicDeth](https://github.com/KronicDeth) -* [#756](https://github.com/KronicDeth/intellij-elixir/pull/756) - Skip `processDeclarationsInPreviousSibling` - when `lastParent` is `ElixirFile` - [@KronicDeth](https://github.com/KronicDeth) -* [#757](https://github.com/KronicDeth/intellij-elixir/pull/757) - Remove background color from sigils because it stands - out really badly in the Default theme where it's black on white and while it doesn't in Darcula, it's unnecessary - there because it's so close to the editor background color in Darcula. - [@KronicDeth](https://github.com/KronicDeth) -* [#758](https://github.com/KronicDeth/intellij-elixir/pull/758) - Treat `Alias` as miscapitalized type - parameter. [@KronicDeth](https://github.com/KronicDeth) -* [#759](https://github.com/KronicDeth/intellij-elixir/pull/759) - Ignore call definition clauses after `when` in type - specifications as it is a common occurrence when typing a specification above a pre-existing call definition clause. - - [@KronicDeth](https://github.com/KronicDeth) -* [#761](https://github.com/KronicDeth/intellij-elixir/pull/761) - Use `THashSet` instead of the more - specific `SmartHashSet` because `THashSet` allows `null` keys, which are expected for the `canonicalNameSet`. - - [@KronicDeth](https://github.com/KronicDeth) -* [#764](https://github.com/KronicDeth/intellij-elixir/pull/764) - [@KronicDeth](https://github.com/KronicDeth) - * Look above `List` for enclosing modular macro. - * Look above `ElixirNoParenthesesManyStrictNoParenthesesExpression` for enclosing modular macro. -* [#765](https://github.com/KronicDeth/intellij-elixir/pull/765) - Remove background color from Sigil Color Scheme - Design to match changes in [#757](https://github.com/KronicDeth/intellij-elixir/pull/757). - - [@KronicDeth](https://github.com/KronicDeth) -* [#769](https://github.com/KronicDeth/intellij-elixir/pull/769) - [@KronicDeth](https://github.com/KronicDeth) - * Check if program parameters is blank before splitting into mix args. - * Use `ParametersList` to properly parse quote program parameters. -* [#773](https://github.com/KronicDeth/intellij-elixir/pull/773) - [@KronicDeth](https://github.com/KronicDeth) - * Move `Quoter` into `test` directory, so it and its dependency on `JUnit` is only used for test compilation and - runtime and not the shipped runtime. - * Fix `Quoter` warnings and format. -* [#774](https://github.com/KronicDeth/intellij-elixir/pull/774) - [@KronicDeth](https://github.com/KronicDeth) - * Show expected SDK home path structure when - invalid. ![screen shot 2017-08-06 at 2 28 36 pm](https://user-images.githubusercontent.com/298259/29006393-5ce71dfe-7ab4-11e7-88c9-732856f6259d.png) - * Suppress invalid warnings in `ElixirSdkType`. -* [#775](https://github.com/KronicDeth/intellij-elixir/pull/775) - Always check if resolution result is right operand of - match. - [@KronicDeth](https://github.com/KronicDeth) -* [#776](https://github.com/KronicDeth/intellij-elixir/pull/776) - `CallDefinitionClause` `InsertHandler` always assumed - there was a character after the insert location, but when inserting at the very end of the file, there isn't, which - caused an `IndexOutOfBoundsException`. Only check if the following character is not a space, `(`, or `[` when the - document is longer than the tail offset to prevent the `IndexOutOfBoundsException`. If the insertion is at the end of - the file, then the `()` will always be inserted. - [@KronicDeth](https://github.com/KronicDeth) -* [#777](https://github.com/KronicDeth/intellij-elixir/pull/777) - `Decompilated` -> `Decompilation` - - [@KronicDeth](https://github.com/KronicDeth) -* [#771](https://github.com/KronicDeth/intellij-elixir/pull/771) - The - lower-level `Data(Output|IntputStream` `(write|read)Int` don't work correctly with sizes, so use the - JetBrains `(write|read)VarInt` ones instead. - [@KronicDeth](https://github.com/KronicDeth) -* [#782](https://github.com/KronicDeth/intellij-elixir/pull/782) - Delegate `ChildAttributes` to previous child when - available: `Block.getChildAttributes` is used when Enter is pressed to determine the indentation and alignment. Using - the default implementation, newlines in stabs look overly indented, but there is a constant, `DELEGATE_TO_PREV_CHILD` - that can be used to just use the last child's indent as long as there is one, which appears to work well for stabs (do - block bodies, etc). - [@KronicDeth](https://github.com/KronicDeth) -* [#783](https://github.com/KronicDeth/intellij-elixir/pull/783) - [@KronicDeth](https://github.com/KronicDeth) - * Increase suspect `nameSetSize` from `4` to `10` because a `Poison.Encoder` has an `impl` module for 4 types, and so - has 4 canonical names. - * Only read-ahead if guard length is non-zero; otherwise, only warn the nameSetSize may be suspect and don't - read-ahead as this can mess up OK namesets. -* [#784](https://github.com/KronicDeth/intellij-elixir/pull/784) - [@KronicDeth](https://github.com/KronicDeth) - * Override `Kernel.SpecialFroms` arity intervals - * `alias` overridden from `2` to `1-2` to support without `:as` option. - * `import` overridden from `2` to `1-2` to support without `:except` or `:only` options. - * `quote` overridden from `2` to `1-2` to support block without options. - * `require` overridden from `2` to `1-2` to support without `:as` option. - * `super` overridden from `1` to `0-` to support calling any super method. -* [#789](https://github.com/KronicDeth/intellij-elixir/pull/789) - `elixir.bat` in at least Elixir 1.5.1, will not - properly parse a mix path with spaces in it on Windows even when the path has outer quotes (see - elixir-lang/elixir#6455). It is not possible to use inner quotes, as you can do in cmd.exe, using the JetBrains and - Java libraries hat auto-matically quote, so instead bypass the bad quoting in `elixir.bat` by doing what `elixir.bat` - does: call `erl.exe` with all the SDK ebin paths added with `-pa`, then `-noshell -s elixir start_cli` to run Elixir - and`-extra` to run requires (`-r`), mix and its tasks. - [@KronicDeth](https://github.com/KronicDeth) - -### Incompatible Changes - -* [#732](https://github.com/KronicDeth/intellij-elixir/pull/732) - [@KronicDeth](https://github.com/KronicDeth) - * Drop `14.1.X` support because it does not have support for nodeId test output, so it's not possible to handle the - ExUnit test output in a safe manner while still allowing concurrent output for asynchronous tests. - -## v5.1.0 - -### Enhancements - -* [#643](https://github.com/KronicDeth/intellij-elixir/pull/643) - Graphical debugger with line breakpoints - - [@JakeBecker](https://github.com/JakeBecker) -* [#673](https://github.com/KronicDeth/intellij-elixir/pull/673) - Add Debugger to README - - [@KronicDeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#669](https://github.com/KronicDeth/intellij-elixir/pull/669) - - Replace `assert scope.isEquivalentTo(lastParent.getParent())` with an `if` and log what `lastParent` was when - condition is `false`, so root cause can be traced. - [@KronicDeth](https://github.com/KronicDeth) - -## v5.0.0 - -### Enhancements - -* [#574](https://github.com/KronicDeth/intellij-elixir/pull/574) - [@KronicDeth](https://github.com/KronicDeth) - * Decompile `.beam` files - * Structure view for decompiled `.beam` files - * Index modules, functions, and macros exported by `.beam` files - * Go To Symbol for Modules defined in `.beam` files (both SDK and deps) - * Erlang using atoms (like `:idna`) - * Elixir using Alias (like `Enum`) - * Completion for Modules defined in `.beam` files (both SDK and deps) - * Elixir using Alias (like `Enum`) - * Completion for functions and macros exported by `.beam` files - * Syntax highlighting -* [#579](https://github.com/KronicDeth/intellij-elixir/pull/579) - Regression test - for [#575](https://github.com/KronicDeth/intellij-elixir/pull/575) - [@KronicDeth](https://github.com/KronicDeth) -* [#583](https://github.com/KronicDeth/intellij-elixir/pull/583) - [@KronicDeth](https://github.com/KronicDeth) - * Macros appear before functions in decompiled `.beam` files - * Header for macro and function sections -* [#585](https://github.com/KronicDeth/intellij-elixir/pull/585) - [@KronicDeth](https://github.com/KronicDeth) - * Update `ELIXIR_VERSION` for `1.2.*` from `1.2.3` to `1.2.6` - * Add `ELIXIR_VERSION` `1.3.4` - * Add `ELIXIR_VERSION` `1.4.0` - * Update `IDEA` for `2016.*` to `2016.3.1` - * Show `OtpErlangBitStr` (and therefore `OtpErlangBinary` contents when tests fail - * Quote binaries as `to_charlist` instead of `to_char_list` for Elixir `>= 1.3`. Depends on Elixir version of project - SDK. - * Use `elixir` instead of `java` VM, so now Erlang and Elixir don't need to be built on travis-ci, but `ant` and - the `jdk` need to be installed, but unlike Erlang and Elixir, there are tarballs for that, so this way is faster - than the old method without depending on travis-ci cache. -* [#609](https://github.com/KronicDeth/intellij-elixir/pull/609) - [@KronicDeth](https://github.com/KronicDeth) - * If `multiResolve` causes a `StackOverflow` for `org.elixir_lang.annotator.Callable.visitCall`, then `catch` it and - use `errorreport` logger to log the element. - * Include file path in `errorreport` excerpt - * Log element for `StackOverflow` related to `import`s - * Regression test for [#605](https://github.com/KronicDeth/intellij-elixir/issues/605). - * Log `LookupElement#getObject` when `LookupElement#getPsiElement` is `null` to track down how it was `null` - in [#563](https://github.com/KronicDeth/intellij-elixir/issues/563). -* [#614](https://github.com/KronicDeth/intellij-elixir/pull/614) - Regression test - for [#559](https://github.com/KronicDeth/intellij-elixir/issues/559) - [@KronicDeth](https://github.com/KronicDeth) -* [#504](https://github.com/KronicDeth/intellij-elixir/pull/504) - [@JakeBecker](https://github.com/JakeBecker) - * Switch to Gradle for builds. - * `./gradlew runIde` (or the `runIde (VERSION)` Run Configurations) will run IDEA in a sandbox with the development - version of the plugin. - * `./gradlew test` (or the `test (VERSION)` Run Configurations) will run the main plugin and jps-builder tests. - * The plugin can now be published with `./gradlew publishPlugin`, *BUT* you'll need to fill in `publish*` - properties in `gradle.properties`. This will _eventually_ allow for automated "nightlies" from successful - Travis-CI builds on `master`. -* [#638](https://github.com/KronicDeth/intellij-elixir/pull/638) - The `Callable` annotator is meant for variables, - parameters, and macro and function calls and declarations. The `ModuleAttribute` annotator handles module attribute - declaration and usage, so we can save reference resolution time by skipping module attributes in `Callable`. - - [@KronicDeth](https://github.com/KronicDeth) -* [#640](https://github.com/KronicDeth/intellij-elixir/pull/640) - Allow module attribute folding to be configured. - - [@KronicDeth](https://github.com/KronicDeth) -* [#662](https://github.com/KronicDeth/intellij-elixir/pull/662) - [@KronicDeth](https://github.com/KronicDeth) - * Allow call definition heads to resolves to themselves for consistency with Aliases of `defmodule`. - * Generalize `Callable.callDefinitionClauseDefiner(Call)`: in addition to the current `CallDefinitionClause`, make it - work for `Implementation`, `Module`, and `Protocol`. - -### Bug Fixes - -* [#574](https://github.com/KronicDeth/intellij-elixir/pull/574) - Fix copy-paste errors - in `MatchOperatorInsteadOfTypeOperator` - [@KronicDeth](https://github.com/KronicDeth) -* [#579](https://github.com/KronicDeth/intellij-elixir/pull/579) - [@KronicDeth](https://github.com/KronicDeth) - * Subtract 1 from arity in `.beam` file when decompiling to `defmacro` calls because the Erlang function for Elixir - macros has one addition argument: the first argument is the `Caller` of the macro. - * If the name of the decompiled macro/function is an infix operator, then decompile the head as a binary operation - instead of a normal prefix name as infix operators aren't valid prefix names and led to parsing errors, which was - the root cause of [#575](https://github.com/KronicDeth/intellij-elixir/pull/575). - * Fix IntelliJ warnings in `BeamFileImpl` - * Remove unused `VirtualFile` argument to `BeamFileImpl#buildFileStub`. -* [#583](https://github.com/KronicDeth/intellij-elixir/pull/583) - [@KronicDeth](https://github.com/KronicDeth) - * Add `++`, `=~`, and `in` to `INFIX_OPERATOR_SET`. - * Only render infix operators if arity is `2`. - * Prefix operator decompilation: `+` and `-` are both binary and unary operators. When a unary operator they need to - be wrapped in parentheses, so that the call definition clause is parsed correctly. -* [#585](https://github.com/KronicDeth/intellij-elixir/pull/585) - [@KronicDeth](https://github.com/KronicDeth) - * Ignore `JFLex` jar - * Don't check for `elixir-lang/elixr` files remove in `1.3` - * Allow `nil` as a keyword key. `nil` was being lexed as a potential keyword key, but NIL was missing from the token - list in the keywordKey grammar rule. -* [#599](https://github.com/KronicDeth/intellij-elixir/pull/599) - Some SpecialForms don't work as literals as they - would be interpreted as metaprogramming, so their name needs to be wrapped as an atom to `unquote`. - - [@KronicDeth](https://github.com/KronicDeth) -* [#600](https://github.com/KronicDeth/intellij-elixir/pull/600) - [@KronicDeth](https://github.com/KronicDeth) - * Check children of `MultipleAliases` for variable declarations. - * Treat any variable declared in a `MultipleAliases` as invalid. -* [#609](https://github.com/KronicDeth/intellij-elixir/pull/609) - [@KronicDeth](https://github.com/KronicDeth) - * Skip `import Kernel` in `kernel.ex` to prevent stack overflow due to recursive `import` - * Strip all outer parentheses for left type operand, so that `(+value)` can be see as `+` operator type spec. - * Use advice from `IndexNotReadyException` documentation and check `DumbService.isDumb(Project)` before - calling `StubIndex.getElements` in `Module` and `module.MultiResolve.indexNameElements`. - * Don't `assert` that `LookupElement#getPsiElement` is not `null` in `CallDefinitionCluase.renderElement` - * Update to `ant` `1.10.1` because `1.10.0` is no longer hosted. -* [#612](https://github.com/KronicDeth/intellij-elixir/pull/612) - Yeah, it sounds weird, but an `ElixirVariable` isn't - necessarily a variable if it doesn't occur in a declaration context. It could just be a no-parentheses function call - in the wrong spot, so check the parent `PsiElement` to determine if `ElixirVariable` is a variable. - - [@KronicDeth](https://github.com/KronicDeth) -* [#614](https://github.com/KronicDeth/intellij-elixir/pull/614) - Highlight parameterized type head (`maybe(t)` - in `@type maybe(t)`) the same as a full type definition (`maybe(t)` in `@type maybe(t) :: t | nil`) - - [@KronicDeth](https://github.com/KronicDeth) -* [#616](https://github.com/KronicDeth/intellij-elixir/pull/616) - Only show Mix ExUnit Run in context when the module, - or when the module is not a available, the project SDK is Elixir. If there is no SDK configured, show "Mix ExUnit Run" - in the menu. - [@KronicDeth](https://github.com/KronicDeth) -* [#617](https://github.com/KronicDeth/intellij-elixir/pull/617) - Mark `do:` as atom in demo text - - [@KronicDeth](https://github.com/KronicDeth) -* [#627](https://github.com/KronicDeth/intellij-elixir/pull/627) - Annotations can only be applied to the single, active - file, which belongs to the `referrer` `Callable`. The `resolved` may be outside the file if it is a cross-file - function or macro usage, in which case it's `TextRange` should not be highlighted because it is referring to offsets - in a different file. - [@KronicDeth](https://github.com/KronicDeth) -* [#634](https://github.com/KronicDeth/intellij-elixir/pull/634) - [@KronicDeth](https://github.com/KronicDeth) - * `Variable` scope for `QualifiedMultipleAliases`, which occurs when qualified call occurs over a line with assignment - to a tuple, such as `Qualifier.\n{:ok, value} = call()` - * Remove call definition clauses (function or macro) completion for bare words as it had a detrimental impact on - typing feedback (the editor still took input, but it wasn't rendered until the completion returned OR `ESC` was hit - to cancel the completion, which became excessive once the index of call definition clauses was expanded by the - decompilation of the Elixir standard library `.beam`s, so disable it. If bare-words completion is restored. It will - either (1) need to not use the `Reference#getVariants()` API because it generates too many objects that need to be - thrown away or (2) need to only complete call definition clauses that are provably in-scope from imports or other - macros. -* [#636](https://github.com/KronicDeth/intellij-elixir/pull/636) - [@KronicDeth](https://github.com/KronicDeth) - * Both intellij-erlang and intellij-community are Apache 2.0 licensed and its the default license for Elixir projects, - so seems like a good choice for `LICENSE.md` - * Add `CODE_OF_CONDUCT.md` -* [#638](https://github.com/KronicDeth/intellij-elixir/pull/638) - [@KronicDeth](https://github.com/KronicDeth) - * The run configurations I put together in [#504](https://github.com/KronicDeth/intellij-elixir/pull/504) didn't allow - for the debugger to work properly: neither pause nor breakpoints had any effect, so regenerate them from the Gradle - pane. - * Check parent of `when` operation in case it's a guarded function head - in `org.elixir_lang.annonator.Parameter.putParameterized(Parameter, PsiElement)` - * Instead of highlighting call definition clauses when they are referred to, which only works if it is in the same - file, highlight all function and macro declarations when the `def*` call is encountered. - * Only increment arity for right pipe operand instead of all operands, so that left operands resolve to correct arity - or as variable/parameter. -* [#662](https://github.com/KronicDeth/intellij-elixir/pull/662) - [@KronicDeth](https://github.com/KronicDeth) - * Override `ModuleImpl#getProject()` to prevent `StackOverflowError`. Without overriding `#getProject()` - , `IdentifierHighlighterPass` gets stuck in a loop between `getManager` and `getProject` on the target ( - the `ModuleImpl`) when clicking on the space between `def`s or `defmacro`s in the decompiled `.beam` files. - * Fix source formatting - * Skip looking for variables unless 0-arity AND no arguments - * Highlight unresolved macros as macro calls. Anything with a do keyword or a do block will be treated like a macro - call even if it can't be resolved. No resolved is either no resolve results or an empty list - * Implicit imports at top of file in addition to top of Module. -* [#663](https://github.com/KronicDeth/intellij-elixir/pull/663) - [@KronicDeth](https://github.com/KronicDeth) - * `CallDefinitionClause` completion provider is unexpectedly invoked both when `.` is typed, but continues to be - invoked after a letter is typed after the `.`; however, once the letter is typed, the letter becomes the default - prefix instead, so the prefix should only be reset to `""` when it ends in `.`. - * Disable `Callable#getVariants` unless `Unqualified` to prevents local functions and macros being shown as - completions for qualified names. -* [#651](https://github.com/KronicDeth/intellij-elixir/pull/651) - [@StabbyMcDuck](https://github.com/StabbyMcDuck) - * Among many other tweaks, the String color is now green, so that Atom and String are no longer close to one another, - which was the original issue in #569 - screen shot 2017-04-09 at 9 44 06 pm - * `Alias` now has `underscored` effect - * `Brackets` are now greenish instead of brownish - * `Callbacks` are now a lighter blue and has `underscored` effect - * `CharList` is little lighter - * `CharToken` is dark yellow now instead of dark purple - * `Dot` is now purple instead of dark red - * `Expression Substitution Mark` is a little lighter - * `Interpolation` is now lime green - * `Kernel Macros` are a burnt orange - * `Map` is now a dark blue instead of a dark yellow - * `Operation Sign` is a little lighter - * `Parameters` are a little darker - * `Parentheses` are redder - * `Predefined` is orange instead of blue - * `Specification` is now red instead of purple - * `Struct` is now purple instead of yellow - * `Type` is now green instead of dark purple - * `Variable` is more tealish -* [#650](https://github.com/KronicDeth/intellij-elixir/pull/650) - [@StabbyMcDuck](https://github.com/StabbyMcDuck) - * Fix indentation to fix sub-lists in `CONTRIBUTING.md` - * Fix pluralization in `CONTRIBUTING.md` -* [#664](https://github.com/KronicDeth/intellij-elixir/pull/664) - [@KronicDeth](https://github.com/KronicDeth) - * Check if resolve results are `null` for `For.resolveResultList` - * Check if `Protocol.resolveResultList` is `null` -* [#665](https://github.com/KronicDeth/intellij-elixir/pull/665) - Check `match` `Call` is - an `UnqualifiedNoArgumentCall`, in addition to being 0 resolved final arity, before checking if the name matches. - - [@KronicDeth](https://github.com/KronicDeth) - -### Incompatible Changes - -* [#585](https://github.com/KronicDeth/intellij-elixir/pull/585) - Move `^^^` to its own three-operator precedence level - to match `1.2`. This does mean the parsing will be wrong for Elixir `1.1`, but is simpler than maintaining two - grammars for those that are still using Elixir `1.1` - [@KronicDeth](https://github.com/KronicDeth) -* [#504](https://github.com/KronicDeth/intellij-elixir/pull/504) - The `ant` build files have been removed. To build the - build plugin (for Install From Disk), use the `./gradlew buildPlugin`. - [@JakeBecker](https://github.com/JakeBecker) -* [#640](https://github.com/KronicDeth/intellij-elixir/pull/640) - Change to module attribute folding to off by default. - - [@KronicDeth](https://github.com/KronicDeth) - -## v4.7.0 - -### Enhancements - -* [#523](https://github.com/KronicDeth/intellij-elixir/pull/523) - Use the `CommonProgramParametersPanel` to get the - working directory and environment variables the same way the JUnit form does. Replace the custom "Command" input with - the "Program arguments" input built into the `CommonProgramParametersPanel`. `CommonProgramParametersPanel` expects to - store the "Program Arguments" in a "ProgramParameters" field, so old run configurations will lose their "Command" - option value and it will be migrated to the new "ProgramParameters". - [@KronicDeth](https://github.com/KronicDeth) -* [#482](https://github.com/KronicDeth/intellij-elixir/pull/482) - [@JakeBecker](https://github.com/JakeBecker) - , [@KronicDeth](https://github.com/KronicDeth) - * Create / Run Mix ExUnit Run Configurations - * Run Configuration from Directory - * Run Configuration from File - * Run Configuration from LIne - * Run Configurations support Common Program Parameters - * Program Arguments - * Working directory - * Environment variables -* [#531](https://github.com/KronicDeth/intellij-elixir/pull/531) - [@KronicDeth](https://github.com/KronicDeth) - * `enclosingMacroCall` returns enclosing macro call when parent is `ElixirDoBlock`, so that `end` element goes to the - macro call. - * `Navigate > Test` will go to the Module that has the same canonical name as the current `defimpl`, `defmodule` - , `defprotocol` , or `quote` with a `Test` suffix added - * `Navigate > Test Subject` will go to the `defimpl`, `defmodule`, `defprotocol`, or `quote` that has the same - canonical name as the current Module with the `Test` suffix removed. -* [#533](https://github.com/KronicDeth/intellij-elixir/pull/533) - Regression test for #500 - - [@KronicDeth](https://github.com/KronicDeth) -* [#545](https://github.com/KronicDeth/intellij-elixir/pull/545) - Regression test for #517 - - [@KronicDeth](https://github.com/KronicDeth) -* [#548](https://github.com/KronicDeth/intellij-elixir/pull/548) - Regression test for #521 - - [@KronicDeth](https://github.com/KronicDeth) -* [#549](https://github.com/KronicDeth/intellij-elixir/pull/549) - [@KronicDeth](https://github.com/KronicDeth) - * Regression test for #525 - * If `:` is used instead of `::` for a type specification, mark it as an error with a Quick Fix to convert `:` - to ` ::`. - * Highlight `=` operands the same as `::` operands in type specifications. - * If `=` is used instead of `::` in a type specification, mark it as an error with a Quick Fix to convert `=` - to `::`. - -### Bug Fixes - -* [#523](https://github.com/KronicDeth/intellij-elixir/pull/523) - Fix typo: `myRunInModuleChekcBox` - => `myRunInModuleCheckBox` - [@KronicDeth](https://github.com/KronicDeth) -* [#532](https://github.com/KronicDeth/intellij-elixir/pull/532) - Don't log error when name length exceeds presentable - text length because it appears to be common for normal users and not a development environment artifact. - - [@KronicDeth](https://github.com/KronicDeth) -* [#533](https://github.com/KronicDeth/intellij-elixir/pull/533) - Check parent of `ElixirMultipleAliases` - for `isVariable` because `ElixirMultipleAliases` can be hit in `isVariable` when `MyAlias.` is added on a line above a - pre-existing tuple, such as when typing a new qualified call. - [@KronicDeth](https://github.com/KronicDeth) -* [#534](https://github.com/KronicDeth/intellij-elixir/pull/534) - Add space between variable and match in lookup - element presentation - [@KronicDeth](https://github.com/KronicDeth) -* [#535](https://github.com/KronicDeth/intellij-elixir/pull/535) - Check `VirtualFile` is not null before creating - attachment because `PsiFile` can lack a `VirtualFile` if the `PsiFile` only exists in memory. - - [@KronicDeth](https://github.com/KronicDeth) -* [#537](https://github.com/KronicDeth/intellij-elixir/pull/537) - Convert `CallDefinitionClause(Call)` - to `CallDefinitionClause.fromCall(Call)`, so that `null` can be returned - when `CallDefinitionClause.enclosingModular(Call)` returns `null`. - [@KronicDeth](https://github.com/KronicDeth) -* [#539](https://github.com/KronicDeth/intellij-elixir/pull/539) - [@KronicDeth](https://github.com/KronicDeth) - * Use `functionName` instead of `getName` when multiresolving unqualified functions because `getName` will return the - Alias when called on `defmodule`. - * `maybeQualifiedCallToModular` returned `null` BOTH (1) if the call was unqualified OR (2) if the call was qualified, - but its modular could not be resolved, so qualified calls to `.beam`-only modules, like `File.read!` - returned `null` because `File` could not be resolved to a modular. Remove `maybeqQualifiedToModular` and - call `qualifiedToModular` when `myElement` is qualified. If the modular is `null`, then return an - empty `ResolveResult[]` instead of looking for unqualified matches. - * Pass `maxScope` to `Module` reference. `maxScope` is generally the containing file for the element, but when - using `Module` to resolve `import`s, it is the `import` call's parent element, so that the resolve doesn't ricochet - between the `defmodule` and its child, the `import` call until `StackOverflowError`. -* [#545](https://github.com/KronicDeth/intellij-elixir/pull/545) - A variable cannot be declared in update arguments, so - return `LocalSearchScope.EMPTY`, the same as interpolation. - [@KronicDeth](https://github.com/KronicDeth) -* [#548](https://github.com/KronicDeth/intellij-elixir/pull/548) - `ElixirSystemUtil.getProcessOutput` already allowed - for an empty, invalid `ProcessOutput` when the `workDir` wasn't a directory, so allow it to also be `null` and return - the empty `ProcessOutput`. - [@KronicDeth](https://github.com/KronicDeth) -* [#549](https://github.com/KronicDeth/intellij-elixir/pull/549) - [@KronicDeth](https://github.com/KronicDeth) - * If a single keyword pair is used for a type spec, treat `:` as a type for `::` - * Limit variable use scope for variables "declared" in module attributes to the module attribute because the variable - can't be declared there and it is really a variable usage without declaration. - -## v4.6.0 - -### Enhancements - -* [#454](https://github.com/KronicDeth/intellij-elixir/pull/454) - Regression test - for [#453](https://github.com/KronicDeth/intellij-elixir/issues/453) - [@KronicDeth](https://github.com/KronicDeth) -* [#455](https://github.com/KronicDeth/intellij-elixir/pull/454) - Regression test - for [#446](https://github.com/KronicDeth/intellij-elixir/issues/446) - [@KronicDeth](https://github.com/KronicDeth) -* [#464](https://github.com/KronicDeth/intellij-elixir/pull/464) - Show element class in all error reports - - [@KronicDeth](https://github.com/KronicDeth) -* [#465](https://github.com/KronicDeth/intellij-elixir/pull/465) - Regression test - for [#456](https://github.com/KronicDeth/intellij-elixir/issues/456) - [@KronicDeth](https://github.com/KronicDeth) -* [#466](https://github.com/KronicDeth/intellij-elixir/pull/466) - Regression test - for [#458](https://github.com/KronicDeth/intellij-elixir/issues/458) - [@KronicDeth](https://github.com/KronicDeth) -* [#467](https://github.com/KronicDeth/intellij-elixir/pull/467) - Regression tests - for [#443](https://github.com/KronicDeth/intellij-elixir/issues/443) - [@KronicDeth](https://github.com/KronicDeth) -* [#474](https://github.com/KronicDeth/intellij-elixir/pull/474) - Regression test - for [#462](https://github.com/KronicDeth/intellij-elixir/issues/462) - [@KronicDeth](https://github.com/KronicDeth) -* [#476](https://github.com/KronicDeth/intellij-elixir/pull/476) - Regression test - for [#468](https://github.com/KronicDeth/intellij-elixir/issues/468) - [@KronicDeth](https://github.com/KronicDeth) -* [#477](https://github.com/KronicDeth/intellij-elixir/pull/477) - [@KronicDeth](https://github.com/KronicDeth) - * Regression test for [#469](https://github.com/KronicDeth/intellij-elixir/issues/469) - * Highlight Strings and String Heredocs as errors in types. -* [#479](https://github.com/KronicDeth/intellij-elixir/pull/479) - Regression tests - for [#470](https://github.com/KronicDeth/intellij-elixir/issues/470) - [@KronicDeth](https://github.com/KronicDeth) -* [#483](https://github.com/KronicDeth/intellij-elixir/pull/483) - [@KronicDeth](https://github.com/KronicDeth) - * Add `Qualified#qualifier` by extracting it from `CallDefinitionClause` `CompletionProvider`. - * Add `Modular` class with `#forEachCallDefinitionClauseNameIdentifier` to enumerate all the identifiers that could be - linked to in a modular. - * Add `ElixirPsiImplUtil#maybeQualifiedCallToModular` by extracting `resolveFully` - from `CallDefinitionClause` `CompletionProvider` - * Add regression tests for [#463](https://github.com/KronicDeth/intellij-elixir/issues/463). -* [#484](https://github.com/KronicDeth/intellij-elixir/pull/484) - Regression test - for [#471](https://github.com/KronicDeth/intellij-elixir/issues/471) - [@KronicDeth](https://github.com/KronicDeth) -* [#485](https://github.com/KronicDeth/intellij-elixir/pull/485) - Regression test - for [#472](https://github.com/KronicDeth/intellij-elixir/pull/472) - [@KronicDeth](https://github.com/KronicDeth) -* [#486](https://github.com/KronicDeth/intellij-elixir/pull/486) - [@KronicDeth](https://github.com/KronicDeth) - * Extract `Arrow` interface for `*ArrowOperation`s. - * Regression tests for [#480](https://github.com/KronicDeth/intellij-elixir/issues/480) - -### Bug Fixes - -* [#454](https://github.com/KronicDeth/intellij-elixir/pull/454) - Return `emptySet` when `lookupElementByPsiElement` - is `null`. - [@KronicDeth](https://github.com/KronicDeth) -* [#455](https://github.com/KronicDeth/intellij-elixir/pull/454) - [@KronicDeth](https://github.com/KronicDeth) - * Don't do a naked `assert` that there are 2 children because this can fail during error recovery on the operand, - instead use the `prefix.Normalized.operand()` through `prefix.operand()`. - - **WARNING: This changes the `@NotNull` array so that its sole element changes from `@NotNull` to `@Nullable`. It may - trigger new bugs.** -* [#461](https://github.com/KronicDeth/intellij-elixir/pull/461) - Use shipped `GeneratedParserUtilBase.DUMMY_BLOCK` - because the `DUMMY_BLOCK` *MUST* match the `GeneratedParserUtilBase` to detect dummy blocks inserted for error - handling. - [@KronicDeth](https://github.com/KronicDeth) -* [#465](https://github.com/KronicDeth/intellij-elixir/pull/465) - Skip over `ElixirNoParenthesesStrict` - for `isVariable` - [@KronicDeth](https://github.com/KronicDeth) -* [#466](https://github.com/KronicDeth/intellij-elixir/pull/466) - Allow newlines before `do` in `doBlock` - - [@KronicDeth](https://github.com/KronicDeth) -* [#467](https://github.com/KronicDeth/intellij-elixir/pull/467) - Don't match `do` or `fn` to `end` when used as a - keyword key. - [@KronicDeth](https://github.com/KronicDeth) -* [#474](https://github.com/KronicDeth/intellij-elixir/pull/474) - [@KronicDeth](https://github.com/KronicDeth) - * Check if `iterator.atEnd()` before calling `iterator.getTokenType()` to avoid `IndexOutOfBounds` exception. - * Don't add current call definition clause being written to completion -* [#476](https://github.com/KronicDeth/intellij-elixir/pull/476) - `When#leftOperand` will return `null` (because it's - normalized) if there are left-hand error elements, but when stripping guards we want best-effort to match human - expectations, so don't use normalized `null`, but use left, non-error element if it is unique. - - [@KronicDeth](https://github.com/KronicDeth) -* [#477](https://github.com/KronicDeth/intellij-elixir/pull/477) - Highlight types in `QualifiedNoParenthesesCall` - - [@KronicDeth](https://github.com/KronicDeth) -* [#478](https://github.com/KronicDeth/intellij-elixir/pull/478) - Still not obvious why `name` for - a `CallDefinitionClause` lookup renderer can be longer than `presentableText`, so still log an error, but - with `Logger.error`, so we get `name`, `presentableText`, and the original `element`. - - [@KronicDeth](https://github.com/KronicDeth) -* [#479](https://github.com/KronicDeth/intellij-elixir/pull/479) - [@KronicDeth](https://github.com/KronicDeth) - * Skip `Arguments` elements in `previousParentExpresion` to eliminate an unnecessary level of processing declarations - since calls will enter their arguments. - * Only put new `ENTRANCE` in `ResolveState` in `variable.MultiResolve.resolveResultList`, so that caller can override - the default value. - * Set `ENTRANCE` to `matchAncestor` instead of previous expression to eliminate the looping that occurred when a - variable was unbound (or a function) because the check for `with` (and `for`) was expecting the `ENTRANCE` to be the - previous child expression instead of the `with` clause as a whole (or the `Arguments` element as had been the case - before [6fcc19b](https://github.com/KronicDeth/intellij-elixir/commit/6fcc19bd1748004756da2c8a541fa8b94ede1f71)). -* [#483](https://github.com/KronicDeth/intellij-elixir/pull/483) - [@KronicDeth](https://github.com/KronicDeth) - * Resolves functions qualified by Aliases that are either direct Module references or one-step aliases. - * Remove `Call#resolvedFunctionName` because `import` can't rename functions. -* [#484](https://github.com/KronicDeth/intellij-elixir/pull/484) - Don't type-highlight `BracketOperation`s as they - occur when putting maps or structs in front of lists. - [@KronicDeth](https://github.com/KronicDeth) -* [#485](https://github.com/KronicDeth/intellij-elixir/pull/485) - Treat `Enum.each` the same as `Enum.map` around `def` - - [@KronicDeth](https://github.com/KronicDeth) -* [#486](https://github.com/KronicDeth/intellij-elixir/pull/486) - Increase `resolvedFinalArity` by `1` for piping. - - [@KronicDeth](https://github.com/KronicDeth) -* [#498](https://github.com/KronicDeth/intellij-elixir/pull/498) - [@KronicDeth](https://github.com/KronicDeth) - * Go To Declaration resolves through `import` - * for `import MyModule` - * the `import` statement - * the call definition clause in the imported Module. - * for `import MyModule, only: [name: arity]` - * the `import` statement - * the call definition clause in the imported Module. - * for `import MyModule, except: [name: arity]` _if_ reference is _not_ `name/arity`. - * the `import` statement - * the call definition clause in the imported Module. - -## v4.5.0 - -### Enhancements - -* [#452](https://github.com/KronicDeth/intellij-elixir/pull/452) - [@KronicDeth](https://github.com/KronicDeth) - * Go To Declaration for functions and macros (only those defined in parseable-Elixir source. References to Erlang - functions or only those available in `.beam` file, such as the standard library will not resolve.) - * Completion for functions and macros (only those defined in parseable-Elixir source. Erlang functions and Elixir - function only in compiled `.beam` file, such as the standard library will not complete.) - * Completion uses the same presentation as Structure View, so the you can tell whether the name is a function/macro, - whether it is public/private, and the Module where it is defined. - * Completed functions/macro insert `()` after the name in preparation for Elixir 1.4 where it is an error to have - bare function calls. It also makes it more obvious that you inserted a function and not a variable. - * Completion works for all functions when a bare identifier is used. For a qualified identifier, only - functions/macros under than Module are shown. - -## v4.4.0 - -### Enhancements - -* [#419](https://github.com/KronicDeth/intellij-elixir/pull/419) - Regression test using `typespec_test.exs` that - triggered [#413](https://github.com/KronicDeth/intellij-elixir/issues/413) - - [@KronicDeth](https://github.com/KronicDeth) -* [#425](https://github.com/KronicDeth/intellij-elixir/pull/425) - Regression test that checks the correct `import` is - used for `GeneratedParserUtilBase` in `ElixirParser` - [@KronicDeth](https://github.com/KronicDeth) -* [#432](https://github.com/KronicDeth/intellij-elixir/pull/432) - [@KronicDeth](https://github.com/KronicDeth) - * [Completion of multiple aliases inside curly braces](https://www.youtube.com/watch?v=aOiJHZuudzg) - * Override `ElixirMultipleAliases#processDeclarations`, so that `treeWalkUp` can stop at `ElixirMultipleAliases` - when determining how to do Alias completion. If a multiple alias is encountered, then de-prefixed names should be - returned. -* [#434](https://github.com/KronicDeth/intellij-elixir/pull/434) - Regression test - for [#429](https://github.com/KronicDeth/intellij-elixir/issues/429) - [@KronicDeth](https://github.com/KronicDeth) -* [#435](https://github.com/KronicDeth/intellij-elixir/pull/435) - Regression test - for [#422](https://github.com/KronicDeth/intellij-elixir/issues/422) - [@KronicDeth](https://github.com/KronicDeth) -* [#439](https://github.com/KronicDeth/intellij-elixir/pull/439) - Regression test - for [#438](https://github.com/KronicDeth/intellij-elixir/issues/438) - [@KronicDeth](https://github.com/KronicDeth) -* [#440](https://github.com/KronicDeth/intellij-elixir/pull/440) - Regression test - for [#431](https://github.com/KronicDeth/intellij-elixir/issues/431) - [@KronicDeth](https://github.com/KronicDeth) -* [#441](https://github.com/KronicDeth/intellij-elixir/pull/441) - Regression test - for [#436](https://github.com/KronicDeth/intellij-elixir/issues/436) - [@KronicDeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#419](https://github.com/KronicDeth/intellij-elixir/pull/419) - [@KronicDeth](https://github.com/KronicDeth) - * Return empty `Set` instead of `null` from `canonicalNameSet` - * Highlight types in `ElixirMapUpdateArguments` even though they are - an [invalid typespec example from elixir-lang/elixir tests](https://github.com/elixir-lang/elixir/blob/dadf98fbff2966f24bf5b0313822a90b90f7016a/lib/elixir/test/elixir/kernel/typespec_test.exs#L314-L320) -* [#424](https://github.com/KronicDeth/intellij-elixir/pull/424) - Check if `rightOperand` is `null` when highlighting - types for `Type`, which can occur when typing `:` for an atom after the `::` for a `Type` - - [@KronicDeth](https://github.com/KronicDeth) -* [#425](https://github.com/KronicDeth/intellij-elixir/pull/425) - Use `GeneratedParserUtilBase` synced to GrammarKit - version as was done originally in [#406](https://github.com/KronicDeth/intellij-elixir/pull/406) - - [@KronicDeth](https://github.com/KronicDeth) -* [#426](https://github.com/KronicDeth/intellij-elixir/pull/426) - Check parent of `BracketArguments` for `isParameter` - and `isVariable`- [@KronicDeth](https://github.com/KronicDeth) -* [#428](https://github.com/KronicDeth/intellij-elixir/pull/428) - Instead of asserting that a `QualifiableAlias` has 3 - children, which may not be true on error recovery, use the `Normalized` static methods that are used elsewhere to - handle error recovery around Infix operations as the `.` in `QualifiableAlias`es is a pseudo-Infix - - [@KronicDeth](https://github.com/KronicDeth) -* [#432](https://github.com/KronicDeth/intellij-elixir/pull/432) - Add missing `@Nullable` to `@NotNull` change when - parser wasn't regenerated when `canonicalNameSet` was changed to `@NotNull` in the interface. - - [@KronicDeth](https://github.com/KronicDeth) -* [#434](https://github.com/KronicDeth/intellij-elixir/pull/434) - Search above block items and block lists for calls to - check use scope - [@KronicDeth](https://github.com/KronicDeth) -* [#435](https://github.com/KronicDeth/intellij-elixir/pull/435) - Check parent `isVariable` - for `ElixirNoParenthesesManyStrictNoParenthesesExpression` - [@KronicDeth](https://github.com/KronicDeth) -* [#439](https://github.com/KronicDeth/intellij-elixir/pull/439) - Highlight `@type` without `::` - - [@KronicDeth](https://github.com/KronicDeth) -* [#440](https://github.com/KronicDeth/intellij-elixir/pull/440) - - `ElixirNoParenthesesManyStrictNoParenthesesExpression` indicates an ambiguous no parentheses nesting, but the - highlighting should not error and do a best effort instead. - [@KronicDeth](https://github.com/KronicDeth) -* [#441](https://github.com/KronicDeth/intellij-elixir/pull/441) - `isParameter(Call)` called `isParameter` on its - parent if it wasn't a call definition clause, delegation or macro, but `isParameter(PsiElement)` immediately - calls `getParent()` and does all the `instanceof` tests on the parent. So, instead of `isParameter(Call)` - calling `isParameter(PsiElement)` on its parent, it should just call it on itself, this way the check - for `ElixirInterpolation` will not be skipped and there's no need to handle `ElixirInterpolatedString`. - - [@KronicDeth](https://github.com/KronicDeth) - -## v4.3.0 - -### Enhancements - -* [#387](https://github.com/KronicDeth/intellij-elixir/pull/387) - Resolve aliased modules to their `alias` call, from - the alias call, you can Go To Declaration for the module itself. - [@KronicDeth](https://github.com/KronicDeth) - * Code structure - * Module resolution uses the OpenAPI convention of `treeWalkUp` now instead of custom code. - * Resolvable names has been extracted to its own class - * Resolution use cases - * `Suffix` resolves to `alias Prefix.Suffix` - * `Suffix.Nested` resolves to `alias Prefix.Suffix` - * `As` resolves `to `alias Prefix.Suffix, as: As` - * `NestedSuffix` resolves to `alias __MODULE__.NestedSuffix` -* [#389](https://github.com/KronicDeth/intellij-elixir/pull/389) - Completion for module aliases - - [@KronicDeth](https://github.com/KronicDeth) - * From in-file aliases - * `__MODULE__` - * In project modules (using index already used for Go To Declaration) -* [#393](https://github.com/KronicDeth/intellij-elixir/pull/393) - In addition to `StubBased#canonicalName`, there now - also `StubBased#canonicalNames`, for when a call defines multiple canonical names, as is the case - for `defimpl , for: [, ...]`. - [@KronicDeth](https://github.com/KronicDeth) -* [#397](https://github.com/KronicDeth/intellij-elixir/pull/397) - When a aliased name is added to the module list for - completion, it's unaliased name is searched for in the `AllName` index, if any nested modules are found for the - unaliased name, then those nested names are aliased and also shown for completion. - - [@KronicDeth](https://github.com/KronicDeth) -* [#399](https://github.com/KronicDeth/intellij-elixir/pull/399) - `resolvableName` allows nested modules under multiple - aliases to be completed. - [@KronicDeth](https://github.com/KronicDeth) -* [#403](https://github.com/KronicDeth/intellij-elixir/pull/403) - By user request, the folding will be off-by-default - now, but can be re-enabled, like the old behavior by checking the checkbox in Preferences > Editor > General > Code - Folding > Elixir Module directive (`alias`, `import`, `require` or `use`) groups. - - [@KronicDeth](https://github.com/KronicDeth) -* [#405](https://github.com/KronicDeth/intellij-elixir/pull/405) - [@KronicDeth](https://github.com/KronicDeth) - * Resolve `as:` aliased name to both `alias` and `defmodule` - * Complete modules nested under `as:` aliased name. -* [#409](https://github.com/KronicDeth/intellij-elixir/pull/409) - [@KronicDeth](https://github.com/KronicDeth) - * Completion and reference tests for aliases: - * `alias Prefix.Suffix` - * `alias Prefix.Suffix, as: As` - * `alias Prefix.{MultipleAliasA, MultipleAliasB}` - -### Bug Fixes - -* [#393](https://github.com/KronicDeth/intellij-elixir/pull/393) - [@KronicDeth](https://github.com/KronicDeth) - * `defimpl , for: [, ...]` generates multiple canonical names, which are stored in the stub index. - * When retrieved from the `AllName` index, the `defimpl`'s Implementation will render as if only - the `defimpl , for: ` was used for the `` matching the lookup name in the Goto Symbol - dialog. For example, if you search for `Tuple`, `JSX.Encoder.Tuple` will match - for [`defimpl JSX.Encoder, for: for: [Tuple, PID, Port, Reference, Function, Any]`](https://github.com/talentdeficit/exjsx/blob/master/lib/jsx.ex#L152-L155) - . -* [#400](https://github.com/KronicDeth/intellij-elixir/pull/400) - [@KronicDeth](https://github.com/KronicDeth) - * Look outside Enum.map for enclosing macro call because `Ecto` defines the clauses of `__schema__(:type, ...)` - using `Enum.map`, but `enclosingMacroCall` only knews to jump over enclosing macros like `for`, so a special case - was added for anonymous function given to `Enum.map`. - * Fix if-else-ordering bug where `Call` appeared before operations (which are usually `Call`s) like `Match`. -* [#401](https://github.com/KronicDeth/intellij-elixir/pull/401) - In `@type unquote({name, nil, []}) :: foo`, `name` - will be highlighted as a type parameter even though it is not strictly the name that will appear as a type parameter. - - [@KronicDeth](https://github.com/KronicDeth) -* [#405](https://github.com/KronicDeth/intellij-elixir/pull/405) - [@KronicDeth](https://github.com/KronicDeth) - * Resolve alias nested under aliased modules to both the `alias` and `defmodule`, as resolving to only the `alias` - loses the nested name, so it wasn't possible to jump to the nested name's `defmodule`. - * Resolve aliased name to both the `alias` and the `defmodule`, so you can skip jumping to the `alias` before jumping - to the `defmodule`. -* [#406](https://github.com/KronicDeth/intellij-elixir/pull/406) - [@KronicDeth](https://github.com/KronicDeth) - * The generated `ElixirParser` uses the `GeneratedParserUtilBase` from `com.intellij.lang.parser`, but since that - version is a synced copy, it is a snapshot of `GeneratedParserUtilBase` from the version of GrammarKit that was - current when the IDE was released. To ensure the generated parser works on all the IDEs, I - copy `GeneratedParserUtilBase` from `org.intellij.grammar.parser` into `org.elixir_lang.grammar.parser` and then use - that version in `ElixirParser`. This ensures neither the IDE's version nor the version in any installed GrammarKit - plugin is used. -* [#409](https://github.com/KronicDeth/intellij-elixir/pull/409) - [@KronicDeth](https://github.com/KronicDeth) - * Check that index name maps to an actual project element before returning it for completion as the names - from `StubIndex.getInstance.getAllKeys(...)` is a superset of actual keys in the actual - project [according to Peter Gromov of JetBrains](https://intellij-support.jetbrains.com/hc/en-us/community/posts/207930789-StubIndex-persisting-between-test-runs-leading-to-incorrect-completions) - . - * Don't index `canonicalName` if it matches the literal name, as the duplicate name leads to duplicate entries in the - completion lookup. - * `canonicalNameCollection` was renamed to `canonicalNameSet` (with type changing from `Collection` - to `Set` to match) to emphasize that the canonical names should be unique, but `canonicalNameSet` - itself should still include duplicates of name for those places where only canonical names are used. - * Use `resolvableName` for the `unaliasedName` for `MultipleAliases` Aliases, so that they complete correctly for - nested modules. - * Completion for nested modules will no longer complete with string suffixes (i.e. `SSHView`) and only complete nested - Aliases (i.e. `SSH.Key`). - -## v4.2.0 - -### Enhancements - -* [#371](https://github.com/KronicDeth/intellij-elixir/pull/371) - [@KronicDeth](https://github.com/KronicDeth) - * `BraceMatcher` - * Matches the following pairs: - * `do` to `end` - * `fn` to `end` - * `"""` to `"""` - * `'''` to `'''` - * `<<` to `>>` - * `<` to `>` - * `[` to `]` - * `{` to `}` - * `(` to `)` - * Completes the following pairs: - * `[` with `]` - * `{` with `}` - * `(` with `)` - * `QuoteHandler` completes standard quotes (that start with `"` or `'`) - * `'` with `'` - * `"` with `"` - * `'''` with `'''` - * `"""` with `"""` - * `TypedHandler` completes the non-standard quotes and braces - * `do` with ` end` - * `fn` with ` end` - * ` `<<` with `>>` - * `<` with `>` (for promoters) - * `/` with `/` (for promoters) - * `|` with `|` (for promoters) - -### Bug Fixes - -* [#372](https://github.com/KronicDeth/intellij-elixir/pull/372) - Check parent - for `isVariable(ElixirMapUpdateArguments)` - [@KronicDeth](https://github.com/KronicDeth) -* [#374](https://github.com/KronicDeth/intellij-elixir/pull/374) - [@KronicDeth](https://github.com/KronicDeth) - * IntelliJ 15.0.4 is no longer available from JetBrains, so if the cache is not available, the builds don't work, so - use 15.0.6, which is available in 15.0.4's place as the test version for 15.X. - * IntelliJ 2016.2 is no longer available from JetBrains, so if the cache is not available, the builds don't work, so - use 2016.2, which is available in 2016.1's places at the test version for 2016.X. -* [#378](https://github.com/KronicDeth/intellij-elixir/pull/378) - `enclosingMacroCall` could climb out the stab after - a `do`, but not the `else` in an `if`, which is used for defined functions conditionally - in [`Phoenix.Endpoint.server/0`](https://github.com/phoenixframework/phoenix/blob/v1.2.0/lib/phoenix/endpoint.ex#L542-L548) - - [@KronicDeth](https://github.com/KronicDeth) -* [#380](https://github.com/KronicDeth/intellij-elixir/pull/380) - A lot of ppl use the doc template after already - typing `@`, but the doc template starts with `@`, so it ends up inserting `@@doc ...`. The `@doc` template is the same - code, but since the name starts with `@`, it doesn't insert a second `@`. Unfortunately, the template search code - doesn't prompt when just typing `@`, so you end up having to type `@doc` before only one template is selected. - The `@doc` template will show in the lookup as soon as `@d` is typed, but you have to select it from the list then - before tabbing to accept. - [@KronicDeth](https://github.com/KronicDeth) -* [#381](https://github.com/KronicDeth/intellij-elixir/pull/381) - Look at end of `do` instead of start for `end` - completion to stop ignoring the `:` in `do: `, when `caret - 3` would land on the `o`, now all tests are meant to land - on the `o`, so `do: ` won't complete with `end` incorrectly anymore. - [@KronicDeth](https://github.com/KronicDeth) -* [#382](https://github.com/KronicDeth/intellij-elixir/pull/382) - Ignore `ElixirVariable` - in `highlightTypesAndTypeParameterUsages` - [@KronicDeth](https://github.com/KronicDeth) - -## v4.1.0 - -### Enhancements - -* [#331](https://github.com/KronicDeth/intellij-elixir/pull/331) - [@KronicDeth](https://github.com/KronicDeth) - * Allow `do end` blocks to fold to `do: ...` - * Allow `->` operator and the right operand to fold to `-> ...` - * Allow `@doc`, `@moduledoc` and `@typedoc` value to fold to `"..."`. - * Fold runs of adjacent `alias`, `import`, `require`, or `use` to be followed to a single `alias`, `import` - , `require`, or `use` followed by `...`. -* [#334](https://github.com/KronicDeth/intellij-elixir/pull/334) - Function separators - - [@KronicDeth](https://github.com/KronicDeth) - * Show a function separator (Preferences > Editor > General > Appearance > Show method separators) above the group - of `@doc`, `@spec` and `def`, `defp`, `defmacro`, and `defmacrop` (call definition clauses) of the same name and - arity range. Arity range will be used if one of the call definition clauses uses default arguments. -* [#337](https://github.com/KronicDeth/intellij-elixir/pull/337) - [@KronicDeth](https://github.com/KronicDeth) - * `@for` folds to the resolved module name in `defimpl` - * `@protocol` folds to the protocol name in `defimpl` -* [#343](https://github.com/KronicDeth/intellij-elixir/pull/343) - Share code between `mix` and `elixir` version - parsing. - [@KronicDeth](https://github.com/KronicDeth) -* [#344](https://github.com/KronicDeth/intellij-elixir/pull/344) - [@KronicDeth](https://github.com/KronicDeth) - * Allow Unknown modulars in the Structure pane, in addition to Go To Symbol. Their icon is a big ? to indicate their - correct usage is unknown. -* [#348](https://github.com/KronicDeth/intellij-elixir/pull/348) - [@KronicDeth](https://github.com/KronicDeth) - * Regenerate `gen` folder using Grammar Kit 1.4.1 and fix some bugs ( - including [JetBrains/Grammar-Kit#126](https://github.com/JetBrains/Grammar-Kit/issues/126)) manually. -* [#349](https://github.com/KronicDeth/intellij-elixir/pull/349) - Have both `QualifiedBracketOperation` - and `UnqualifiedBracketOperation` extend `BracketOperation`, so that `BracketOperation` can be used to match both when - the qualification does not matter. - [@KronicDeth](https://github.com/KronicDeth) -* [#364](https://github.com/KronicDeth/intellij-elixir/pull/364) - [@KronicDeth](https://github.com/KronicDeth) - * Regenerate parser with GrammarKit 1.4.2 - * `ElixirSdkRelease` is now `Comparable`, so version checks can be done for tests to restrict them to Elixir 1.2+ for - multiple alias support. - * Resolve Multiple Aliases with unqualified Alias in tuples. - * `canonicalName` borrows from the idea of `PsiReference#canonicalText`: an element can have both a Name ( - from `getName`), which is the literal name in the code, which can be renamed, and a Canonical Name, which is the - name to refer to the element without need for imports or aliases. For this change, `defimpl`, `defmodule`, - and `defprotocol` will show their full module Alias for their Canonical Name. - - This change addresses the use case of Go To Declaration that should resolved to a nested `defmodule`. - -### Bug Fixes - -* [#330](https://github.com/KronicDeth/intellij-elixir/pull/330) - Check if `parameter` is `null` - before `Variable#execute` call in `Variable#execute(PsiElement[], ResolveState)`. - - [@KronicDeth](https://github.com/KronicDeth) -* [#336](https://github.com/KronicDeth/intellij-elixir/pull/336) - Fix `isVariable` and `variableUseScope` - for `var!(name)[...]` - [@KronicDeth](https://github.com/KronicDeth) -* [#337](https://github.com/KronicDeth/intellij-elixir/pull/337) - [@KronicDeth](https://github.com/KronicDeth) - * `@for` is no longer marked as unresolved in `defimpl` and instead resolve to the either the `` - in `for: ` or the module name for the enclosing module when `for: ` is not given. - * `@protocol` is no longer marked as unresolved in `defimpl` and instead resolve to the `` in `defimpl ` - . -* [#342](https://github.com/KronicDeth/intellij-elixir/pull/342) - [@KronicDeth](https://github.com/KronicDeth) - * Instead of `assert checkRight || checkLeft` in `Match#processDeclaraions`, do the normal code - if `checkRight || checkLeft` and log an error report otherwise, so that the exact code that trigger this error can - be reported and the method fixed to handle that form of `Match` later. -* [#343](https://github.com/KronicDeth/intellij-elixir/pull/343) - Be able to parse mix version from 1.3.0+ - - [@KronicDeth](https://github.com/KronicDeth) - * Check all lines of output for mix version as Elixir 1.3.0 changed the format of `mix --version`, so that it - includes the Erlang - header (`Erlang/OTP ... [erts-...] [source] [64-bit] [smp:..:..] [async-threads:..] [hipe] [kernel-poll:false] [dtrace]`) - on the first line and `Mix ` on the 3rd line. Previously the parsing expected `Mix ` to be the - first line. -* [#344](https://github.com/KronicDeth/intellij-elixir/pull/344) - [@KronicDeth](https://github.com/KronicDeth) - * If no known modular (Module, Implementation, Protocol, Quote, or Use) matches the call, then use Unknown, which - accepts any macro with a `do` block or keyword. This allows Go To Symbol to no error in projects using Dogma - as `defrule` is now treated as Unknown instead of causing an error that the enclosing modular could not be found. -* [#349](https://github.com/KronicDeth/intellij-elixir/pull/349) - `BracketOperations` are neither parameters nor - variables. - [@KronicDeth](https://github.com/KronicDeth) -* [#353](https://github.com/KronicDeth/intellij-elixir/pull/353) - Fix stacktrace linking picking wrong file with same - basename - [@KronicDeth](https://github.com/KronicDeth) - * Strip spaces from front of file path in `mix` output, which allows file looks to work correctly. - * Ensure file reference highlight doesn't include the leading and trailing characters by fix off-by-one errors. -* [#358](https://github.com/KronicDeth/intellij-elixir/pull/358) - Determine whether to check left, right, or both by - doing isAncestor checks for all operands, not just the normalized operand. The normalized operand is still used - for `PsiScopeProcessor#execute` since `#execute` is not expected to handle error elements. - - [@KronicDeth](https://github.com/KronicDeth) -* [#364](https://github.com/KronicDeth/intellij-elixir/pull/364) - [@KronicDeth](https://github.com/KronicDeth) - * Add `A.{B, C}` to grammar with quoting to check consistence with Elixir 1.2. - Ports [elixir-lang/elixir#3666](https://github.com/elixir-lang/elixir/pull/3666). - * Use `fullyQualifiedName` instead of `getName` for `resolvableName` because `fullyQualifiedName` is needed so that - qualified aliases inside of the `{ }` of a multiple alias will not have a name as `getName` is `null` for those - qualified aliases because the name from `getName` has to be a literal name that can be renamed and qualified names - can't be renamed. -* [#365](https://github.com/KronicDeth/intellij-elixir/pull/365) - The `Module` icon got the same icon as `Unknown` when - creating `Unknown` somehow, I assume due to find-replace. - [@KronicDeth](https://github.com/KronicDeth) - -## v4.0.0 - -### Enhancements - -* [#314](https://github.com/KronicDeth/intellij-elixir/pull/314) - Call references for unqualified no argument calls - that work as variables or parameters - [@KronicDeth](https://github.com/KronicDeth) - * Resolve and highlight parameter references - * Resolve call definition clause (`def(macro)?p?`) parameters to themselves - * Resolve call definition parameter with default to itself - * Add Parameter ot Color Settings Page - * Parameters in any macro with do block or keyword pair - * Resolve and highlight variable references - * Properly identifier variable declared in `for` comprehension as variable - * Add Variable to Color Settings Page - * Highlight bind quoted keyword key as Variable - * Resolve references to earlier `&&` operands, which handles code that matches a variable and only uses the variable - on success - like [`((cwd = cwd()) && write_tmp_dir(cwd))`](https://github.com/elixir-lang/elixir/blob/ccf6d14e3ec2eb96090222dad6f395b5b9ab72ac/lib/elixir/lib/system.ex#L268) - * Resolve variables from `destructure` - * Detect bitstring segment options and don't treat them as variables. - * Highlight bitstring segment type options as Type, the same highlight as used for `@type` names. - * Don't generate (unresolved) references for bitstring segment options - * Resolve `_` to only itself, no matter how many are used to reflect that it is non-binding, while `_` will - resolve to `_` as it does bind. - * Add Ignored Variable to Color Settings Page - * Reimplement module attribute renaming so that variable renaming can be implemented using a different validator for - renaming (since module attribute names include the `@`). Non-inplace renaming should also be supported, but inplace - is preferred. (There's a setting to turn off in-place renaming in JetBrains IDEs.) - * `operation.infix.Normalized` - * Normalizes leftOperand, operator, and rightOperand for an Infix operation that may have errors (in either operand) - . If there is an error in the operand then its normalized value is `null`. - * Keyword key type descriptions - * Default to `"keyword key"`. - * Detect `bind_quoted:` usage and call those `"quote bound variable"`. - * Add interfaces to unify matching of `Matched` and `Unmatched` form of operations when the code cares about the - operator - * `And` - * `UnaryNonNumericOperation` - * Add `processDeclarations` to support variable and parameter resolution using `PsiTreeUtil.treeWalkUp` - and `PsiScopeProcessors` - * `ElixirStabBody` - * StabOperations - * Treat variables and parameters as `NamedElements`, so they can be Rename Refactored. - * Move reused Module and Function names to `org.elixir_lang.psi.name.{Module,Function}` constants. - * Parameter and Variable completion -* [#318](https://github.com/KronicDeth/intellij-elixir/pull/318) - Highlight keyword keys (`key:` in `key: value`) that - aren't quotes (`"key": value` or `'key': value`) as Atom. - [@KronicDeth](https://github.com/KronicDeth) -* [#320](https://github.com/KronicDeth/intellij-elixir/pull/320) - [@KronicDeth](https://github.com/KronicDeth) - * Show annotator applied highlights in the Preferences > Editor > Colors & Fonts > Elixir. - * Errors - * `Alias` - * `Braces and Operators` - * `Bit` (`<<` and `>>`) - * `Braces` (`{` and `}`) - * `Brackets` (`[` and `]`) - * `Char Tokens` (`?`) - * `Comma` (`,`) - * `Dot` (`.`) - * `Interpolation` (`#{` and `}`) - * `Maps and Structs` - * `Maps` (`%{` and `}`) - * `Structs` (`%{` and `}` when used for struct. The Alias is still highlighted using `Alias`) - * `Operation Sign` - * `Parentheses` (`(` and `)`) - * `Semicolon` (`;`) - * `Calls` - * `Function` (currently only combined with `Predefined` to highlight `Kernel` functions. Will be used later for - all function calls once function references are implemented.) - * `Macro` (curently only combined with `Predefined` to highlight `Kernel` and `Kernel.SpecialForms` macros. Will - be used later for all macro calls once macro references are implemented.) - * `Predefined` (Combined with `Function` to highlight `Kernel` functions. Combined with `Macro` to - highlight `Kernel` and `Kernel.SpecialForms` macros.) - * `Escape Sequence` - * `Module Attributes` - * `Documentation` (Previously `Documentation Module Attributes`) - * `Text` (Previously `Documentation Text`) - * `Types` - * `Callback` (`my_callback` in `@callback my_callback() :: :ok` or `my_macro_callback` - in `@macrocallback my_macro_callback`) - * `Specification` (`my_function` in `@spec my_function() :: :ok`) - * `Type` - * `typ` and `integer` in `@type typ :: integer` - * `parameterized` in `@type parameterized(type_parameter) :: type_parameter` - * `typtyp` in `@opaque typtyp :: 1..10` - * `typ` and `typtyp` in `@callback func(typ, typtyp) :: :ok | :fail` - * `binary` and `utf8` in `<< "hello" :: binary, c :: utf8, x = 4 * 2 >> = "hello™1"` - * `Type Parameters` (`type_parameter` in `@type parameterized(type_parameter) :: type_parameter`) - * `Numbers` - * `Binary, Decimal, Hexadecimal, and Octal Digits` (Previously at top-level.) - * `Decimal Exponent, Mark and Separator` (Previously at top-level) - * `Invalid Binary, Decimal, Hexadecimal, and Octal Digits` (Previously at top-level.) - * `Non-Decimal Base Prefix` (Previously at top-level.) - * `Obsolete Non-Decimal Base Prefix` - * `Variables` - * `Ignored` - * `Parameter` - * `Variable` - * Recover in expression until close of subexpression - * `\n` - * `\r\n` - * `>>` - * `]` - * `}` - * `)` - * `;` - * `->` - * `end` - * `after` - * `catch` - * `else` - * `rescue` - * Update Preferences > Editor > Colors & Fonts > Elixir example text's bitstring syntax to Elixir post-1.0.0 ( - Use `-` to separate segment options instead of a list.) - * Use same algorithm for `ElixirStabBody` and `ElixirFile` because they are sequences of expressions. - * Highlight atom keywords (`false`, `nil`, and `true`) as merge of `Atom` and `Keyword` text attributes. If both only - use foreground color, `Keyword` wins. - * Annotate `QualifiableAlias` as `Alias`. - * Highlight keyword list and map keywords (`:`) as `Atom`. - * Add `with` to highlighted special forms -* [#322](https://github.com/KronicDeth/intellij-elixir/pull/322) - Additional Text Attributes - - [@KronicDeth](https://github.com/KronicDeth) - * Default text attributes for "Darcula" and "Default" themes: almost every Text Attribute Key has a unique hue for - the Foreground color. - * Explain how to add `additionalTextAttributes` to `plugin.xml` in `CONTRIBUTING.md` - * Group Textual Text Attribute Keys Together: Next "Textual" group is created and "Character List", "Escape - Sequence", "Sigil", and "String" are moved under the group. - * Describe relations between different text attributes in `COLOR_SCHEMA_DESIGN.xml`, so they can be applied to - different base schemes, such as applying the current Darcula additonalTextAttributes to Default. - -### Bug Fixes - -* [#314](https://github.com/KronicDeth/intellij-elixir/pull/314) - [@KronicDeth](https://github.com/KronicDeth) - * Don't generate module attribute references for control attributes: Module attributes that control compilation or are - predefined by the standard library: `@behaviour`, `@callback`, `@macrocallback`, `@doc`, `@moduledoc` - , `@typedoc`, `@spec`, `@opaque`, `@type`, and `@typep`, should not have references because their uses are - unrelated. - * Drop requirement that there are 2 children and only require there be 1 and assume that is the Operator. - * Don't count @(...) as a module attribute usage: Module attribute declarations are defined as `defmacro @(...)` in - Kernel and that `@` should count as a function name, not a prefix for a module attribute name. - * Allow `null` Module for Scratch File use scope - * Default to `"call"` for Call type - * Fix typo that had `*Two` operations using `Type` interface - * Don't process `AccessExpression` declarations -* [#316](https://github.com/KronicDeth/intellij-elixir/pull/316) - [@KronicDeth](https://github.com/KronicDeth) - * Highlight `foo` in `@spec foo` as a type, which occurs while typing a new `@spec` before `::` can be typed. - * Check if `leftOperand` is `null` even when `checkLeft` is `true` because `checkLeft` can be `true` - and `leftOperand` is `null` when the `lastParent` is the operand or operation as a whole, but there is an error in - the unnormalized `leftOperand` leading to the normalized `leftOperand` being `null`. - * Check if reference is `null` before checking if it resolves to `null` when replacing module attribute usages with - their value because `AtNonNumericOperation`s can have a `null` reference when they are non-referencing, like `@spec` - . -* [#317](https://github.com/KronicDeth/intellij-elixir/pull/317) - Leave normal highlighting for char tokens when - highlighting types - [@KronicDeth](https://github.com/KronicDeth) -* [#320](https://github.com/KronicDeth/intellij-elixir/pull/320) - [@KronicDeth](https://github.com/KronicDeth) - * Stab operation parameter Use Scope is the stab operation. - * Skip over `PsiLeafElement` when looking for variables because the `PsiLeafElement` is an error. - * In a script file where the parent of a `Match` is a `PsiFile`, the `Match` Use Scope is the rest of the file. - * Add `=` to `Operator Signs` - * Skip `NoParenthesesKeywords` when highlighting types, which occurs when the `::` has no proper right operand and the - following one-liner function clause with `do:` is parsed as the right operand. - * Skip `DUMMY_BLOCK` when looking for Variable, which prevents walking through errors. - * Use `Normalized` pattern for `Prefix`, so that the operand is `null` when only the operator matches or the operand - has errors. - * Work-around Phoenix .ex templates that contain EEX: if `<%=` from EEX is detected, don't throw error when `Modular` - can't be found. - * Fix capitalization error in example text -* [#323](https://github.com/KronicDeth/intellij-elixir/pull/323) - Build `jps-builder` using only Java 1.6 - compatible `.class`es - [@KronicDeth](https://github.com/KronicDeth) - * In IntelliJ 14.1, all of `openapi.jar` targets Java 1.6 (with `MAJOR.MINOR` `50.0`), but in IntelliJ 2016.1, some - of `openapi.jar` targets only Java 1.8 (with `MAJOR.MINOR` `52.0`), since `jps-builders` require parts - of `openapi.jar` and must target Java 1.6 even for IntelliJ 2016.1, the `52.0` `.class`es needed to be ported - into `org.elixir_lang.jps.builder`, so that the `52.0` version in `openapi.jar` wouldn't be attempted to be loaded. - - This ended up being 5 classes: - - * `ExecutionException` - * `GeneralCommandLine` - * `ParametersList` - * `ParamsGroup` - * `ProcessNotCreatedException` - - Only `GeneralCommandLine` was used directly, all others are dependencies of it. - -### Incompatible Changes - -* [#320](https://github.com/KronicDeth/intellij-elixir/pull/320) - [@KronicDeth](https://github.com/KronicDeth) - * Preferences > Editor > Colors & Fonts > Elixir restructured to group together related highlights and to match - grouping used for Colors & Fonts > Language Defaults and Colors & Fonts > Java. - * `Documentation Module Attributes` renamed to `Module Attributes` > `Documentation` - * `Documentation Text` renamed to `Module Attributes > Documentation > Text` - * `Expression Substitution Mark` renamed to `Braces and Operators > Interpolation`. - * The following are now nested under `Numbers` instead of being at the top-level: - * `Binary, Decimal, Hexadecimal, and Octal Digits` - * `Decimal Exponent, Mark and Separator` - * `Invalid Binary, Decimal, Hexadecimal, and Octal Digits` - * `Non-Decimal Base Prefix` - * `Obsolete Non-Decimal Base Prefix` -* [#322](https://github.com/KronicDeth/intellij-elixir/pull/322) - "Character List", "Escape Sequence", "Sigil", and " - String" are moved under the new "Textual" group. - [@KronicDeth](https://github.com/KronicDeth) -* [#324](https://github.com/KronicDeth/intellij-elixir/pull/324) - Group Numbers subcategories and lower display name - verbosity - [@KronicDeth](https://github.com/KronicDeth) - * "Numbers > Binary, Decimal, Hexadecimal, and Octal Digits" renamed to "Numbers > Digits > Valid" - * "Numbers > Invalid Binary, Decimal, Hexadecimal, and Octal Digits" renamed to "Numbers > Digits > Invalid" - * "Numbers > Non-Decimal Base Prefix" renamed to "Numbers > Base Prefix > Non-Decimal" - * "Numbers > Obsolete Non-Decimal Base" renamed to "Numbers > Base Prefix > Obsolete > Non-Decimal" - -## v3.0.1 - -### Bug Fixes - -* [#287](https://github.com/KronicDeth/intellij-elixir/pull/287) - Use the error reporter logger instead of - plain `assert` in `Prefix#operator`. **NOTE: This does not address error recovery recovery since I don't have a - regression test case.** - [@KronicDeth](https://github.com/KronicDeth) -* [#283](https://github.com/KronicDeth/intellij-elixir/pull/283) - All function name elements act as `PsiNameIdentifier` - s now even if they don't resolve, but that means they all need to support `FindUsagesProvider#getType`, which they - don't, so use a placeholder of "unknown call type" for any `Call` that can't be matched and "unknown element" for - anything else. - [@KronicDeth](https://github.com/KronicDeth) -* [#284](https://github.com/KronicDeth/intellij-elixir/pull/284) - Enumerate all Kernel Functions, Macros, and Special - Forms in the Syntax Highlighting section of the README, so that users searching for which category controls - highlighting a given call can find it. - [@KronicDeth](https://github.com/KronicDeth) - -## v3.0.0 - -### Enhancements - -* [#257](https://github.com/KronicDeth/intellij-elixir/pull/257) - [@KronicDeth](https://github.com/KronicDeth) - * Go To Symbol (⌥⌘O) - * Call definition clauses (`def`, `defp`, `defmacro`, and `defmacrop`) - * Callbacks (`@callback` and `@macrocallback`) - * Call definition specifications (`@spec`) - * Call definition heads (`foo(bar)`) for delegation (`defdelegate foo(bar), to: BAZ`) - * Implementations (`defimpl`) - * Protocols (`defprotocol`) - * Go To Declaration for Aliases now uses the same `isModular` checks as the stubbing for the index uses for Go To - Symbol. -* [#263](https://github.com/KronicDeth/intellij-elixir/pull/263) - Build against 14.0, 14.1, 15.0, and 2016.1 on - travis-ci to ensure continued compatibility. - [@KronicDeth](https://github.com/KronicDeth) -* [#273](https://github.com/KronicDeth/intellij-elixir/pull/273) - Error reporting for type highlighter gives the Class, - Excerpt and Full Text when an unknown element type is encountered as the Excerpt alone is not enough sometimes. - - [@KronicDeth](https://github.com/KronicDeth) -* [#275](https://github.com/KronicDeth/intellij-elixir/pull/275) - [@KronicDeth](https://github.com/KronicDeth) - * Custom error handling that will open an issue against https://github.com/KronicDeth/intellij-elixir with the - exception messsage and stacktrace filled in. - * Changed `NotImplementedExceptions` and (some) `assert`s to logging custom error message that include - the `PsiElement` text and the containing file as an attachment. The files make the URL too big for the error handler - to put the file contents in when opening the browser with the error handler, so the issue body instead explains how - to get the attachment text out of IntelliJ's "IDE Fatal Errors" -* [#276](https://github.com/KronicDeth/intellij-elixir/pull/276) - Update to Grammar Kit 1.3.0. - - [@KronicDeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#256](https://github.com/KronicDeth/intellij-elixir/pull/256) - Fix Elixir Mix Run configuration not persisting past - restart - [@zyuyou](https://github.com/zyuyou) -* [#259](https://github.com/KronicDeth/intellij-elixir/pull/259) - Allow `Infix#operator` to work on operations with - errors, which eliminates the `AssertionError` reported when typing infix operation and they are incomplete - - [@KronicDeth](https://github.com/KronicDeth) -* [#259](https://github.com/KronicDeth/intellij-elixir/pull/260) - Add Keywords to the Preferences > Editor > Colors & - Fonts > Elixir settings page, so it can be customized for just Elixir instead of having to change Preferences > - Editor > Colors & Fonts > General > Keyword - [@KronicDeth](https://github.com/KronicDeth) -* [#263](https://github.com/KronicDeth/intellij-elixir/pull/263) - Ensure compatibility from 14.0 to 2016.1 - - [@KronicDeth](https://github.com/KronicDeth) - * Use `TextAttributesKey`s that aren't deprecated in 2016.1 and work back to 14.1 - - All of `CodeInsightColors` is deprecated, so all constants from there had to be replaced. Unfortunately, the - recommended replacements don't have the same color as the original, so I used - different `DefaultLanguageHighlighterColors` constants for some. - - "Module Attribute" is now based on `DefaultLanguageHighlighterColors.CONSTANT` (which is purplish in Darcula) - instead of the recommended `METADATA`, which is yellow. Although module attributes don't have to be constant since - they can be set to accumulate, often they are used as constants and not really as metadata, since they are just - data then. All the `metadata` uses of module attributes have a separate color. - - "Specification" is now based on `DefaultLanguageHighlighterColors.FUNCTION_DECLARATION`, which maintains the - golden color that `CodeInsightColors.METHOD_DECLARATION_ATTRIBUTES` had. - - "Type" is now based on `DefaultLanguageHighlighterColors.METADATA`, which is bright yellow - unlike `CodeInsightColors.ANNOTATION_ATTRIBUTE_NAME_ATTRIBUTES`, which was a bright white. - - "Type Parameter" is now based on `DefaultLanguageHighlighterColors.PARAMETER`, which unfortunately has no - attributes associated with it, but the constant name was too good a fit not to use, so if you want the old color, - you'll need to customize it yourself. - * Restore compatibility with the IntelliJ IDEA 14.0 release line - * By using reflection to call `FileTemplateManager#getInstance` if `FileTemplateManager#getDefaultInstance` - is not available - * By calling `FileChooserDescriptorFactory#createSingleLocalFileDescriptor` (which works in 14.0 through 2016.1) - instead of `FileChooserDescriptorFactory#createSingleFileDescriptor` (which only works in 14.1 through 2016.1) -* [#264](https://github.com/KronicDeth/intellij-elixir/pull/264) - Use more human-readable error message for Elixir File - action - [@KronicDeth](https://github.com/KronicDeth) - * Instead of showing the regular expression pattern, which may be confusing to new developers, explain in English the - expected pattern. I also included the description, which explains how nesting is mapped to directories, of the - action since it doesn't actually show up in the dialog otherwise. -* [#265](https://github.com/KronicDeth/intellij-elixir/pull/265) - Check if a file exists before allowing Elixir Module - to be created. If it exists, show an error with the conflicting path. - [@KronicDeth](https://github.com/KronicDeth) -* [#272](https://github.com/KronicDeth/intellij-elixir/pull/272) - Fix (one cause) of `AssertionError` - in `GoToSymbolContributor` when the `Modular` (`defimpl`, `demodule`, `defprotocol`, and `quote`) could not be - resolved due a `def` being surrounded by a `for` comprehension, which is common in Elixir libraries as was the case - for `Postgrex`: any enclosing `for` comprehension(s) will now be ignored and the next enclosing macro will be checked - to see if it is a `Modular`. - [@KronicDeth](https://github.com/KronicDeth) -* [#273](https://github.com/KronicDeth/intellij-elixir/pull/273) - While typing, before `:` in keyword pairs, after - the `when`, such as in `@spec foo(id) :: id when id` before finishing typing `@spec foo(id) :: id when id: String.t`, - the keyword key will be properly highlighted as a Type Parameter - [@KronicDeth](https://github.com/KronicDeth) -* [#276](https://github.com/KronicDeth/intellij-elixir/pull/276) - [@KronicDeth](https://github.com/KronicDeth) - * Properly handle the `Infix#rightOperand` being `null` due to the Pratt Parser matching up through the operator and - then ignoring the mismatched right operand, which leads to the `Infix` having only 2 elements: the left operand and - the operator. - * `@doc` and other module attributes appearing as the right operand of `@type name ::` will be ignored as it is common - when adding a new type above pre-existing, documented functions. - * Only error in `Infix#leftOperand` if there are not 2-3 children for `Infix` instead of a strict 3. - -### Incompatible Changes - -* [#276](https://github.com/KronicDeth/intellij-elixir/pull/276) - Drop support for IntelliJ 14.0 because the parser - generated by Grammar Kit 1.3.0 is not compatible with the OpenAPI libraries shipped in IntelliJ 14.0. Still compatible - with 14.1 through 2016.1. - [@KronicDeth](https://github.com/KronicDeth) - -## v2.2.0 - -### Enhancement - -* [#240](https://github.com/KronicDeth/intellij-elixir/pull/240) - Code Commenter - - [qertoip](https://github.com/qertoip) -* [#243](https://github.com/KronicDeth/intellij-elixir/pull/243) - , [#248](https://github.com/KronicDeth/intellij-elixir/pull/248) - Structure View - - [KronicDeth](https://github.com/KronicDeth) - * Controls - * Scroll to Source and Scroll From Source - * Sorting - * Runtime (functions) vs Compile (macros) - * Visibility (public [`def`, `macro`, etc] vs private [`defp`, `macrop` and `@typep`]) - * Alphabetical - * Show Used - injects structure from `use Alias` call's `__using__`'s `quote` into the call site Structure - * Elements - * Callbacks (`@callback`) show their name/arity and then a nest spec - * CallDefinition groups together CallDefinitionClause of the same name/arity - * CallDefinitionClause (`def`, `defp`, `macro`, and `macrop`) shows the head of each definition under the - CallDefinition. - * CallDefinitionSpecification (`@spec`) show the type specification for a CallDefinition - * CallReference `name: arity` shows the name/arity for a `defoverridable`. - * Delegation shows all the `:append_first` and `:to` options with the implied Function Delegation nested - underneath - * Exception (`defexception`) show the implicit struct and nest any callback functions, such as `exception/1` - or `message/1`. - * Overridable `defoverridable` tracks overridable functions and is used to mark CallDefinitions are overrides. - * Quote `quote do end` models quote blocks so they can be injected `use Alias` sites. - * Use `use Alias` show `use` calls. -* [#241](https://github.com/KronicDeth/intellij-elixir/pull/241) - Live Templates - [pfitz](https://github.com/pfitz) -* [#220](https://github.com/KronicDeth/intellij-elixir/pull/220) - Added clarification to "Import Project from External - Model" that `mix.bat` should be used instead of `mix` - [f-lombardo](https://github.com/f-lombardo) -* [#244](https://github.com/KronicDeth/intellij-elixir/pull/244) - Get the Elixir version directly - from `System.build_info[:version]` instead of processing the formatted output of `elixir --version` as the build info - version is more stable - [KronicDeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#244](https://github.com/KronicDeth/intellij-elixir/pull/244) - Elixir version parsing handles both pre and build - numbers if present by using the same regular expression as Elixir itself uses for the `Version` module - - [KronicDeth](https://github.com/KronicDeth) -* [#245](https://github.com/KronicDeth/intellij-elixir/pull/245) - Better error handling in Structure View - - [KronicDeth](https://github.com/KronicDeth) - -## v2.1.0 - -### Enhancement - -* [#236](https://github.com/KronicDeth/intellij-elixir/pull/236) - `\u` in strings and char lists for unicode mapping - - [KronicDeth](https://github.com/KronicDeth) -* [#237](https://github.com/KronicDeth/intellij-elixir/pull/237) - Test against Elixir 1.1.1 and 1.2.0 - - [KronicDeth](https://github.com/KronicDeth) -* [#233](https://github.com/KronicDeth/intellij-elixir/pull/233) - More flexible `elixir --version` parsing: works - with `elixir` 1.2.0 and earlier - [bitgamma](https://github.com/bitgamma) - -### Bug Fixes - -* [#231](https://github.com/KronicDeth/intellij-elixir/pull/231) - Update IntelliJ to 14.1.6 to fix 403 errors in - Travis-CI build - [sholden](https://github.com/sholden) - -## v2.0.0 - -### Enhancements - -* [#207](https://github.com/KronicDeth/intellij-elixir/pull/207) - [KronicDeth](https://github.com/KronicDeth) - * Highlighters for - * Kernel Functions - * Kernel Macros - * Kernel.SpecialForms Macros -* [#219](https://github.com/KronicDeth/intellij-elixir/pull/219) - Test against Elixir v1.1.1 - - [KronicDeth](https://github.com/KronicDeth) -* [#221](https://github.com/KronicDeth/intellij-elixir/pull/221) - Highlight `after`, `catch`, `do`, `else`, `end`, `fn` - , and `rescue` as keywords - [KronicDeth](https://github.com/KronicDeth) -* [#223](https://github.com/KronicDeth/intellij-elixir/pull/223) - , [#227](https://github.com/KronicDeth/intellij-elixir/pull/227) - Annotate Module Attributes - - [KronicDeth](https://github.com/KronicDeth) - * Documentation module attributes (`@doc`, `@moduledoc`, and `@typedoc`) are annotated as "Documentation Module - Attributes" while all other module attributes are annotated as "Module Attributes". - * The string or heredoc argument to a documentation module attribute (`@doc`, `@moduledoc`, and `@typedoc`) is - annotated as "Documentation Text" - * Function names passed to `@callback`, `@macrocallback` or `@spec` are annotated as "Specification". - * Variables/calls in the parameters and return of `@callback`, `@macrocallback`, `@spec` are annotated as "Type" - . - * Parameters of `@opaque`, `@type`, `@typep` names are annotated as "Type Parameter" - * Keyword keys from the `when` clause of `@callback`, `@macrocallback` or `@spec` definitions and their usage are - annotated as "Type Parameters" - * `@doc false`, `@moduledoc false`, and `@typedoc false` will annotate the `false` with a weak warning: "Will make - documented invisible to the documentation extraction tools like ExDoc.". -* [#228](https://github.com/KronicDeth/intellij-elixir/pull/228) - Module attributes resolution and refactoring - - [KronicDeth](https://github.com/KronicDeth) - * Go To Definition for module attributes. - * Module attribute completion (**NOTE: works after typing first character after `@`. To see all module attributes, - type a character after `@`, then delete the character to get the full list.**) - * Module attributes that can't be resolved will have "Unresolved module attribute" error annotation (i.e. red - squiggly underline). - * Find Usages of module attributes from their declarations. - * Rename module attributes inline (editing the name in the declaration will change the name at the usage site at the - same time without a dialog). - * The module attribute value (from the declaration site) will be folded into the usage site. It can be reverted to - the literal `@module_name` text by clicking the + to unfold. - -### Bug Fixes - -* [#206](https://github.com/KronicDeth/intellij-elixir/pull/206) - Change "edition" to "addition" in README. - - [folz](https://github.com/folz) -* [#225](https://github.com/KronicDeth/intellij-elixir/pull/225) - Sped up reparsing when [ENTER] is hit in the middle - of comment by removing the custom error handling element, adjacentExpression, and going with the default error - handling provided by JetBrains' OpenAPI. - [KronicDeth](https://github.com/KronicDeth) -* [#226](https://github.com/KronicDeth/intellij-elixir/pull/226) - Fix `mix` version detection on Windows - - [KronicDeth](https://github.com/KronicDeth) - -### Incompatible Changes - -* [#225](https://github.com/KronicDeth/intellij-elixir/pull/225) - [KronicDeth](https://github.com/KronicDeth) - * Removed "Add Newline" Quick Fix as it depended on `adjacentExpression` elements, which have now been removed to - speed up error handling when comments become code. - * Removed "Add Semicolon" Quick Fix as it depended on `adjacentExpression` elements, which have now been removed to - speed up error handling when comments become code. - -## v1.2.1 - -### Enhancements - -* [#204](https://github.com/KronicDeth/intellij-elixir/pull/204) - Keywords not at the end of no parentheses calls will - be properly marked as errors. - [KronicDeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#200](https://github.com/KronicDeth/intellij-elixir/pull/200) - Fix `IllegalStateException` for file delete and - rename by giving `ElixirFile`s descriptive names for safe-refactoring displaying file usage. - - [KronicDeth](https://github.com/KronicDeth) -* [#201](https://github.com/KronicDeth/intellij-elixir/pull/201) - [KronicDeth](https://github.com/KronicDeth) - * README states explicitly that the plugin works with *both* IntelliJ Community and Ultimate. - * README states that the plugin is free. -* [#202](https://github.com/KronicDeth/intellij-elixir/pull/202) - Prevent match error when typing `~` to start a sigil - that is followed later by a `\n` by matching `EOL` in the `NAMED_SIGIL` state as a `BAD_CHARACTER` - - [KronicDeth](https://github.com/KronicDeth) -* [#204](https://github.com/KronicDeth/intellij-elixir/pull/204) - Keywords at the end of a no parentheses call that is - surrounded by parentheses will not be marked as an error when that parenthetical group appears in the middle of an - outer call. - [KronicDeth](https://github.com/KronicDeth) - -## v1.2.0 - -### Enhancements - -* [#184](https://github.com/KronicDeth/intellij-elixir/pull/184) - If (1) you have intellij-erlang installed and (2) you - have an atom in Erlang that starts with `Elixir.`, such as `'Elixir.Test'`, then intellij-elixir will annotate whether - it can resolve the name to a `defmodule` call in Elixir files. - [KronicDeth](https://github.com/KronicDeth) -* [#188](https://github.com/KronicDeth/intellij-elixir/pull/188) - Default SDK path for Linux and Windows - - [zyuyou](https://github.com/zyuyou) -* [#198](https://github.com/KronicDeth/intellij-elixir/pull/198) - [KronicDeth](https://github.com/KronicDeth) - * Go To Declaration (`Cmd+Click`, `Cmd+B`, `Navigate > Declaration`) from Alias to `defmodule` where Alias is - declared. - * Index `defmodule`s for fast Go To Declaration in [elixir-lang/elixir](https://github.com/elixir-lang/elixir) and - other large projects. - * Find Usage for Alias in `defmodule` - -### Bug Fixes - -* [#187](https://github.com/KronicDeth/intellij-elixir/pull/187) - Fix links to screenshots in README - - [zhyu](https://github.com/zhyu) - -## v1.1.0 - -### Enhancements - -* [#167](https://github.com/KronicDeth/intellij-elixir/pull/167) - [zyuyou](https://github.com/zyuyou) - * `Build` - * `Compile` an individual file - * `Make Project` to build the entire project - * `New` - * `Elixir File` has new templates - * `Empty module` - * `Elixir Application` - * `Elixir Supervisor` - * `Elixir GenServer` - * `Elixir GenEvent` - * `Project > Elixir` creates a new Elixir project with an empty `lib` directory marked as source directory. - * `Project from Existing Sources... ` - * `Create project from existing sources` sets up the project with SDK using a pre-existing directory. - * `Import project from external model > Mix` - * Fetches the the dependencies with the local version of `mix` - * Marks `lib` directory as source - * Marks `test` directory as test sources - * `Run > Elixir Mix` to setup Run Configurations to run `mix` tasks. - -## v1.0.0 - -### Enhancements - -* [#168](https://github.com/KronicDeth/intellij-elixir/pull/168) - Update ant build on travis-ci.org to use IDEA - 14.1.4 (from 14.0.2) - [KronicDeth](https://github.com/KronicDeth) -* [#174](https://github.com/KronicDeth/intellij-elixir/pull/174) - Parser is verified to quote the same as native Elixir - - [KronicDeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#154](https://github.com/KronicDeth/intellij-elixir/pull/154) - Fix parsing of unary vs binary +/- with leading and - trailing spaces and newlines - [KronicDeth](https://github.com/KronicDeth) -* [#155](https://github.com/KronicDeth/intellij-elixir/pull/155) - Allow EOL between list arguments and `]` - - [KronicDeth](https://github.com/KronicDeth) -* [#156](https://github.com/KronicDeth/intellij-elixir/pull/156) - [KronicDeth](https://github.com/KronicDeth) - * Relative identifiers after `.` that start with `and`, `or`, and `not` will be lexed as a single identifier instead - of `and`, `or`, or `not` followed by another identifier. - * `end` is allowed as a relative identifier after `.` -* [#157](https://github.com/KronicDeth/intellij-elixir/pull/157) - Fix `(...)` as part of matched expression in no - parentheses stab signature - [KronicDeth](https://github.com/KronicDeth) -* [#158](https://github.com/KronicDeth/intellij-elixir/pull/158) - Allow multiple newlines to mark the end of an - expression, but only one `;` - [KronicDeth](https://github.com/KronicDeth) -* [#159](https://github.com/KronicDeth/intellij-elixir/pull/159) - Allow operators in function - references (`/`) for function captures (`&/`) - [KronicDeth](https://github.com/KronicDeth) -* [#160](https://github.com/KronicDeth/intellij-elixir/pull/160) - `unquote_splicing` is properly wrapped in `__block__` - when in stab bodies - [KronicDeth](https://github.com/KronicDeth) -* [#163](https://github.com/KronicDeth/intellij-elixir/pull/160) - Check for matching terminator in heredocs when - determining white space type at beginning of line - [KronicDeth](https://github.com/KronicDeth) -* [#170](https://github.com/KronicDeth/intellij-elixir/pull/170) - Allow + to count as addition - - [KronicDeth](https://github.com/KronicDeth) -* [#171](https://github.com/KronicDeth/intellij-elixir/pull/171) - Unary expressions inside parentheses are no longer - marked `ambiguous_op: nil` - [KronicDeth](https://github.com/KronicDeth) -* [#173](https://github.com/KronicDeth/intellij-elixir/pull/173) - Differentiate between `Qualifier.'relative'()` - vs `Qualifier.'relative' ()` and `Qualifier."relative"()` vs `Qualifier."relative" ()` - - [KronicDeth](https://github.com/KronicDeth) -* [#176](https://github.com/KronicDeth/intellij-elixir/pull/176) - Fix link to Elixir website in README - - [shalecraig](https://github.com/shalecraig) -* [#178](https://github.com/KronicDeth/intellij-elixir/pull/178) - All tokens have human-readable names and/or expected - characters for better error messages - [KronicDeth](https://github.com/KronicDeth) - -### Incompatible Fixes - -* [#162](https://github.com/KronicDeth/intellij-elixir/pull/162) - New Elixir File has moved to the last item in the New - File menu to preserve `CTRL+N ENTER` keyboard shortcut for `New > File` - [jaketrent](https://github.com/jaketrent) - -## v0.3.5 - -### Enhancements - -* [#135](https://github.com/KronicDeth/intellij-elixir/pull/135) - `do` blocks (`do end) - - [@KronicDeth](https://github.com/KronicDeth) -* [#152](https://github.com/KronicDeth/intellij-elixir/pull/152) - Unmatched expressions (operations involving `do` - block calls and normal matched expressions) - [Kronicdeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#137](https://github.com/KronicDeth/intellij-elixir/pull/137) - Lex full atom instead of just identifier-like - operator prefix (`:index` before vs `:index` after) - [@KronicDeth](https://github.com/KronicDeth) -* [#138](https://github.com/KronicDeth/intellij-elixir/pull/138) - `!` and `not` are properly wrapped in `__block__`s - when in stab bodies - [@KronicDeth](https://github.com/KronicDeth) - -## v0.3.4 - -### Enhancements - -* [#126](https://github.com/KronicDeth/intellij-elixir/pull/126) - Bracket at expression (`@foo[key]`) - - [@KronicDeth](https://github.com/KronicDeth) -* [#127](https://github.com/KronicDeth/intellij-elixir/pull/127) - Anonymous functions (`fn end`), stab clauses (`->`), - and parentheticals (`(1 + 2)`) - [@KronicDeth](https://github.com/KronicDeth) -* [#128](https://github.com/KronicDeth/intellij-elixir/pull/128) - Maps (`%{}`) and structs (`%User{}`) - - [@KronicDeth](https://github.com/KronicDeth) -* [#129](https://github.com/KronicDeth/intellij-elixir/pull/129) - Tuples (`{}`) - - [@KronicDeth](https://github.com/KronicDeth) -* [#130](https://github.com/KronicDeth/intellij-elixir/pull/130) - Bit strings (`<<>>`) - - [@KronicDeth](https://github.com/KronicDeth) - -## v0.3.3 - -### Enhancements - -* [#122](https://github.com/KronicDeth/intellij-elixir/pull/122) - [@KronicDeth](https://github.com/KronicDeth) - * Remote function calls (`Alias.function`, `:atom.function`, etc) and local function calls (`function`) with... - * No Parentheses with... - * No Arguments (`Alias.function`) - * Keywords (`Alias.function key: value`) - * Nested No Parentheses Call (`Alias.function Inner.function positional, key: value`) - * Positional and Keyword arguments (`Alias.function positional, key: value`) - * Matched Expression (`Alias.function 1 + 2`) - * Parentheses with... - * No arguments (`Alias.function()`) - * No Parentheses Call (`Alias.function(Inner.function positional, key: value`) - * Keywords (`Alias.function(key: value)`) - * Positional and Keyword arguments (`Alias.function(positional, key: value)`) - * Trailing parentheses for quoting (`def unquote(variable)(positional)`) -* [#125](https://github.com/KronicDeth/intellij-elixir/pull/125) - Bracket expression (`foo[key]`) - - [@KronicDeth](https://github.com/KronicDeth) - -## v0.3.2 - -### Bug Fixes - -* [#121](https://github.com/KronicDeth/intellij-elixir/pull/121) - Fix `NoSuchElementException` when no suggested SDK - home paths are available. Thanks to [@zyuyou](https://github.com/zyuyou) - for [reporting](https://github.com/KronicDeth/intellij-elixir/issues/120) - - [@KronicDeth](https://github.com/KronicDeth) - -## v0.3.1 - -### Enhancements - -* [#112](https://github.com/KronicDeth/intellij-elixir/pull/112) - File > New > Project From Existing Sources can be - used in IntelliJ to setup the excludes, sources, tests, SDK and libraries for an Elixir project that has already been - created with `mix new`. - [@KronicDeth](https://github.com/KronicDeth) -* [#114](https://github.com/KronicDeth/intellij-elixir/pull/114) - Operators can be qualified function names - - [@KronicDeth](https://github.com/KronicDeth) -* [#118](https://github.com/KronicDeth/intellij-elixir/pull/114) - [@KronicDeth](https://github.com/KronicDeth) - * Anonymous function calls (`.(...)`) - * Inspection that marks errors when keywords aren't at end of list. - -## v0.3.0 - -### Enhancements - -* [#108](https://github.com/KronicDeth/intellij-elixir/pull/108) - `\x` is marked as an error in CharLists, CharList - Heredocs, Strings, and String Heredocs, but not in any sigils. - [@KronicDeth](https://github.com/KronicDeth) -* [#111](https://github.com/KronicDeth/intellij-elixir/pull/111) - New Elixir File will automatically underscore the - camel case module name when creating the file name and will convert qualifying aliases before the last `.` to - directories - [@KronicDeth](https://github.com/KronicDeth) - -### Incompatible Changes - -* [#111](https://github.com/KronicDeth/intellij-elixir/pull/111) - New Elixir File validates that the name is a valid - Alias, so each `.` separated part must start with a capital letter. Previous New Elixir File validated that the name - was a valid path, and so forced the name to be lowercase. - [@KronicDeth](https://github.com/KronicDeth) - -## v0.2.1 - -### Enhancements - -* [#105](https://github.com/KronicDeth/intellij-elixir/pull/105) - No parentheses function calls can occur as the right - operand in binary infix operations or the sole operand of unary prefix operation. - - [@KronicDeth](https://github.com/KronicDeth) -* [#74](https://github.com/KronicDeth/intellij-elixir/pull/74) - [@KronicDeth](https://github.com/KronicDeth) - * Function calls with neither parentheses nor `do` blocks that have at least 2 arguments: a positional argument and - keyword arguments or 2 or more positional argument(s) followed by optional keyword arguments. - * Inspection that marks errors for ambiguous commas - * Inspection that marks errors for ambiguous parentheses - * Quick Fix for the ambiguous parentheses to remove the space between the function name and the opening parentheses. -* [#75](https://github.com/KronicDeth/intellij-elixir/pull/75) - [@KronicDeth](https://github.com/KronicDeth) - * Inspection that marks errors for missing end-of-expressions (`;` and newlines) between expressions. - * Quick Fix to insert `;` for missing end-of-expression. - * Quick Fix to insert newline for missing end-of-expression. - -### Bug Fixes - -* [#74](https://github.com/KronicDeth/intellij-elixir/pull/74) - Right hand-side of `dot_alias` and `dot_identifier` - was translated incorrectly. Only Aliases and Identifiers are allowed now. [@KronicDeth](https://github.com/KronicDeth) - -## v0.2.0 - -### Enhancements - -* [#73](https://github.com/KronicDeth/intellij-elixir/pull/73) - [@KronicDeth](https://github.com/KronicDeth) -* New attributes for parts of numbers on Color Settings Page - * Binary, Decimal, Hexadecimal, and Octal Digits - * Decimal Exponent, Mark, and Separator - * Invalid Binary, Decimal, Hexadecimal, and Octal Digits - * 2-9, A-Z, and a-z will be parsed as invalid binary digits - * 8-9, A-Z, and a-z will be parsed as invalid octal digits - * G-Z and g-z will be parsed as invalid hexadecimal digits - * Non-Decimal Base Prefix - * Any letter other than b, o, or x, in either case, will be recognized as an invalid whole number base - * Obsolete Non-Decimal Base Prefix (`B` for binary and `X` for hexadecimal) -* Any digit, 0-9, A-Z, or a-z will be parsed as invalid for invalid whole number based numbers -* Recovery for non-decimal whole numbers if the prefix is given, but no digits are given - -### Incompatible Changes - -* [#73](https://github.com/KronicDeth/intellij-elixir/pull/73): Number attribute has been removed from Color Settings - page - [@KronicDeth](https://github.com/KronicDeth) - -## v0.1.4 - -### Enhancements - -* [#17](https://github.com/KronicDeth/intellij-elixir/pull/17): All valid escape sequences (`\` - , `\x`, `\x{}` are recognized. - [@KronicDeth](https://github.com/KronicDeth) -* [#18](https://github.com/KronicDeth/intellij-elixir/pull/18): Support for creation of Elixir modules - - [@abaire](https://github.com/abaire) ![New Elixir File](/screenshots/New%20Elixir%20File.png?raw=true "New Elixir File") -* [#21](https://github.com/KronicDeth/intellij-elixir/pull/21): - Use [pygments' elixir_example.ex](https://bitbucket.org/birkenfeld/pygments-main/src/102ed2526c384403fd0e0129b3e31832a6583ea1/tests/examplefiles/example_elixir.ex?at=default) - supplied by [@alco](https://github.com/alco) for Color Settings Page - [@KronicDeth](https://github.com/KronicDeth) -* [#25](https://github.com/KronicDeth/intellij-elixir/pull/25): `?` before any character or valid escape sequence will - be recognized as a character token. - [@KronicDeth](https://github.com/KronicDeth) -* [#35](https://github.com/KronicDeth/intellij-elixir/pull/35): `;` is recognized as EOL. `\r\n` and `\n` style EOL can - be escaped with `\` and will be treated as whitespace. - [@KronicDeth](https://github.com/KronicDeth) -* [#38](https://github.com/KronicDeth/intellij-elixir/pull/38): Operator arity, associativity, and precedence - - [@KronicDeth](https://github.com/KronicDeth) -* [#39](https://github.com/KronicDeth/intellij-elixir/pull/38): Decimal integers and floats - - [@KronicDeth](https://github.com/KronicDeth) -* [#40](https://github.com/KronicDeth/intellij-elixir/pull/40): Identifiers (variable, function, and macro names) - - [@KronicDeth](https://github.com/KronicDeth) -* [#41](https://github.com/KronicDeth/intellij-elixir/pull/41): `...` identifier - - [@KronicDeth](https://github.com/KronicDeth) -* [#42](https://github.com/KronicDeth/intellij-elixir/pull/42): Aliases (module names) - - [@KronicDeth](https://github.com/KronicDeth) -* [#45](https://github.com/KronicDeth/intellij-elixir/pull/45): Keyword identifiers - - [@KronicDeth](https://github.com/KronicDeth) -* [#49](https://github.com/KronicDeth/intellij-elixir/pull/49): Empty Parentheses - - [@KronicDeth](https://github.com/KronicDeth) -* [#52](https://github.com/KronicDeth/intellij-elixir/pull/52): In Operator - - [@KronicDeth](https://github.com/KronicDeth) -* [#54](https://github.com/KronicDeth/intellij-elixir/pull/54): Dot Operator - - [@KronicDeth](https://github.com/KronicDeth) -* [#56](https://github.com/KronicDeth/intellij-elixir/pull/56): Keyword Lists - - [@KronicDeth](https://github.com/KronicDeth) -* [#70](https://github.com/KronicDeth/intellij-elixir/pull/70): Matched Expressions - - [@KronicDeth](https://github.com/KronicDeth) -* [#72](https://github.com/KronicDeth/intellij-elixir/pull/72): Regular Keywords (`end`, `false`, `fn`, `nil`, - and `true`) - [@KronicDeth](https://github.com/KronicDeth) - -### Bug Fixes - -* [#17](https://github.com/KronicDeth/intellij-elixir/pull/17): Sigil terminator escapes are recognized, so that sigils - are no longer prematurely terminated. - [@KronicDeth](https://github.com/KronicDeth) -* [#24](https://github.com/KronicDeth/intellij-elixir/pull/24): Comments do not consume EOL, so trailing comments don't - cause error parsing expression on following line. - [@KronicDeth](https://github.com/KronicDeth) -* [#36](https://github.com/KronicDeth/intellij-elixir/pull/36): Sigil modifiers now work on groups in addition to - heredocs. - [@KronicDeth](https://github.com/KronicDeth) -* [#47](https://github.com/KronicDeth/intellij-elixir/pull/47): `;` is separate from `EOL` and either or both can - separate expressions, but only `EOL` can separate operators and operands for operations - - [@KronicDeth](https://github.com/KronicDeth) - -## v0.1.3 - -### Bug Fixes - -* [#10](https://github.com/KronicDeth/intellij-elixir/pull/10): Blank lines are properly parsed as whitespace instead of - bad characters. - [@KronicDeth](https://github.com/KronicDeth) -* [#13](https://github.com/KronicDeth/intellij-elixir/pull/13): EOL is parsed as bad character in sigil name (after `~`) - instead of causing the lexer to fail to match, which raised exceptions in Event Log. - - [@KronicDeth](https://github.com/KronicDeth) - -## v0.1.2 - -### Enhancements - -* Atoms with highlighting -* Atom with double or single quotes to allow interpolation. Double quotes are highlighted as 'String' while single - quotes are highlighted as 'Char List'. This may be changed in the future. -* Literal atoms highlighted as 'Atom'. -* Operator atoms highlighted as 'Atom'. - -## v0.1.1 - -### Bug Fixes - -* Build using JDK 6 instead of 7 so that plugin will work by default on OSX Mavericks. - -## v0.1.0 - -### Enhancements - -* [#3](https://github.com/KronicDeth/intellij-elixir/pull/3): Literal and interpolated sigils with highlighting - - [@KronicDeth](https://github.com/KronicDeth) - * CharList Sigils (`~c` and `~C`) highlighted as 'Char List' in Settings. - * Regex Sigils (`~r` and `~R`) highlighted as 'Sigil' in Settings. **NOTE: Regex syntax is not internally - highlighted yet** - * String Sigils (`~s` and `~S`) highlighted as 'String' in Settings. - * Word Sigils (`~w` and `~W`) highlighted as 'Sigil' in Settings. - * Custom Sigils highlighted as 'Sigil' in Settings. - * Modifiers are highlighted on Regex, Word, and Custom while modifiers aren't allowed on CharList and String Sigils. - -### Bug Fixes - -* Single-quoted strings are correctly referred to as 'Character List' now instead of 'String' in Settings. -* Double-quoted strings are correctly referred to as 'String' now instead of 'Interpolated String' in Settings. -* Non-Heredoc CharLists and Strings can be multiline. -* CharLists and Strings support interpolation and escape sequences. - -## v0.0.3 - -### Enhancements - -* Single quoted strings with highlighting. ('String' in Color Settings.) -* Double quoted strings with highlighting. ('Interpolated String' in Color Settings.) - * Interpolation (`#{` and `}`) with highlighting. ('Expression Substitution Mark' in Color Settings.) - * Escape sequences for `"` and `#` with highlighting. ('Escape Sequence' in Color Settings.) - -## v0.0.2 - -### Enhancements - -* Binary, Hexadecimal, and Octal numbers (including deprecated syntax) are recognized as numbers. -* Syntax Highlighting for numbers. -* Color Settings page for changing the color of comments and numbers for Elixir (Preferences > Editor > Colors & Fonts > - Elixir). - -### Bug Fixes +## v14 -* Parser no longer freezes IDE on tokens it doesn't understand. -* White space at beginning of lines no longer leads to annotation errors. -* White space and EOLs at beginning of file no longer lead to annotation errors. +The [CHANGELOG for v14](https://github.com/KronicDeth/intellij-elixir/blob/v14.0.1/CHANGELOG.md) can be found in [the v14.01 tag](https://github.com/KronicDeth/intellij-elixir/tree/v14.0.1). diff --git a/resources/META-INF/changelog.html b/resources/META-INF/changelog.html index 16ecb7886..6e50c9c3d 100644 --- a/resources/META-INF/changelog.html +++ b/resources/META-INF/changelog.html @@ -2,653 +2,76 @@

v15.0.2

    -
  • -

    Bug Fixes

    -
      -
    • -

      Replace uses of Cell.horizontalAlign(HorizontalAlign)

      -

      The API is scheduled for removal and is replaced by Call.align(AlignX.FILL).

      -
    • -
    • Ignore group: for docs.
    • -
    • Don't resolve built-in types against the index if index is updating.
    • -
    • findModuleForPsiElement in mostSpecificSdk in read action.
    • -
    • Skip finding mix.exs for OTP apps if it can't be read.
    • -
    • Include mix new stderr in IOException for better triage.
    • -
    • Highlight binary numbers as usual in types.
    • -
    • Highlight module attributes as usual in types.
    • -
    • Use org.apache.commons.lang.SystemUtils instead of org.codehaus.plexus.interpolation.os.Os to detect if on Windows for Test marker file URL.
    • -
    -
  • +
  • +

    Bug Fixes

    +
      +
    • +

      Replace uses of Cell.horizontalAlign(HorizontalAlign)

      +

      The API is scheduled for removal and is replaced by Call.align(AlignX.FILL).

      +
    • +
    • Ignore group: for docs.
    • +
    • Don't resolve built-in types against the index if index is updating.
    • +
    • findModuleForPsiElement in mostSpecificSdk in read action.
    • +
    • Skip finding mix.exs for OTP apps if it can't be read.
    • +
    • Include mix new stderr in IOException for better triage.
    • +
    • Highlight binary numbers as usual in types.
    • +
    • Highlight module attributes as usual in types.
    • +
    • Use org.apache.commons.lang.SystemUtils instead of org.codehaus.plexus.interpolation.os.Os + to detect if on Windows for Test marker file URL. +
    • +
    +

v15.0.1

    -
  • -

    Bug Fixes

    -
      -
    • -

      Support 2023.1 RubyMine and WebStorm.

      -

      - RubyMine and WebStorm have a FIX version of 174, which is less than IntelliJ's - 175 in IntelliJ 2023.1's builder number, 231.8109.175. -

      -
    • -
    • Don't resolve built-in types against the index if index is updating.
    • -
    -
  • +
  • +

    Bug Fixes

    +
      +
    • +

      Support 2023.1 RubyMine and WebStorm.

      +

      + RubyMine and WebStorm have a FIX version of 174, which is less than + IntelliJ's + 175 in IntelliJ 2023.1's builder number, 231.8109.175. +

      +
    • +
    • Don't resolve built-in types against the index if index is updating.
    • +
    +

v15.0.0

    -
  • -

    Incompatible Changes

    -
      -
    • Drop support for <= 2022 IDEs.
    • -
    -
  • -
  • -

    Enhancements

    -
      -
    • Support 2023.1 IDEs.
    • -
    -
  • -
  • -

    Bug Fixes

    -
      -
    • -

      Ignore from preload list that doesn't have square brackets.

      -

      - When trying to resolve keyword keys to from, don't error on unknown keys if any previous key was - preload as this may be a list of preloads that is missing the square brackets. -

      -
    • -
    • Re-enable canary releases.
    • -
    • Remove duplicate dependency on com.intellij.modules.java plugin.
    • -
    -
  • -
-

v14.0.1

-
    -
  • -

    Bug Fixes

    -
      -
    • Ignore atoms at top-level when looking for docs.
    • -
    • - Replace TODO() in leex.reference.resolver.Assign with logger errors that include - PSiElement. -
    • -
    • Ignore type for docs.
    • -
    • - Don't look for variable use scope above EEx tags.
      - If a variable is declared in an EEx tag then it is actually missing its declaration and cannot be resolved, so ignore its usage. -
    • -
    • Check if module is disposed when write action is run for syncLibraries.
    • -
    • Only use Elixir SDK for mix format if it has an Erlang SDK.
    • -
    • Include more lines of context for stacktraces in error reports.
    • -
    • Ignore identifier when @*doc attribute isn't quoted.
    • -
    • Ignore if package virtual file is disposed before the deps can be read.
    • -
    • Don't decompile Erlang And as Elixir and.
    • -
    • Ignore request_body and responses for docs.
    • -
    • Check if heredoc has lines before calculating host text range for Markdown docs.
    • -
    • Ignore if stubs ids can't be found when resolving Callables.
    • -
    • Ignore hexadecimal numbers at the root of the file when collecting doc comment.
    • -
    • Return an empty array of primaryArguments instead of array with null operand for unary operation without operand.
    • -
    • -

      Set sinceBuild to IntelliJ IDEA 2022.3.

      -

      Fixes incorrect compatibility listed with < 2022.3 when < 2022.3 support was removed in 14.0.0 with #2946.

      -
    • -
    • -

      Use minByOrNull to protect from empty module list.

      -

      - This fix may not work as the line number reported in the errors is actually outside of the file. This is only - a guess that minBy was what was throwing the NoSuchElement exception. -

      -
    • -
    • -

      Ignore null operands for not in primaryArguments().

      -

      - Instead of including both left and right operand always and so having null operand in fixed size array return - array with only non-null operands. -

      -
    • -
    • -

      Don't allow Elixir SDK without Erlang SDK to be selected for New Project.

      -

      The SDK has to be able to work for mix new.

      -
    • -
    • Ignore strings, charlists, and sigils at the top of file when looking for doc comments.
    • -
    • Ignore top-level Aliases when collecting docs.
    • -
    • Ignored unquote calls when injecting docs.
    • -
    • - Find enclosing quote when defs are inside an fn as in - Phoenix Route Helpers. -
    • -
    • - Handle binary modules when processing protocols and implementations for line markers and definition search. -
    • -
    • - Skip unqualified no arguments calls when Ecto.Query.from arguments are being typed. -
    • -
    • -

      Setting name on a call definition clause sets the name on the head instead.

      -

      - The JetBrains API both renames the usage references AND the original element where the rename refactoring was - started, but when started on a call definition clause the functionNameElement is the - def, defp, defmacro, or defmacrop and so both the name of - the call was changed, but the def* was also changed to the new name. Now, if - setName is called on a definition, the head is renamed instead. -

      -
    • -
    • Filter out Elixir SDKs that don't have an Erlang SDK when importing projects.
    • -
    • -

      Check Elixir SDK has Erlang SDK before running dialyzer.

      -

      Notify user of configuration error instead of throwing exception when constructing mix commandline.

      -
    • -
    • Log heredoc where Markdown cannot be injected.
    • -
    • Don't inject markdown in empty heredoc docs.
    • -
    • Log if new name element type does not match old name element type.
    • -
    • Replace name with relative identifier instead of identifier for qualified calls on rename.
    • -
    • -

      Keep looking for variants above if and unless.

      -

      - if and unless used to call keepProcessing() after checking if the child - calls when resolving or searching for variants, but Variants returned false always from - keepProcessing(). -

      -

      - This stops the variant search from terminating inside of an if or unless when it - wouldn't outside of one as was reported in - #2751. -

      -
    • -
    • -

      List Kernel and Kernel.SpecialForms variants inside modulars.

      -

      Keep processing at end of modulars when looking for variants, which will check the implicit imports of Kernel and Kernel.SpecialForms.

      -
    • -
    • Prevent listing variants from outer module in nested module.
    • -
    • Log the accumulated and target usage type that cannot be folded.
    • -
    • Fix reporting mix new errors as notifications -
        -
      • Don't associate mix new errors with new project as it doesn't have a frame, so the notification was suppressed before.
      • -
      • Strip color codes from mix new error notification.
      • -
      -
    • -
    • Validate --app is set correctly for new projects -
        -
      • If inferred from project name, make sure the name is valid application name the same as mix new does.
      • -
      • If --app is set explicitly, make sure it follows naming rules for mix new.
      • -
      -
    • -
    -
  • -
-

v14.0.0

-
    -
  • -

    Incompatible Changes

    -
      -
    • Drop support for IDES < 2022.3.
    • -
    -
  • -
  • - /

    Enhancments

    -
      -
    • Add 2022.3 compatibility.
    • -
    -
-
  • -

    Bug Fixes

    -
      -
    • Don't update hex or fetch dependencies if SDK not selected when creating project.
    • -
    -
  • - -

    v13.2.1

    -
      -
    • -

      Bug Fixes

      -
        -
      • Ignore PsiErrorElement when collecting doc comments.
      • -
      • Fix README typos.
      • -
      • Log before and after setting mirror for decompiled files.
        - Parsing complex decompiles can freeze the IDE. Logging before parsing the decompiles will give a chance of finding the file and recovering the decompiled code to find the error or complexity that needs to be suppressed.
      • -
      • Use `Options.truncateDecompiledBodyz on Elixir decompiled bodies too.
        - Previously, this was only used for Erlang functions. Fixes parsing decompiled code causing freezes for some files.
      • -
      • Ignore authors: ... for documentation when injecting Markdown.
      • -
      • Stop prependQualifiers when reaching a qualified bracket operation (Alias.function[key]).
      • -
      • Skip -1 and other unary operations when resolving types.
      • -
      • Ignore maps at the root of files when collecting doc comments.
      • -
      • Return emptySequence from childExpressions when PsiElement has no firstChild or lastChild.
      • -
      • Don't descend inside struct literal when resolving types.
      • -
      • Ignore injecting Markdown in calls that read the text from a file, such as in @moduledoc File.read!(Path.join([__DIR__, "..", "README.md"]))
      • -
      • Ignore undocument script code at root of files. -
          -
        • Alias used in qualified call.
        • -
        • Integers
        • -
        • Floats
        • -
        • Tuples
        • -
        -
      • -
      • Stop ancestorTypeSpec on QualifiedMultipleAliases.
      • -
      • Ignore pipelines for injecting Markdown in doc comments.
      • -
      • Ignore useless warn_missing in edeliver's distillery dep.
      • -
      • Stop accumulating qualifiers when bracket operation is hit either as qualifier or argument.
      • -
      -
    • -
    -

    v13.2.0

    -
      -
    • -

      Enhancements

      -
        -
      • Rendered Markdown toggle for @moduledoc, @typedoc, and @doc -
          -
        • Inject markdown in @doc deprecated: ...
        • -
        • Inject Markdown into doc lines and heredocs
        • -
        • Ignore false for documentation module attributes
        • -
        • Ignore @doc metadata that can't include Markdown -
            -
          • guard: ...
          • -
          • since: ...
          • -
          -
        • -
        • Ignore @callback(unquote(spec)) when trying to find typespecs
        • -
        • Interleave Markdown and Elixir for doctests -
            -
          • Mark code blocks as Elixir language in Markdown documentation
          • -
          • Mark multi-line exceptions in doctests as Markdown
          • -
          • Treat DBG prefix doctest lines as Markdown instead of Elixir
          • -
          • Resolve owner of docs as following call definition clause.
          • -
          • Count ...> as Markdown since it's not Elixir syntax
          • -
          • Count ** (... as Markdown since it's not Elixir syntax for exception in iex prompts
          • -
          • Count iex> as Markdown since it's not Elixir syntax
          • -
          -
        • -
        • Documentation links in rendered documentation -
            -
          • Modulars MODULE
          • -
          • Callbacks -
              -
            • Relative (c:NAME/ARITY)
            • -
            • Absolute (c:MODULE.NAME/ARITY)
            • -
            -
          • -
          • Types -
              -
            • Relative (t:NAME/ARITY)
            • -
            • Absolute (t:MODULE.NAME/ARITY)
            • -
            -
          • -
          • Functions and Macros -
              -
            • Relative (NAME/ARITY)
            • -
            • Absolute (MODULE.NAME/ARITY)
            • -
            -
          • -
          -
        • -
        -
      • -
      • Quick Documentation for more elements -
          -
        • Callbacks (@doc above @callback and @macrocallback)
        • -
        • Types (@typedoc above @type, @typep, and @opaque)
        • -
        -
      • -
      • Compatibility with IntelliJ 2022.2.
      • -
      • Updated Elixir version used in tests.
      • -
      • Updated Gradle dependencies.
      • -
      -
    • -
    • -

      Bug Fixes

      -
        -
      • Add compiled CallDefinitionImpl delegation targets to resolve results
      • -
      • Log non-Call modulars for resolving delegation
      • -
      • Fix operator token set for **
      • -
      -
    • -
    -

    v13.1.1

    -
      -
    • -

      Bug Fixes

      -
        -
      • Fix Project Initialization Failed from New > Project > Elixir -
          -
        • Catch and log IOExceptions swallowed by Project Initialization Failed.
        • -
        • Recursively delete project directory before running mix new.
          - Previously, the directory was only deleted if empty, but whether the .idea directory is written when setupProject is called differs between IDE versions, so to be safe, recursively delete.
        • -
        -
      • -
      • Fix Go To Definition for function in compiled modules.
        - When switching over to delayed decompilation, ModuleImpl did not have processDeclaration overloadded, so the PsiScopeProcessor was never called on it and so the CallDefinitionClause scope processor did not check the ModuleImpl#callDefinitons.
      • -
      • Implement Deprecated metadata handling for docs from BEAM files.
      • -
      • Don't assume Elixir SDK sdkAdditionalData is non-null.
      • -
      • Don't restrict Run Configurations to Run in Modules to Elixir modules.
        - The docs for ModuleType say the concept is meant to be deprecated, so don't enforce it and trying to load ElixirModuleType in RubyMine breaks as it tries to load ElixirModuleBuilder and therefore JavaModuleBuilder, which only works in IntelliJ.
      • -
      • Add the facet in a write action in addition to setting the SDK.
      • -
      • Increase SUSPECT_NAME_SET_SIZE to 20.
        - Increased to cover the 15 impls of String.Chars in the geo hex package.
      • -
      • Log if erl binary is not found when trying to run mix format.
        - Log instead of letting it throw up the stack and cause an error report since the SDK not being set will be very common.
      • -
      -
    • -
    -

    v13.1.0

    -
      -
    • -

      Enhancements

      -
        -
      • Improved error reporting -
          -
        • Include 5 lines of context around error elements
        • -
        • Use originalFile when calculating path, so that .beam file path is used for decompiled files that don't have a VirtualFile.
        • -
        • Compact line references -
            -
          • Only including ending line if it is different than starting line.
          • -
          • Add ending line as a range after starting line instead of a completely separate path and line.
          • -
          -
        • -
        • Put stacktrace in <details> with <summary>
        • -
        -
      • -
      • Update dependencies -
          -
        • gradle to 7.4.2
        • -
        • gradle-intellij-plugin to 1.6.0
        • -
        • Set -Xjvm-default=all for Kotlin to allow @JvmDefault interfaces -
            -
          • Needed for LanguageNewProjectWizard subclasses and associated implementations
          • -
          -
        • -
        -
      • -
      • New Project > Language > Elixir includes all mix options -
          -
        • --app
        • -
        • --module
        • -
        • --sup
        • -
        • --umbrella
        • -
        -
      • -
      • Add mix format external formatter.
        - Requires project or module SDK be set in order to run. If the SDK is not available, only the internal formatter will be used. The internal formatter is still used for file subsection formatting and new line indenting as mix format works at the file-level. -
          -
        • -

          Allow mix format external formatter to be disabled.

          -
            -
          1. Preferences
          2. -
          3. Editor > Code Style > Elixir
          4. -
          5. Click the mix format tab
          6. -
          7. Expand the General group
          8. -
          9. Uncheck "Format files with mix format".
          10. -
          -
        • -
        -
      • -
      • Support Elixir 1.13.0 in debugger.
      • -
      -
    • -
    • -

      Bug Fixes

      -
        -
      • Protect from null containingFile when fetching docs.
      • -
      • Show notification if $HOME_PATH/lib does not exist.
        - Instead of logging an error show a notification since it can and does happen and is not a bug to be fixed in the plugin, but a configuration change the user needs to do.
      • -
      • Ignore tuples as type restrictions that occur during typing
      • -
      • Catch AlreadyDisposedException when trying to find module for PsiElement in mostSpecificSdk. -
          -
        • Check if the projectis disposed before using it to get module for PsiElement`.
        • -
        -
      • -
      • Ignore () as a type parameter as it occurs during typing.
      • -
      • Default the variable color if the specific type foreground is null
      • -
      • Log unknown element for fetching docs from BEAM file
      • -
      • Look above CallDefinitionImpl for Type scope processing
        - It should go up to the ModuleImpl to find the TypeDefinitionImpl.
      • -
      • Have Credo Global Inspection use standard Mix.commandLine used for Run Configurations. -
          -
        • Allow environment variables to be set similar to Run Configurations for projects that require environment variables to be set for Mix tasks due to checks in their config.
        • -
        • No longer support Include Explanations as it takes too long to run.
        • -
        • Remove annotator until it can be re-implemented in performant manner using corrected environment and SDK from Global Inspection.
        • -
        -
      • -
      • Look above <variable>.<tuple> for ancestorTypeSpec. -
          -
        • Look above <tuple> after <variable>. for ancestorTypeSpec.
        • -
        -
      • -
      • Fix Find Usages that resolve to compiled types. -
          -
        • Add element description for TypeDefinitionImpl -
            -
          • Node Text is @<module_attribte> <name>(<parameters>) :: ...
          • -
          • Long Name and Short Name are just the name
          • -
          • Type is type
          • -
          -
        • -
        • Mirror TypeDefinitionImpls to types in decompiled source.
          - Allow TypeDefinitionImpl.getNavigation to go to decompiled types.
        • -
        -
      • -
      • Allow types with atom keyword names to be highlight even though they are invalid names.
      • -
      • Catch RuntimeException if rootProvider is already disposed.
        - Catching AssertionError used to be enough in Remove unused variables in Elixir debugger server #1359, but not anymore as of com.intellij.openapi.util.TraceableDisposable$DisposalException: Already disposed #2623.
      • -
      • Ignore invalid format that occur while user is typing when highlighting types -
          -
        • @type name :: String.()
        • -
        • @type String.()
        • -
        • @type S
        • -
        -
      • -
      • Restore Project configuration for Small IDEs.
        - I dropped an ! when converting from equals to == when fixing the deprecation warnings, which made the Project SDK selection only be HIDDEN where it needed to be SHOWN.
      • -
      • Catch StackOverflowError in find_usages.Provider.getType().
      • -
      • Element descriptions for CallDefinitionImpl
      • -
      • Highlight CallDefinitionImpl references as predefined if resolved CallDefinitionImpl is in Kernel or Kernel.SpecialForms.
        - Fixes highlighting def and other defined when using SDKs without source like Homebrew after the delayed-decompilation fixes from 12.2.1. Now source-less (Homebrew) and SDKs with sources (ASDF) will both be able to highlight predefineds.
      • -
      • No longer record the SDK name as an attribute of the Facet configuration, as it didn't write back changes. -
          -
        • Instead detect the Elixir SDK by finding any of the libraries that have an Elixir SDK name in the module. (The Elixir SDK was already being added as a library to allow indexing the SDK.)
        • -
        -
      • -
      • Clear out any existing Elixir SDKs listed as module libraries before setting a new SDK.
        - This eliminates the duplicates that happened before. (It turns out the JetBrains API doesn't prevent duplicates. Oopsie.) It also ensures that no SDK is recorded if the SDK is deselected in the UI, which wouldn't happen before.
      • -
      • Handle disposed Sdk.rootProvider by reloading the Sdk when loading ebinDirectories
      • -
      • In IntelliJ 2022, the New Project dialog changed and it no longer automatically listed ModuleType.getBuilder ModuleBuilders as potential project builders, so it looked like Elixir New Project support disappeared. Fix this by implementing the newProjectWizard.language extension that was added to control the Language switching in the new New Project dialog.
      • -
      • Remove references to ElementClassHint in BeamFileImpl that only work in IntelliJ.
        - ElementClassHint is part of the processDeclaration system used in Java and so was in the code because BeamFileImpl was original based on ClassFileImpl, but since the Elixir resolvers don't use the hint system at all, it can just be removed.
      • -
      • Remove CodeStyleSettingsProvider because it is redundant with LanguageCodeStyleSettingsProvider
      • -
      • Restrict UsageTargetProvider to ElixirFiles
        - Without this restriction, it tries to run when developing the plugin itself and breaks Kotlin syntax highlighting.
      • -
      • Fix environment not being passed to debug runs of ESpec and ExUnit Run Configurations.
        - The env from the Configuration was dropped because a local env was created to set MIX_ENV true.
      • -
      -
    • -
    -

    v13.0.0

    -
      -
    • -

      Incompatible Changes

      -
        -
      • Drop support for IDEs before 2022.1.
      • -
      -
    • -
    • -

      Enhancements

      -
        -
      • Support 2022.1 IDEs -
          -
        • Update IntelliJ Plugin Gradle to 1.5.3.
        • -
        • Set untilBuild explicitly
        • -
        • Target JVM Version 11
        • -
        -
      • -
      • Expand untilBuild to cover PATCH releases of 2022.1.
      • -
      -
    • -
    • -

      Bug Fixes

      -
        -
      • Fix (some) plugin verifier warnings -
          -
        • Fix (some) deprecation warnings.
        • -
        • Use fewer Internal APIs.
        • -
        -
      • -
      • Don't use ElixirModuleType to check if it is available.
        - It will not load in IDEs that lack JavaModuleBuilder, which is why I was hard coding the ran previously.
      • -
      • Don't use XmlSerializer as equivalent of DefaultJDOMExternalizer
        - The DefaultJDOMExternalizer method calls weren't writing anything and the explicit attribute value accesses were, so it is more correct to just remove the original deprecated calls.
      • -
      -
    • -
    -

    v12.2.1

    -
      -
    • -

      Bug Fixes

      -
        -
      • -

        Don't call .navigationElement to prevent unnecessary decompilation when resolving references or showing completions.

        -
          -
        • Don't call navigationElement in ChooseByNameContributor
        • -
        • Don't decompile Protocols to get their specific t type
        • -
        • Don't call .navigationElement when resolving built-in types in :erlang
        • -
        • Don't use navigationElement in CallDefinitionClause.implicitImports for Kernel and KernelSpecial.Forms.
        • -
        • Don't call .navigationElement in reference.resolver.Module.multiResolveProject
          - Prevents decompiling modules when doing completion.
        • -
        -

        Handle PsiCompiledElement in places that previously only handled source and decompiled Calls

        -
          -
        • getElementDescription for ModuleImpl
        • -
        • Complete call definition under binary modules
        • -
        • Don't look for variables in compiled elements
        • -
        • Don't assume elements have a non-null node
          - Decompiled elements don't
        • -
        • Index TypeDefinitions in .beam files
          - Only supported built-in types faked in :erlang for now
        • -
        • Walk ModuleImpl for scope.Type
        • -
        -
      • -
      -
    • -
    -

    v12.2.0

    -
      -
    • -

      Enhancements

      -
        -
      • Test against support IDEA versions in CI to prevent another Find Usage regression -
          -
        • 2021.2.3 FindUsageTests differ from manual testings, so don't test 2021.2.3
        • -
        • Make FindUsagesTest UsageViewTreeText work for both 2021.1.3 and other versions
        • -
        • Add kernel.ex to all Find Usage Tests to ensure it doesn't work because it can't resolve primary element
        • -
        -
      • -
      • Add find usages for def test
      • -
      -
    • -
    • -

      Bug Fixes

      -
        -
      • Work-around Find Usage bug due to temporary change in JetBrains API only in versions that have that change. -
          -
        • Restore old find_usages.handler.Call
        • -
        • - Determine whether to resolve FindUsageHandler primary element based on application build number
          - Assume that are 213.* builds have the already resolved call. This excludes 2021.3, but not 2021.3.1, which - includes the fix to restore the 2021.1.3 behaviour. -
        • -
        -
      • -
      • Fix HTML errors in description.html.
      • -
      • Add card one-liner.
      • -
      -
    • -
    -

    v12.1.0

    -
      -
    • -

      Enhancements

      -
        -
      • Add MacPorts SDK locations to README.
      • -
      • Update build to elixir 1.13.0
      • -
      • Add support for ** operator to lexer and parser
        - Port Add power operator -
      • -
      • Color settings for each sigil name. Both the interpolating (lower case) and literal (upper case) name use the same settings.
      • -
      • Add support for stepped ranges
        - Port elixir-lang/elixir#10810 -
          -
        • Regression test for #2200 -
        • -
        -
      • -
      • Update CI -
          -
        • Update to Elixir 1.12.3
        • -
        • Update to Erlang 24.1.6
        • -
        -
      • -
      • Use getUsageViewTreeTextRepresentation to check find usages.
      • -
      • Regression test for #2374.
      • -
      • Regression test for#2386
        - Issue #2386 had the same root cause (OtpExternalFun not being decompiled correctly) as Issue #2410, so Issue #2386 - was fixed by Pull Request #2441, but since @alexxero was nice enough to upload the .beam file for Issue #2386, I might as well add it as a regression test too.
      • -
      • Regression test for #2446
      • -
      -
    • -
    • -

      Bug Fixes

      -
        -
      • -

        Restore tests that weren't being run after 2021.3 upgrade.
        - Upgrading to 2021.3 dropped the number of run tests from 3741 to 1452. This was due to a change in the packaging in 2021.3 that triggered a gradle bug.

        -
          -
        • Fix test broken by missing markdown in plugins list
          - Like the need for the java plugin to handle the com.intellij.modules.java dependsin plugin.xml, the org.intellij.plugins.markdown depends needed markdown added to the list to make some of the tests work. The failed tests weren't being run before after the 2021.3 upgrade.
        • -
        • Manually include tests instead of scanning.
          - Work-around gradle/gradle#18486 as described in this JetBrains Platform Slack #intellij-platform channel thread that affects running tests with ideaVersion 2021.3. -
            -
          • Rename ParsingTestCases with improper capitalization
          • -
          -
        • -
        -
      • -
      • Decompile {:|, ..., ...} as cons operator in Elixir Dbgi.
      • -
      • Fix missing guards when decompiling Elixr DbgI clauses using special decompiler
        - Guards where missing because only decompiler.appendSignature was used.
      • -
      • Fix module.Reference.calculateDefaultRangeInElement
        - element.textOffset instead of element.textLength was used for end of range.
      • -
      • Restore colors for char lists and strings lost with the PSI changes in e71b247.
      • -
      • Render OtpErlangExternalFun correctly as remote captures (&Mod.fun/arity).
        - Fixes decompiling Ecto.Changeset.validate_number.
      • -
      • Protect ExUnit configuration Producer from ElixirFile without VirtualFile.
      • -
      • Unquote.treeWalkUp no longer assumes that the final argument to unquote is a Call.
      • -
      • Fix Find Usages for call definitions -
          -
        • Don't resolve primary Find Usages element.
          - The primary element passed to FindUsageHandler is now already resolved, so resolving it again for call definitions finds usages of def, defmacro, etc.
        • -
        • Since the element passed to FindUsagesProvider#canFindUsageFor, definers can no longer be excluded, so remove that check.
        • -
        -
      • -
      • Don't highlight Quote or Sigil as normal text if part of documentation.
        - Since the annotators will run in arbitrary order, the Textual annotator has to avoid annotating the same nodes as the ModuleAttribute annotator or the colors can get interleaved.
      • -
      • Put ENTRANCE and Initial Visited Element in __module__.Resolver.
      • -
      • Keep searching when resolving type parameters if bitstring is encountered.
      • -
      • Fix UnaliasedName.unaliasedName for atoms.
      • -
      • Restore ElixirAtom#getName
        - Lost when parser was regenerated when Elixir <= 1.6 support was dropped in 679a968.
      • -
      -
    • -
    -

    v12.0.1

    -
      -
    • -

      Bug Fixes

      -
        -
      • Override Override org.elixir_lang.*.configuration.Factory.getId to fix deprecation warning about the default implementation being accidentally localizable when it shouldn't be. The Elixir plugin didn't localize these name using message bundles, so this wasn't an actual risk, but overriding is the only way to silence the error.
      • -
      • Stop look for qualifier at curly braces for %{Alias}
      • -
      -
    • +
    • +

      Incompatible Changes

      +
        +
      • Drop support for <= 2022 IDEs.
      • +
      +
    • +
    • +

      Enhancements

      +
        +
      • Support 2023.1 IDEs.
      • +
      +
    • +
    • +

      Bug Fixes

      +
        +
      • +

        Ignore from preload list that doesn't have square brackets.

        +

        + When trying to resolve keyword keys to from, don't error on unknown keys if any + previous key was + preload as this may be a list of preloads that is missing the square brackets. +

        +
      • +
      • Re-enable canary releases.
      • +
      • Remove duplicate dependency on com.intellij.modules.java plugin.
      • +
      +
    +

    v14

    +The +CHANGELOG + for v14. From fc6a400148e5310ba4b1e3a08b470d8574bda86e Mon Sep 17 00:00:00 2001 From: Elle Imhoff Date: Fri, 9 Jun 2023 12:06:23 -0500 Subject: [PATCH 3/3] Add #3260 to changelogs --- CHANGELOG.md | 2 ++ resources/META-INF/changelog.html | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9f9f62ba..dad596ae3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,8 @@ * Highlight module attributes as usual in types. * [#3254](https://github.com/KronicDeth/intellij-elixir/pull/3254) - [@KronicDeth](https://github.com/KronicDeth) * Use `org.apache.commons.lang.SystemUtils` instead of `org.codehaus.plexus.interpolation.os.Os` to detect if on Windows for Test marker file URL. +* [#3260](https://github.com/KronicDeth/intellij-elixir/pull/3260) - [@KronicDeth](https://github.com/KronicDeth) + * Call `FileIndex.getContentRootForFile` in `ReadAction` when getting working directory for `mix format`. ## v15.0.1 diff --git a/resources/META-INF/changelog.html b/resources/META-INF/changelog.html index 6e50c9c3d..23f598e10 100644 --- a/resources/META-INF/changelog.html +++ b/resources/META-INF/changelog.html @@ -19,6 +19,9 @@

    v15.0.2

  • Use org.apache.commons.lang.SystemUtils instead of org.codehaus.plexus.interpolation.os.Os to detect if on Windows for Test marker file URL.
  • +
  • Call FileIndex.getContentRootForFile in ReadAction when getting working + directory for mix format. +