These are chat archives for synrc/n2o

6th
Oct 2016
Sébastien Saint-Sevin
@seb3s
Oct 06 2016 13:29
Hi
I'm trying to use n2o with postgresql but I'm facing some difficulties in using mad
I'm getting the following message : Apps couldn't be loaded: [pgapp,epgsql,ssl,public_key,asn1]
I've tried to manually update the .applist so that is shows all the applications in the correct order but this has no impact on the loading
I'm surely missing something, could you help me please ?
Andy
@m-2k
Oct 06 2016 13:33
./mad pla
cat .applist
Sébastien Saint-Sevin
@seb3s
Oct 06 2016 13:33
[public_key,kernel,stdlib,fs,ranch,crypto,compiler,syntax_tools,inets,poolboy,mnesia,syn,cowlib,ssl,bcrypt,cowboy,epgsql,n2o,pgapp,teamup,active,erlpass,erlydtl,mad,nitro,sh]
Andy
@m-2k
Oct 06 2016 13:35
OH U ./mad pla rep at once
Sébastien Saint-Sevin
@seb3s
Oct 06 2016 13:36

Applications: [public_key,kernel,stdlib,fs,ranch,crypto,compiler,
syntax_tools,inets,poolboy,mnesia,syn,cowlib,ssl,bcrypt,
cowboy,epgsql,n2o,pgapp,teamup,active,erlpass,erlydtl,mad,
nitro,sh]
Erlang/OTP 18 [erts-7.2.1] [source] [64-bit] [smp:2:2] [async-threads:10] [kernel-poll:false]

Eshell V7.2.1 (abort with ^G)
1> Setting up watches. Beware: since -r was given, this may take a while!
Watches established.

=INFO REPORT==== 6-Oct-2016::13:35:23 ===
syn_registry_table was successfully created
=INFO REPORT==== 6-Oct-2016::13:35:23 ===
syn_groups_table was successfully created==> "teamup"
==> "/home/build/teamup"
==> "erlydtl"

Apps couldn't be loaded: [pgapp,epgsql,ssl,public_key,asn1]
==> "syn"
==> "fs"
...

