Comments (9)
nice, thanks for that, i'll dig into it soon
from rebar3_appup_plugin.
when calling appup release, which calls appup compile on one of our applications it generates
you mean appup generate
right?
{"git", UpgradeInstructions, DowngradeInstructions} instead of putting the correct version number there.
This is weird because relapp1
also uses git versioning and it works ok, any idea what's different about your project?
from rebar3_appup_plugin.
Maybe I'm wrong, but as we have
{provider_hooks, [
{pre, [{tar, {appup, tar}}]},
{post, [{compile, {appup, compile}},
{clean, {appup, clean}}]}
]}.
in our rebar.config release calls first compile, and because of the post rule appup compile is called after compiling.
When I was debugging it I saw the above mentioned line being executed and there rebar_app_info:original_vsn/2 returns 'git' instead of a string. Because of this problem our build stops in the next step when we call rebar3 relup , in systools_relup:get_script_from_appup/5 on this line:
, because TopVsn comes from the generated appup file where it contains 'git', and that won't match TopApp#application.vsn.
I was trying to figure out the reason why this is not correctly set in rebar. If it helps I will try to create a similar application.
from rebar3_appup_plugin.
One more thing we have found:
The atom git most probably comes from the .app.src of the given dependency. There we use
{vsn, git},
instead of an exact version number. The .app file already contains the version number correctly after the compile in the generated .app.src.
If I change {vsn, git} in the .app.src file to a version string, we don't have this problem anymore.
from rebar3_appup_plugin.
It looks like even though
rebar3 compile
generates the .app file with the correct vsn, in appup compile still the vsn coming from the app.src files are used:
So SourceAppInfo is basically the contents of the .app.src file, but AppInfo already contains the contents of the generated .app file with the correct Vsn. I've created a PR which just passes the orinal_vsn coming from #rebar_state{} to the template function.
from rebar3_appup_plugin.
Unfortunately I have not noticed in relapp.appup.src the first two lines:
AppInfo = rebar3_appup_utils:find_app_info(<<"relapp">>, STATE),
"{{vsn}}" = rebar_app_info:original_vsn(AppInfo),
With those two lines added to our .appup.src the correct version is used. The problem was that with earlier versions of the plugin the versioning worked without these two lines, so actually it can still be a problem for other users. What do you think do we need this bugfix (maybe it is not a bug this way)? If you want it, I can create a test for it.
from rebar3_appup_plugin.
so, on relapp1, if i delete ´relapp.appup.src´ and change the vsn tuple to {vsn, git}
i should be able to reproduce the error?
from rebar3_appup_plugin.
I've pushed some commits to my local repo containing the needed changes to reproduce the same problem.
So basically if the project is not umbrella, and the first lines setting the vsn in the .appup.src are missing, and semver is used for relx in rebar.config the string "git" will be stored in the generated .appup file after calling "rebar3 compile" which calls "rebar3 appup compile".
The commits are here:
https://github.com/tothlac/relapp1/commits/master
from rebar3_appup_plugin.
i think this is another instance of #24, as @ferd mentioned on it the provider hook functionality works differently when not in an umbrella app context, for some reason git
gets replaced in app_info_t
in some cases and not in others
from rebar3_appup_plugin.
Related Issues (20)
- appup generate creates appup files even if appup compile has already created them HOT 2
- Using current version on github I have the following error HOT 20
- SVN rebar3_appup_plugin HOT 3
- Can't make relup HOT 2
- Merge appup.pre.src && appup.post.src files into the appup file after .appup is generated by 'appup generate' HOT 10
- string:tokens/2 and string:strip/3 will be deprecated HOT 9
- relup fail on second upgrade HOT 6
- Old and buggy version in pkg HOT 3
- error in rebar3_appup_generate HOT 9
- incorrect appup file getting generated HOT 10
- rebar3 appup fails - new release overwriting old "previous version apps" HOT 4
- appups not generated for apps that need it but for which a previous version had appups HOT 3
- generated appup order HOT 3
- 2.4.2 not found in the hex.pm, please push it to hex.pm. HOT 2
- The new child does not start if a release is upgraded. HOT 7
- Follow behaviour parents when generating appup files
- Appup file generated by rebar3_appup_generate contains all files if only the compile options change HOT 2
- Adding new supervisor HOT 2
- no `debug_info` when release with otp24
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 rebar3_appup_plugin.