Skip to content

Releases: KronicDeth/intellij-elixir

v13.0.0

05 May 18:18
f8d1423
Compare
Choose a tag to compare

Changelog

v13.0.0

Incompatible Changes

Enhancements

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

Bug Fixes

  • #2594 - @KronicDeth
    • Fix (some) plugin verifier warnings
      • Fix (some) deprecation warnings.
      • Use fewer Internal APIs.
  • #2633 - @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

18 Apr 02:50
59aada8
Compare
Choose a tag to compare

Changelog

v12.2.1

Bug Fixes

  • #2579 - @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 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

14 Jan 03:43
416d348
Compare
Choose a tag to compare

Changelog

v12.2.0

Enhancements

  • #2461 - @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 - @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 - @KronicDeth
    • Fix HTML errors in description.html.
    • Add card one-liner.

v12.1.0

07 Jan 19:15
7230e04
Compare
Choose a tag to compare

Changelog

v12.1.0

Enhancements

Bug Fixes

  • #2397 - @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.

  • #2404 - @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 - @KronicDeth
    • Restore colors for char lists and strings lost with the PSI changes in e71b247.
  • #2441 - @KronicDeth
    • Render OtpErlangExternalFun correctly as remote captures (&Mod.fun/arity).
      Fixes decompiling Ecto.Changeset.validate_number.
  • #2445 - @KronicDeth
    • Protect ExUnit configuration Producer from ElixirFile without VirtualFile.
  • #2447 - @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 - @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 - @KronicDeth
    • Put ENTRANCE and Initial Visited Element in __module__.Resolver.
  • #2452 - @KronicDeth
    • Keep searching when resolving type parameters if bitstring is encountered.
  • #2453 - @KronicDeth

README Changes

Features

SDK

Package Manager Install Locations

Package Manager SDK Type Directory
MacPorts Elixir SDK /opt/local/lib/elixir
Erlang SDK /opt/local/lib/erlang
Erlang for Elixir SDK

v12.0.1

07 Dec 04:27
4166e08
Compare
Choose a tag to compare

Changelog

v12.0.1

Bug Fixes

  • #2345 - @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 - @KronicDeth
    • Stop look for qualifier at curly braces for %{Alias}.

v12.0.0

05 Dec 22:58
591d4a7
Compare
Choose a tag to compare

Changelog

v12.0.0

Breaking Changes

  • #2179 - @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 - @KronicDeth

Enhancements

  • #2179 - @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 tests.
      • 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 - imports, 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 - @KronicDeth
    • Regression test for #2198.
  • #2201 - @KronicDeth
    • Use callbacks as completions for calls.
  • #2223 - @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 - @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 - @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 - @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

Read more

v11.13.0

31 Jul 02:17
2e3648a
Compare
Choose a tag to compare

Changelog

v11.13.0

Bug Fixes

Enhancements

  • #2035 - @theqp
    • Update build to IntelliJ IDEA 2021.2.
    • Upgrade to Gradle 7.1.1.
  • #2036 - @KronicDeth
    • Expand compatibility range to 2021.1.2-2021.2.

v11.12.0

01 Jul 23:32
Compare
Choose a tag to compare

Thanks

Changelog

v11.12.0

Bug Fixes

  • #1988 - @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 - @KronicDeth
    • Convert MissingSDK errors for Dialyzer into Notifications.
  • #1993 - @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 - @KronicDeth
    • Add missing mix deps options to non-path influencing list:
      • env
      • manager
      • repo
      • sparse
      • submodules
      • system_env
  • #1995 - @hurricup]
    • Fix incorrect OuterElementType in eex.lexer.TemplateData.
      The EEX IElementType needs to use OuterLanguageElementType instead of the direct eex.psi.TokenType.
  • #1996 - @KronicDeth
    • Run QualifiedAlias#text in runReadAction for QualifiedAlias#name
  • #1997 - @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 - @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 - @KronicDeth
    • Don't require Alias qualifier to be a PsiNamedElement.
      It can be an ElixirAtom and getting the reference will still work.
  • #2001 - @KronicDeth
    • Any.isDecompiled for CallDefinitionHead.

Enhancements

  • #1988 - @KronicDeth
    • Find Deps 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:

      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 Calls, 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

22 Jun 13:22
4082355
Compare
Choose a tag to compare

Thanks

Changelog

v11.11.0

Enhancements

  • #1948 - @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 Aliases and not QualifiedAliases 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 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:

        1. 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:

        # 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...

Read more

v11.10.0

11 Feb 14:55
4033e31
Compare
Choose a tag to compare

Thanks

Changelog

v11.10.0

Enhancements

  • #1893 - @KronicDeth
    • Simplify onlyTemplateDateFileType
  • #1897 - @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 - @KronicDeth
    • Log PsiElement if Call#finalArguments contain a null.
  • #1902 - @KronicDeth
    • Suggest ASDF directories as homepaths for both Elixir and Erlang for Elixir SDKs.
  • #1821 - @jacekgajek
    • Run 'Dialyzer based inspections (Elixir)' using Elixir SDK running mix dialyzer or any customized mix command.

Bug Fixes

  • #1893 - @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 - @KronicDeth
    • Compare max opcode in to file to max opcode number, not ordinal.
      Opcodes are 1-based, but the ordinal of the Kotlin Enums 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 - @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 - @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 <path>. 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.

README updates

Dialyzer

Inspection

Batch Mode
  1. Analyze > Run Inspection by Name... (⌥⇧⌘I)
  2. Type "Dialyzer"
  3. Select "Dialyzer based inspections (Elixir)" from the shortened list
  4. Hit Enter.

You'll be presented with a "Run 'Dialyzer based inspections (Elixir)'" dialog

Run 'Dialyzer based inspections (Elixir)'

  1. Change the scope if you want.
  2. Click "OK"

The Inspections Result Tool Pane will open and show results as each file is processed.

  1. Click the ▶ to expand the Credo section to show all warnings

    Individual Entry

  2. Click an entry for the details of an individual warning with a code highlighting.
    Code Highlighting