Andy
@m-2k
Oct 06 2016 13:37
try start manually application:start(App).
Sébastien Saint-Sevin
@seb3s
Oct 06 2016 13:38
the error is in Apps could'nt be loaded: [pgapp,epgsql,ssl,public_key,asn1]
Sébastien Saint-Sevin
@seb3s
Oct 06 2016 13:38
My app is depending on pgapp which depends on epgsql, etc...
Andy
@m-2k
Oct 06 2016 13:39
@seb3s lol?
application:start(asn1).
Sébastien Saint-Sevin
@seb3s
Oct 06 2016 13:39
but asn1, public_key and ssl are not properly started
Andy
@m-2k
Oct 06 2016 13:39
JUST START THIS MANUALLY
Sébastien Saint-Sevin
@seb3s
Oct 06 2016 13:39
yep I can start them manually
I thought mad was usefull to do that automically
Andy
@m-2k
Oct 06 2016 13:39
and? it s ok or not?
Sébastien Saint-Sevin
@seb3s
Oct 06 2016 13:41
when I type
application:ensure_all_started(teamup).
{ok,[asn1,public_key,ssl,epgsql,pgapp,teamup]}
Andy
@m-2k
Oct 06 2016 13:41
you can run all applications manually?
Sébastien Saint-Sevin
@seb3s
Oct 06 2016 13:42
yep the applications are fine
Andy
@m-2k
Oct 06 2016 13:42
launch by-one
Sébastien Saint-Sevin
@seb3s
Oct 06 2016 13:43
But the dependencies are not taken into account by mad plan & mad repl
Andy
@m-2k
Oct 06 2016 13:43
and remember order
Sébastien Saint-Sevin
@seb3s
Oct 06 2016 13:43
the order is returned by ensure_all_started
and it is correct
when I put it into .applist, it is not taken into account
Andy
@m-2k
Oct 06 2016 13:44
maybe epgsql is bullshit package
u don't edit .applist manually
Sébastien Saint-Sevin
@seb3s
Oct 06 2016 13:45
does mad plan take into account all the system dependencies ?
Andy
@m-2k
Oct 06 2016 13:45
applist will be created when ./mad pla called
Sébastien Saint-Sevin
@seb3s
Oct 06 2016 13:46
I mean ssl => public_key => asn1
in my case, public_key is generated in .applist but not asn1
BUT public_key depends on asn1
how is this possible ?
Andy
@m-2k
Oct 06 2016 13:50
one sec
@5HT чот mad как-то странно зависимости формирует
[public_key,kernel,stdlib,fs,ranch,asn1,crypto,inets,gproc,mnesia,kvs,cowlib,ssl,erlach_db,cowboy,n2o,erlach,active,epgsql,jsone,mad,nitro,sh,spa,syn]
Andy
@m-2k
Oct 06 2016 13:56
asn1 после public_key
correct: [asn1,crypto,public_key,kernel,stdlib,fs,ranch,inets,gproc,mnesia,kvs,cowlib,ssl,erlach_db,cowboy,n2o,erlach,active,epgsql,jsone,mad,nitro,sh,spa,syn]
Andy
@m-2k
Oct 06 2016 14:05
@5HT maybe write application:ensure_all_started/1 instead case application:start(A) of https://github.com/synrc/mad/blob/master/src/provision/mad_repl.erl#L66
кто помнит, в app.src файле должны быть перечислены все приложения включая зависимости? или только необходимые этому приложению?
{application, epgsql,
 [
  ****
  {applications, [kernel,
                  stdlib,
                  ssl]},
  ****
ans1 missing
Andy
@m-2k
Oct 06 2016 14:26
@seb3s epgsql is bullshit package
macbook-pro-m:develop m$ ./mad cle dep com pla rep
OK
==> dependency: "git://github.com/ostinelli/syn" tag: {tag,"1.1.0"}
==> dependency: "git://github.com/synrc/active" tag: {tag,"master"}
*****
==> dependency: "git://github.com/m-2k/epgsql" tag: {tag,"master"}
==> "syn"
Compiling /deps/syn/src/syn_utils.erl
******
Writing /apps/erlach/ebin/erlach.app
OK
Ordered: [kernel,stdlib,fs,ranch,asn1,crypto,inets,gproc,mnesia,kvs,cowlib,
          public_key,erlach_db,ssl,cowboy,n2o,erlach,active,epgsql,jsone,mad,
          nitro,sh,spa,syn]
******
1> application:start(epgsql).
{error,{already_started,epgsql}}
2>
epgsql/epgsql#102
Sébastien Saint-Sevin
@seb3s
Oct 06 2016 14:32
I see your fix
however these dependencies are already described in the erlang lib
ssl depends on public_key
which depends on asn1
Andy
@m-2k
Oct 06 2016 14:33
lol
hmm
Sébastien Saint-Sevin
@seb3s
Oct 06 2016 14:34
Why do we need to add these in each package that relies on ssl ?
you should only described the application you are using, not the one that are used by the applications you are using.
I makes no sense to use dependencies otherwise
Andy
@m-2k
Oct 06 2016 14:37
yep. @5HT mad needed fixes
@seb3s u right
Andy
@m-2k
Oct 06 2016 14:56
кто mad_repl писал, это же пиздец :-)
rusjava8
@rusjava8
Oct 06 2016 15:45
Я догадываюсь кто :)
Andy
@m-2k
Oct 06 2016 15:51
@seb3s try this version and report me https://github.com/m-2k/mad
Sébastien Saint-Sevin
@seb3s
Oct 06 2016 17:13
hi
this fixes the app loading but breaks the sys.config
i get
application:get_env(pgapp, pools).
{ok,[]}
where I should have :
application:get_env(pgapp, pools).
{ok,[{epgsql_pool,[{size,4},{max_overflow,20}],
[{host,"localhost"},
{port,5432},
.....
don't know why
Andy
@m-2k
Oct 06 2016 19:06
then waiting for @5HT
since I have not figured out how to accumulate in mad the configs
Andy
@m-2k
Oct 06 2016 19:12
Макс, шо там за фишка, почему ты в application:start/1 целый тапл с конфигами запихиваешь?
в доках ничего про это нет