ignatov/intellij-erlang

Erlang/rebar3 properly handle {vsn, git} in .app.src files - reported as error in plugin

Opened this issue · 2 comments

Report

Erlang & rebar3 properly handle {vsn, git} in .app.src files.

Plugin incorrectly reports <expression> expected, got 'git' for that construct.

Environment

  • OS: FreeBSD 13.0p5
  • IDE: IntelliJ IDEA Ultimate #IU-213.6461.79 (manually installed)
  • Plugin: 0.11.1129 (installed from IDE)
  • Erlang: 24 [erts-12.1.5] (native binary pkg version 24.1.7,4)
  • rebar 3.16.1+build.5060.ref6e79ef6c (self-compiled)

Could you please add a tiny example of a code with "errors", that's going to be very handy.

Yes, of course.

Input files

The source is unmodified rebar3 new app, except for mylib.app.src.

{application, mylib,
 [{description, "An OTP application"},

  %% The following line is correct and is properly handled by Erlang compiler
  {vsn, git},

  {registered, []},
  {mod, {mylib_app, []}},
  {applications,
   [kernel,
    stdlib
   ]},
  {env,[]},
  {modules, []},
 ]}.

Reported error

The error marked for that line is <expression> expected, got 'git'

State of GIT of application

The git log is as follows:

commit 3b7623e8196842cb2b599ca411a8ffa0cc812af8 (HEAD -> master)
Author: XXX
Date:   Mon Apr 18 10:42:49 2022 +0200

    Fixed app.src

commit 35de76f7e4233d35e81dd15d55157585e5a6e484
Author: XXX
Date:   Mon Apr 18 10:41:45 2022 +0200

    Added lock

commit 49edc2375c15be130693adde2958cba9a7dca120 (tag: v1.0)
Author: XXX
Date:   Mon Apr 18 10:29:00 2022 +0200

    Initial commit

Output files

the autogenerated _build/default/lib/mylib/ebin/mylib.app is as follows:

{application,mylib,
             [{description,"An OTP application"},
              {vsn,"1.0+build.3.ref3b7623e"},
              {registered,[]},
              {mod,{mylib_app,[]}},
              {applications,[kernel,stdlib]},
              {env,[]},
              {modules,[mylib_app,mylib_sup]}]}.

which is the expected behavior.