Giter VIP home page Giter VIP logo

Comments (14)

tothlac avatar tothlac commented on June 1, 2024

Hi. Is there an update on this problem?

We were trying to find a solution using tags consisting of only 3 numbers but unfortunately it wont solve our problem. We need to tag hotfixes with 4 numbers or with some postfix following the third number. As mentioned above none of these two options work. Do you think its a valid problem which should be addressed or can you see any other possible solution?

from rebar3.

ferd avatar ferd commented on June 1, 2024

No updates.

I've cut back some of my maintaining time for OSS stuff as I'm doing other things in my life (and also side projects that aren't just builds), and as such I've tackled generally blocking bugs or compatibility issues across Erlang versions, but I don't have the bandwidth to do deeper overhauls within the tooling.

The apparent thing is that relx started only supporting semver somewhere in 2020 as part of its 4.0 version, which we introduced in Rebar3 3.14.0 back in August 2020. These fixes to go for semver were made as part of some refactorings to properly sort versions while trying to support systools updates that happened back then.

At this point I'm not really sure what is safe or not to do, or how we could do comparison of non-semver versions with semver versions if we were to support both; the change has been there for a long enough time that undoing it is its own risk as well, so it's not a simple change for sure.

from rebar3.

tsloughter avatar tsloughter commented on June 1, 2024

You can put basically anything after a + can't you?

from rebar3.

tothlac avatar tothlac commented on June 1, 2024

No, unfortunately using a tag like 0.1.0+build1 is not possible. Using rebar3 3.22.1 it fails with

===> Upfrom release version (0.1.0+build1) for relup not found

even though the release has been generated for that tag

tothlac:oyhveyh find . -name 0.1.0+build1
./_build/default/rel/oyhveyh/releases/0.1.0+build1
./.git/refs/tags/0.1.0+build1
tothlac:oyhveyh
tothlac:oyhveyh ls ./_build/default/rel/oyhveyh/releases/0.1.0+build1
no_dot_erlang.boot	start.script		vm.args
oyhveyh.rel		start_clean.boot
start.boot		sys.config

from rebar3.

tothlac avatar tothlac commented on June 1, 2024
tothlac:oyhveyh rebar3 --version
rebar 3.22.1 on Erlang/OTP 26 Erts 14.2.1

from rebar3.

tothlac avatar tothlac commented on June 1, 2024

I've pushed a repository here, where it does not work: https://github.com/tothlac/oyhveyh/
I've used this script to reproduce the error:

tothlac:oyhveyh cat ~/work/upgr.sh
#!/bin/bash

set -ex

APP=$1
BASE=$2
TARGET=$3

printf "Upgrade on %s between versions %s ==> %s\n" ${APP} ${BASE} ${TARGET}

rm -rf _build
git reset --hard ${BASE}
rebar3 release

git reset --hard ${TARGET}
rebar3 release
rebar3 appup generate
rebar3 relup --relname ${APP} --relvsn ${TARGET}

then I called

../upgr.sh oyhveyh 0.1.0 0.1.0+build1

It works with target tag 0.1.1, but does not work with 0.1.0+build1 because I got the above mentioned problem

from rebar3.

tsloughter avatar tsloughter commented on June 1, 2024

Oh, is this only an issue for relups?

from rebar3.

tsloughter avatar tsloughter commented on June 1, 2024

You say it is "newer rebar3" tho, did using such version tags used to work?

from rebar3.

tsloughter avatar tsloughter commented on June 1, 2024

Sorry, why did I not reread the origin post, haha.

I see it is two separate issues for using 4 digits and using +build1.

The latter is possibly a systools issue since it is an issue in relups. I need to check where that error message comes from.

from rebar3.

tsloughter avatar tsloughter commented on June 1, 2024

Ok, it is a bug in relx_relup it appears. I don't know why get_version_before fails. But this should definitely be fixable and I'll look into it more.

from rebar3.

tothlac avatar tothlac commented on June 1, 2024

Actually either tags containing four numbers (4.2.1.10) or three numbers + something at the end like 4.2.1+build1 would be good for us. Unfortunately 3 numbers is not enough for us, we would like to use something after the third number.

I've just tried it with 4.2.1-build1, but that one also does not work, even though:

tothlac:oyhveyh ls _build/default/rel/oyhveyh/releases/
0.1.0		0.1.0-build1	RELEASES	start_erl.data

from rebar3.

tothlac avatar tothlac commented on June 1, 2024

I got this:

tothlac:oyhveyh ../upgr.sh oyhveyh 0.1.0 0.1.0-build1
+ APP=oyhveyh
+ BASE=0.1.0
+ TARGET=0.1.0-build1
+ printf 'Upgrade on %s between versions %s ==> %s\n' oyhveyh 0.1.0 0.1.0-build1
Upgrade on oyhveyh between versions 0.1.0 ==> 0.1.0-build1
+ rm -rf _build
+ git reset --hard 0.1.0
HEAD is now at d01dff0 Add appup plugin
+ rebar3 release
===> Fetching rebar3_appup_plugin (from {git,"https://github.com/lrascao/rebar3_appup_plugin.git",
                               {branch,"master"}})
===> Fetching bbmustache v1.5.0
===> Fetching string_compat v0.0.1
===> Analyzing applications...
===> Compiling string_compat
===> Compiling bbmustache
===> Compiling rebar3_appup_plugin
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling oyhveyh
===> Assembling release oyhveyh-0.1.0...
===> Release successfully assembled: _build/default/rel/oyhveyh
+ git reset --hard 0.1.0-build1
HEAD is now at 87ca560 Add cowboy
+ rebar3 release
===> Verifying dependencies...
===> Fetching cowboy v2.11.0
===> Fetching cowlib v2.12.1
===> Fetching ranch v1.8.0
===> Analyzing applications...
===> Compiling cowlib
===> Compiling ranch
===> Compiling cowboy
===> Analyzing applications...
===> Compiling oyhveyh
===> Assembling release oyhveyh-0.1.0-build1...
===> Release successfully assembled: _build/default/rel/oyhveyh
+ rebar3 appup generate
===> current base dir: "/Users/tothlac/work/oyhveyh/_build/default"
===> app oyhveyh ebin dir: "/Users/tothlac/work/oyhveyh/_build/default/lib/oyhveyh/ebin"
===> Generated appup ("0.1.0" <-> "0.1.0-build1") for oyhveyh in "/Users/tothlac/work/oyhveyh/_build/default/lib/oyhveyh/ebin/oyhveyh.appup"
+ rebar3 relup --relname oyhveyh --relvsn 0.1.0-build1
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling oyhveyh
===> Assembling release oyhveyh-0.1.0-build1...
===> Release successfully assembled: _build/default/rel/oyhveyh
===> Upfrom release version (0.1.0-build1) for relup not found

from rebar3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.