Uploaded image for project: 'Erlang/OTP'
  1. Erlang/OTP
  2. ERL-1415

relup script generate failed when removed application module in DepMods of appup script

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Help Wanted
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 22.3.4.1
    • Fix Version/s: None
    • Component/s: sasl
    • Labels:
      None

      Description

      assume me have an application app_a-0.1.0 deps on lib_a-0.1.0

      while I upgrade app_a from 0.1.0 to 0.2.0 and change deps from lib_a-0.1.0 to lib_b-0.1.0

      i want suspend process app_a_gen_server before unload code lib_a and load code lib_b in relup

      so I write appup code below

      https://github.com/slepher/relup_fail_demo/blob/master/apps/app_a/src/app_a.appup.src

      { "0.2.0",
          [{ "0.1.0",
              [{update,app_a_gen_server,
                       {advanced,[]},
                       brutal_purge,brutal_purge,
                       [lib_a, lib_b]}] }],
          [{ "0.1.0",
              [{update,app_a_gen_server,
                       {advanced,[]},
                       brutal_purge,brutal_purge,
                       [lib_a, lib_b]}] }]
      }.
      

       but it will cause rebar3 relup failed because application lib_a is removed

      >> rebar3 relup -n release_a -v 0.2.0 -u 0.1.0

      ===> Error generating relup:
      {{ Undefined module: lib_a}}

      full sample code is here

      https://github.com/slepher/relup_fail_demo

      os version: 

      macos catalina 10.15.7 

      erlang version: 

      >> brew info erlang@22
      erlang@22: stable 22.3.4.12 (bottled) [keg-only]

      rebar version:

      rebar 3.14.2 on Erlang/OTP 22 Erts 10.7.2.5

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lukas Lukas Larsson
              Reporter:
              slepher slepher
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: