Comments (2)
I have found the reason for this. It's complicated.
The bottom line is that Sinan is using the flavors.development.build.compile_args
that are defined in Sinan's priv/default_build file, and ignoring the one in the
user's _build.cfg.
sinan:do_task/4 calls sin_build_config:start_config/4. In the init([BuildId,
ProjectDir, Config, Override]), the key "tasks.build.compile_args" is merged from
"flavors.development.build.compile_args", but never overridden by the user's
task.build.compile_args.
Here's an extract from the config dict (converted to_list).
[{"task.build.compile_args","-DFOOBAR +debug_info"},
{"flavors.release.build.compile_args","-DNOTEST=1 -W1"},
{"flavors.development.build.compile_args","+debug_info -W1"},
{"default_flavor","development"}
]
The compile_args I want is the one in task.build.compile_args. But the
flavors.development.build.compile_args is the one that is used. It looks as if the
merging of the dictionaries is not quite right.
A workaround is to edit the priv/default_build file and out in the args you like
(which will apply to all projects, so it's not necessarily a good workaround).
I don't have a patch to correct this at this time. I'm hoping you will know exactly
how to fix this in 10 seconds :)
Also, there is a bug in sin_build_arg_parser.erl. In an attempt to remove spaces,
certain "whitespace" characters are defined, such as
Unfortunately, in a number of places, one of the characters used to define "space" is
or maybe $\v for vertical tab.
The effect of this is that any compile_args identifiers that are parsed will lose all
lowercase "l" characters, so that "feel_the_love" will become "fee_the_ove". This is
easy to reproduce and verify.
Delete comment Comment 2 by emofine, Oct 18, 2008
I sent a patch that fixes this problem, as well as the bug in
sin_build_arg_parser.erl. The patch is based on the head branch, so it might not work
that well with your dev branch.
It must be noted that the _build.cfg file needs to include a section named "tasks"
(NOT "task"). Now I don't know if this was always the intention (to use "tasks"
instead of "task") so please take a look and see if I did this the right way.
Example _build.cfg tasks section:
tasks : {
build : {
compile_args : "+debug_info -Dwhatever"
}
}
I also put back the display of the compile flags, which seemed to have disappeared in
the meanwhile from the head.
Delete comment Comment 3 by emofine, Jan 06, 2009
This bug is still present as of version 0.12.0.6 of sinan. I am therefore unable to
use needed include directories outside of the actual Sinan application. This is a
showstopper that forces me to copy the include files into the application's include
directory to get it to compile.
Delete comment Comment 4 by emofine, Jan 06, 2009
Ok, I found that somehow, when sinan was upgraded from 0.11.0.1 to 0.12.0.6, the
bin/sinan and bin/sinserv scripts were not changed and still referred to the old
0.11.0.1 release. The problem is in fact solved in 0.12.0.6.
There is another issue to do with default_build config compile_args having arguments
in common with build.cfg, but it can be worked around (don't have common args) and
probably won't affect most people.
from sinan.
This is resolved in the current sinan
from sinan.
Related Issues (20)
- remove config dir from gen task generation HOT 1
- verbose mode
- local build dir first in list by sin_fs_resolver
- sinan gen pull username from env/passwd HOT 1
- pluggable builds HOT 1
- sinan should only copy erts to the release if it is not already copied.
- Randomly created proper test failed. HOT 1
- Make it an option to include erts into the build as a symlink, not a copy HOT 6
- Provide more control over sinan doc results HOT 4
- Support debian packaging in sinan
- include header files within the same app
- Sinan dist issue on fresh install on OS X HOT 4
- Release start script fails without {include_erts, true}.
- Directorys without version suffix HOT 2
- git based app versions HOT 3
- compile args should be part of the criteria for rebuilding files HOT 1
- sinan failed to bootstrap itself HOT 8
- RFE: report failed constraints HOT 1
- Provide .tar.gz of latest sinan release. HOT 2
- sinan release/dist fails HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sinan.