spurious compiler error messages triggered by sync

35 views
Skip to first unread message

Franklin Brauning

unread,
Dec 18, 2017, 11:11:17 AM12/18/17
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Hi I'm building an app with a plugin I made (https://bitbucket.org/fran_/bulma )


Building the project (make) after adding the dependancy to rebar.config goes ok, everything compiles with no errors.

Then I launch "bin/nitrogen console", followed by a "sync:go()".

On the browser, after accessing some page which uses some element in that library, *sync, I guess* goes to trigger recompilation
for all the elements in the library. The problem here is that every element module fails to compile because it cant find records.hrl, so
in the end, somehow sync fail to do its job with this library

Every module fails to include records.hrl (which is there because a manual *make* works fine)

Any ideas?

=INFO REPORT==== 18-Dec-2017::11:59:22 ===
Recaching Template: ./site/templates/plugins/bulma/bulma.html

=ERROR REPORT==== 18-Dec-2017::11:59:31 ===
/home/fran/synergy/folders/lib/bulma/src/action_animatecss.erl:3: Error: can't find include file "records.hrl"
/home/fran/synergy/folders/lib/bulma/src/action_animatecss.erl:8: Error: record animatecss undefined
/home/fran/synergy/folders/lib/bulma/src/action_animatecss.erl:9: Error: record animatecss undefined
/home/fran/synergy/folders/lib/bulma/src/action_animatecss.erl:11: Error: variable 'Fx' is unbound
/home/fran/synergy/folders/lib/bulma/src/action_animatecss.erl:12: Error: record animatecss undefined
/home/fran/synergy/folders/lib/bulma/src/action_animatecss.erl:14: Error: variable 'Fx' is unbound

=ERROR REPORT==== 18-Dec-2017::11:59:31 ===
/home/fran/synergy/folders/lib/bulma/src/action_doclick.erl:5: Error: can't find include file "records.hrl"
/home/fran/synergy/folders/lib/bulma/src/action_doclick.erl:10: Error: record doclick undefined
/home/fran/synergy/folders/lib/bulma/src/action_doclick.erl:11: Error: record doclick undefined
/home/fran/synergy/folders/lib/bulma/src/action_doclick.erl:12: Error: variable 'Id' is unbound
/home/fran/synergy/folders/lib/bulma/src/action_doclick.erl:16: Error: variable 'Tout' is unbound
/home/fran/synergy/folders/lib/bulma/src/action_doclick.erl:18: Error: variable 'HtmlId' is unbound
/home/fran/synergy/folders/lib/bulma/src/action_doclick.erl:22: Error: variable 'Tout' is unbound

Jesse Gumm

unread,
Dec 20, 2017, 5:28:33 PM12/20/17
to nitrogenweb
Hi Franklin,

I'm trying to reproduce this, but I haven't used mercurial, and I seem to be having trouble getting this pulling with rebar.

I've added:

{bulma,           ".*", {hg, "https://bitbucket.org/fran_/bulma"}},


To my rebar.config and it's not working.

Any thoughts?

-Jesse



--
You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb+unsubscribe@googlegroups.com.
To post to this group, send email to nitro...@googlegroups.com.
Visit this group at https://groups.google.com/group/nitrogenweb.
For more options, visit https://groups.google.com/d/optout.



--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm

Jesse Gumm

unread,
Dec 20, 2017, 5:34:49 PM12/20/17
to nitrogenweb
Nevermind, I just cloned it directly with hg.

Anyway, Interesting that this isn't working for you.

I'm not sure why sync wouldn't; be finding records.hrl.  It's working just fine for me at this point.

-Jesse

Franklin Brauning

unread,
Dec 21, 2017, 9:17:08 AM12/21/17
to Nitrogen Project / The Nitrogen Web Framework for Erlang
My rebar.config line is

    {bulma, {hg, "https://bitbucket.org/fran_/bulma", default}}

How about touching the records.hrl file? In your setup, do all modules compile?
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb...@googlegroups.com.

To post to this group, send email to nitro...@googlegroups.com.
Visit this group at https://groups.google.com/group/nitrogenweb.
For more options, visit https://groups.google.com/d/optout.
--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm

Jesse Gumm

unread,
Dec 21, 2017, 2:16:16 PM12/21/17
to nitrogenweb
Thanks. Yeah, it works just fine.
 
Everything compiles correctly with `make`. I make sure the modules load.  Then I touch lib/bulma/include/records.hrl and it triggers a recompile of everything.  The only thing that don't compile correctly are due to the nitrogen_fa being loaded twice (and that can be avoided in nitrogen_fa by adding some -ifndefs in the include file there (sending in PR for that now).

Is this on windows?  I'm running ubunbu, but I know you've been trying to make this work on Windows, so just wanted to make sure in case there's something wonky going on with sync in windows (not out of the realm of possibility).

-Jesse

To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb+unsubscribe@googlegroups.com.

To post to this group, send email to nitro...@googlegroups.com.
Visit this group at https://groups.google.com/group/nitrogenweb.
For more options, visit https://groups.google.com/d/optout.

Franklin Brauning

