eclipse-archived / ceylon-herd

The Ceylon repository web application
Apache License 2.0
21 stars 11 forks source link

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

Open lucaswerkmeister opened 8 years ago

lucaswerkmeister commented 8 years ago

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:

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.

FroMage commented 8 years ago

Or zip them together ;)

lucaswerkmeister commented 8 years ago

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).

FroMage commented 8 years ago

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

lucaswerkmeister commented 8 years ago

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

FroMage commented 8 years ago

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 commented 8 years ago

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.

lucaswerkmeister commented 8 years ago

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.

FroMage commented 8 years ago

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 commented 8 years ago

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.

quintesse commented 8 years ago

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

FroMage commented 8 years ago

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.

quintesse commented 8 years ago

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.