ignatov / intellij-erlang

Erlang IDE
https://www.jetbrains.com/help/idea/2018.2/getting-started-with-erlang.html
Other
734 stars 120 forks source link

rebar not creating beam file #720

Open wmorrison1967 opened 8 years ago

wmorrison1967 commented 8 years ago

Hello, With the help of deadok22 I am now able to compile using rebar. However I am not seeing any beam file being created. I setup my project to be otp compliant with the necessary directory structure. I am getting success when compiling but no beam file to boot. I have attach my rebar.config file. I am not be allowed to upload a zip of the project folder.

Regards, Will rebar.txt

deadok22 commented 8 years ago

Have you imported your project properly?

If not, the plugin is probably setting the output path to 'out/production/***'. Please check if your beams are there.

wmorrison1967 commented 8 years ago

Thanks for responding. I did not import this project. Created new in intelliJ. No beam files are in the 'out/production' folder. In fact I search my entire workstation and no beam was created for this project.

deadok22 commented 8 years ago

You can share your .iml file contents. I think, it's not even set up to be an Erlang module.

I suggest you import the project if you want to use the plugin.

wmorrison1967 commented 8 years ago

TestModule.txt I have uploaded copy of the iml file. I will make a copy of the project and try and import it and provide an update later.

wmorrison1967 commented 8 years ago

I tried to import the project as a rebar project but I am constantly being told nothing to show.

wmorrison1967 commented 8 years ago

@deadok22, with the import failing I create a new rebar project by creating a new directory and copy rebar with config file into it. I then proceed to run rebar create-app appid=name of project. The src subfolder was created and 3 files placed in it. I tried to import the new project but since no success. I them created subfolders ebin and include. The import did no work the first time. I restarted intelliJ and did the import again and this time it worked. I am able to compile the project. However I am getting this error

ERROR: compile failed while processing C:/devxmpp/testMe: rebar_abort Dependency not available: lager-.* ({git,"https://github.com/basho/lager", {tag,"3.0.2"}}) Dependency not available: p1_utils-.* ({git, "https://github.com/processone/p1_utils", {tag,"1.0.3"}})

I then run rebar get-deps and got this error

Pulling lager from {git,"https://github.com/basho/lager",{tag,"3.0.2"}} ERROR: Rebar requires version {1,5} or higher of git to process {git, "https://github.com/basho/lager", {tag, "3.0.2"}} ERROR: 'get-deps' failed while processing C:/devxmpp/testMe: rebar_abort

Ok so I down loaded git 2.7.x and still the same error. I am not so sure what to do now (it is not seeing the new version of git).......

So I proceed to comment out the deps section from the config file and got this error..

"src/mod_http_offline.erl:none: undefined parse transform 'lager_transform'".

rebar.config file sections below.... {deps, [{lager, "._", {git, "https://github.com/basho/lager", {tag, "3.0.2"}}}, {p1utils, ".", {git, "https://github.com/processone/p1_utils", {tag, "1.0.3"}}},

{erl_opts, [nowarn_deprecated_function, {d, 'LAGER', true}, {d, 'NO_EXT_LIB'}, {i, ["c:/Program Files/ejabberd-15.11/bin"]}, {i, ["c:/Program Files/ejabberd-15.11/lib/ejabberd-15.11/include"]}]}.

I am like really suck in trying to setup intelliJ.

Please note that this command works fine:

C:\Program Files\ejabberd-15.11\bin>erlc -v -DLAGER=true -DNO_EXT_LIB -I "c:/Program Files/ejabberd-15.11/lib/ejabberd-15.11/include" -o C:\devxmpp\prototype\mod_http_offline\src\ C:\devxmpp\prototype\mod_http_offline\src\mod_http_offline.erl

Hope I was detailed enough so that anyone with the same issue can benefit.

Regards, Will

deadok22 commented 8 years ago

So you're trying to import a project with rebar, although it's not built with rebar. Why would you want to do that?

wmorrison1967 commented 8 years ago

That was an error that I was getting but adjust by recreating the project and was able to import it without any issues.

On Mon, Feb 1, 2016 at 9:24 AM, Sergey Savenko notifications@github.com wrote:

So you're trying to import a project with rebar, although it's not built with rebar. Why would you want to do that?

— Reply to this email directly or view it on GitHub https://github.com/ignatov/intellij-erlang/issues/720#issuecomment-177992190 .

wmorrison1967 commented 8 years ago

Any help with how to solve the compilation issue in previous comment

deadok22 commented 8 years ago

Please, close this issue if it's solved after #723 is fixed.