unread,
Dec 22, 2017, 9:47:36 AM12/22/17
to Nitrogen Project / The Nitrogen Web Framework for Erlang
This happens on linux. But the truth is it is an old installation transplanted from another project I had in my laptop. It should be some link or old configuration some where.

I'm on a remote location where internet access is limited so it was that or using the *latest* releases with otp17. I don't how will I get an updated setup for running on Windows, I hope using a VPS to download and build that from command line suffices.

thanks.

Jesse Gumm

unread,
Dec 22, 2017, 9:50:53 AM12/22/17
to nitrogenweb
Interesting.  Do you know what the version of sync you have is?   Or at least the latest commit that that sync version is running?

The latest commit is from Oct 26, sha: 7548db

-Jesse

To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb+unsubscribe@googlegroups.com.

To post to this group, send email to nitro...@googlegroups.com.
Visit this group at https://groups.google.com/group/nitrogenweb.
For more options, visit https://groups.google.com/d/optout.

Franklin Brauning

unread,
Dec 22, 2017, 2:12:58 PM12/22/17
to Nitrogen Project / The Nitrogen Web Framework for Erlang
I got the most recent 7548dbffd3ed20a674bd423bd7131585ad66cd9e

           {version,"7.1"},

Franklin Brauning

unread,
Jan 5, 2018, 9:28:46 AM1/5/18
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Something is wrong with sync

I tried clean installs with otp20 and otp19, rel and packages setups.

when I create a new page and sync tries to compile/recompile I get

/home/fran/synergy/folders2-otp19/site/src/a.erl:6: Error: can't find include file "records.hrl"

I am also getting this message when I kill/restart the vm

A $make from the shell works just fine, btw

=INFO REPORT==== 5-Jan-2018::11:26:10 ===
Trying to create ETS table (simple_cache_nitrogen) that already exists, but we are already the owner, so that's okay.
=ERROR REPORT==== 5-Jan-2018::11:26:13 ===
/home/fran/synergy/folders2-otp19/site/src/a.erl:6: Error: can't find include file "records.hrl"

Franklin Brauning

unread,
Jan 5, 2018, 12:10:20 PM1/5/18
to Nitrogen Project / The Nitrogen Web Framework for Erlang
And Indeed, the 7548dbffd3ed20a674bd423bd7131585ad66cd9e commit in the sync/ project is at fault

To reproduce, just go to a totally clean nitrogen install, launch sync:go() and modify a page.
Or, kill the vm, go to lib/sync, remove the the beam files in there and $make inplace from the sync directory, now launch nitrogen and modify a page.

You'll get those "cant find records.hrl"...

Author: Jesse Gumm <gu...@sigma-star.com>  2017-10-27 01:32:19
Committer: Jesse Gumm <gu...@sigma-star.com>  2017-10-27 01:32:19
Parent: 2de9c1c34e1b027b8c47316adef4078fb0bc994a (Merge branch 'master' of https://github.com/ZatolokinPavel/sync into ZatolokinPavel-master)
Branches: master, remotes/origin/master
Follows:
Precedes:

    Merge from erlyshare-master

Jesse Gumm

unread,
Jan 5, 2018, 12:38:16 PM1/5/18
to nitrogenweb
Awesome. Thanks for finding this!

Are these changed lines the ones that cause it?


-Jesse

--
You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb+unsubscribe@googlegroups.com.

Franklin Brauning

unread,
Jan 5, 2018, 1:40:43 PM1/5/18
to Nitrogen Project / The Nitrogen Web Framework for Erlang
yes that merge.

As a sidenote, that merge contains a commit "fix recompile can't find *.hrl bug" which I think is the "bug itself"
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb...@googlegroups.com.

Vianney Sserwanga Shackelly

unread,
Nov 12, 2018, 11:47:42 PM11/12/18
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Hello, 

How did you go about this issue of sync:go() failing to locate header files. I've been troubled by this for long, having every time to do a $make and restart the server?
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb...@googlegroups.com.

Franklin Brauning

unread,
Nov 15, 2018, 1:45:42 PM11/15/18
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Hello, I tried to fix the comit which introduced the bug (mentioned in the previous posts) but to be honest I couldnt find which line is producing the bug.

To avoid this bug replace the sync dependency in your rebar.config (dont forget to coment the current one out):

Put this:
    {sync,          {git, "git://github.com/rustyio/sync",            {branch, "2de9c1c34e1b027b8c47316adef4078fb0bc994a"}}},

Does this fixes your problem?

Jesse Gumm

unread,
Nov 15, 2018, 2:05:22 PM11/15/18
to nitro...@googlegroups.com
Hey guys,

I've done some experimental stuff to get this fixed in Erlang 21 (I'm assuming you're getting the error message in 21).

Two things to try:



There are issues with Erlang 21 not actually including the include directory in the module info, leading sync to getting confused.

With those two fixes, it *should* work, as it's how I operate currently.

-Jesse



Franklin Brauning

unread,
Nov 19, 2018, 9:24:34 AM11/19/18
to Nitrogen Project / The Nitrogen Web Framework for Erlang
It points to your rebar repo
Reply all
Reply to author
Forward
0 new messages