genodelabs / goa

Tool for streamlining the development of Genode applications
GNU Affero General Public License v3.0
20 stars 17 forks source link

api dependencies are skipped if download error occurs #10

Closed jschlatow closed 3 years ago

jschlatow commented 3 years ago

I tried to extend the unix shell a bit and noticed that some api archives are reported missing as soon as I run goa publish. I believe the api archives are automatically downloaded, however, if goa is unable to pull a certain archive once it seems to forget some dependencies. I'm able to reproduce this issue with the following modifications on the intro/unix_3rd in goa-playground:

  1. remove the var directory to start on a clean slate
  2. add alex-ab/src/which to pkg/unix_3rd/archives
  3. add set version(alex-ab/src/which) 2021-02-22 to .goarc
  4. run goa add-depot-user alex-ab --depot-url https://depot.genode.org --pubkey-file /path/to/alex-ab/pubkey
  5. run goa run - this will fail on downloading https://depot.genode.org/alex-ab/api/libc/2021-02-22.tar.xz
  6. run goa run again - this will succeed
  7. yet, running goa publish will report a bunch of missing api archives
nfeske commented 3 years ago

The api archives are not needed for goa run. It is happy with the downloaded binaries. Hence, if the APIs (that were used to produce the downloaded binaries) are missing, goa does not complain in this step.

When publishing, however, all sources including the apis must be published, in particular to ensure the compliance to open-source licenses that require distributing software in a form that can actually be built. Hence the failure.

Now the question is, how can a user resolve this situation? Do you have an idea how goa could assist best?

jschlatow commented 3 years ago

What about adding a subcommand goa download for acquiring the missing archives (or integrate this into the publish subcommand)?

nfeske commented 3 years ago

I think the latter - attempting the download of missing APIs as part of the publish step - would be very convenient.

Would you like to give implementing this a try?

jschlatow commented 3 years ago

I'll have a look.

jschlatow commented 3 years ago

@nfeske I believe commit c1ea266 should suffice. It triggers the download of missing dependencies just before the actual publishing.

nfeske commented 3 years ago

That was quick! Thank you @jschlatow. Merged to master.