ceylon-herd icon indicating copy to clipboard operation
ceylon-herd copied to clipboard

Impossible to upload JS modules via “Upload repo archive” (individual file upload)

Open lucaswerkmeister opened this issue 9 years ago • 12 comments

I’m finding it impossible to upload JS versions of modules via the “Upload repo archive” button, i. e., uploading individual files (for JVM, .cars).

If I upload the .js file first, I get the following errors:

  • .js file does not contain module information
  • The list of dependencies defined by the .car file and the .js file are NOT the same [followed by a list of dependencies per backend, where the JS dependencies are of course empty]

Uploading the -model.js file afterwards just adds “Unknown file” errors (for model + model SHA1), and doesn’t remove those errors.

If I upload the model file first, I get the same total errors, just in the reverse order.

Workaround: use ceylon copy.

lucaswerkmeister avatar Feb 13 '16 20:02 lucaswerkmeister

Or zip them together ;)

FroMage avatar Feb 13 '16 21:02 FroMage

More generally, it would be useful if Herd would allow you to upload several files at once (car, src, js, js model, and uploads can contain multiple modules).

lucaswerkmeister avatar Feb 15 '16 13:02 lucaswerkmeister

It does, through zips. You can upload an entire repo zipped.

FroMage avatar Feb 15 '16 14:02 FroMage

It would be even more useful if the zip wasn’t required ;)

lucaswerkmeister avatar Feb 15 '16 14:02 lucaswerkmeister

Yeah, except that when they're not zipped they lose all folder/tree information. So it's harder to recreate that shit on the server.

FroMage avatar Feb 15 '16 14:02 FroMage

If you upload multiple files including API docs for example I will get X number of files named index.html and no idea where to put them.

FroMage avatar Feb 15 '16 14:02 FroMage

The thing is, I don’t really know what folder/tree structure Herd expects anyways. Every time I’ve tried to upload a zip, I ended up with a hundred unrecognized files and had to reset the upload because there’s no way to get rid of them other than deleting them one by one.

For documentation, I stick to ceylon doc --out=… and that works out. But for the actual binaries, it’s inconvenient that I had to go through the upload dialog eight times to upload for cars and four srcs. Those work perfectly well without tree information, it’s all encoded in the file name. So if Herd would just let me select several of them in the Upload File dialog (they’re all in the project root dir anyways, since I had to copy them out of the reproducible build environment), and process them at once, it would be much simpler.

lucaswerkmeister avatar Feb 15 '16 14:02 lucaswerkmeister

You generally do ceylon copy --out... my.module/1 and that's it. If you have to upload something, do cd modules; zip -r ../repo.zip . and upload repo.zip (the contents of the module repo you want to upload).

The rest is crazy. Uploading a single jar/car is supported via the UI but only for convenience. Uploading more than one file that way is crazy.

FroMage avatar Feb 15 '16 14:02 FroMage

there’s no way to get rid of them other than deleting them one by one.

In the repo view you can delete entire folders, BTW.

FroMage avatar Feb 15 '16 14:02 FroMage

Btw, I sometimes wish the zip upload was a bit more flexible. So it wouldn't mind if I zipped the modules folder itself for example.

For the rest I agree that people should just use ceylon copy

quintesse avatar Feb 15 '16 17:02 quintesse

Well, yes but how can I differentiate between a "modules/com/foo/docs/api" folder for a com.foo module and for a (valid name too) modules.com.foo module?

We can always try to improve it to guess things, but limiting the number of things it can guess makes it much more deterministic.

FroMage avatar Feb 15 '16 17:02 FroMage

Well one could start by looking for any .car, .jar or .js file and work backwards from that. Sure it means the code will get more complex but it makes it less "fiddly" for the user.

quintesse avatar Feb 15 '16 17:02 quintesse