eclipse-archived / ceylon-herd

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

attach source to an existing module #275

Open gavinking opened 7 years ago

gavinking commented 7 years ago

So I made the mistake of uploading this module without a source jar. There's nothing at all wrong with what I uploaded except for the fact that now I can't see the source or docs in my IDE unless I manually copy the source jar into my local repo.

So I think we need a way to add source to an existing module when it's missing.

@FroMage Help! 😳

quintesse commented 7 years ago

I think it would be okay to allow this. The same with documentation. They are both elements that won't change the workings of the code so the fact that some people might not have a source jar or no documentation while others do is not a problem.

We might even consider doing this for missing code artifacts (you uploaded the CAR but you forgot the JS files), but in that case we do have the problem that it could cause unexpected behaviour ("hey, it says it can't find "foo.js" -- "Dunno, works fine here")

jvasileff commented 7 years ago

I'd like to agree with @quintesse, but isn't there an "expires never" cache strategy? It's a nice property of ~/.ceylon/cache that I can always trust artifacts and never have to manually delete stuff or start over.

The same, but perhaps even more importantly, for mirrors of Herd.

As Herd grows, there's also the opportunity for vandalism, if someone rage quits their job or something and decides to mess with doc artifacts on their way out.

Immutability is good.

We might even consider doing this for missing code artifacts

I think you'd always want a new version for that.

quintesse commented 7 years ago

but isn't there an "expires never" cache strategy?

Yes, that's what I said when some people might see sources or docs in their cache while others wouldn't. But for those elements I don't see how that would cause any problems. Some people wouldn't see sources or docs in their IDE for example while others would. That must be better than 100% of them not seeing any sources or docs.

And about vandalism, we can't prevent that anyway. A rage quitter can still upload a messed up new version. In this case they could mess a bit with docs and sources and only if they weren't there in the first place! Which is an uncommon situation. Again not something I'd worry too much about

We might even consider doing this for missing code artifacts

I think you'd always want a new version for that.

I'm still not 100% convinced, but I can at least see much more possibilities for real problems so I think I'd agree here. Still it's something worth thinking about. Forcing people to adjust their workflow, publish a new version, just because they forgot to upload something is a bit crappy (I'm not talking about overwriting something that was already uploaded, in that case you must indeed always make a new version).

jvasileff commented 7 years ago

That must be better than 100% of them not seeing any sources or docs.

People wouldn't use the version w/o docs; they'd use the replacement version, and everyone would have the same experience (easy to troubleshoot).

And about vandalism, we can't prevent that anyway. A rage quitter can still upload a messed up new version

That misses my point. They wouldn't be breaking something that people already depend on.

only if they weren't there in the first place!

Ok, that would definitely help. But still not worth it IMO. If you let people fix their mistakes, they'll make more mistakes, and early downloaders and mirror-ers will continually have bad experiences.