eclipse-archived / ceylon-herd

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

Support resolving source module from Herd #227

Closed lukedegruchy closed 8 years ago

lukedegruchy commented 8 years ago

Add support for resolving module dependencies from Herd. This is meant to address https://github.com/ceylon/ceylon-herd/issues/196.

This was tested with a module that supports both the jvm and javascript VM's.

A possible limitation to this implementation is that when uploading a new version of a module, a previously resolved depedency (ex ceylon.collection "1.1.0") must be once more resolved in the latest upload.

lukedegruchy commented 8 years ago

After more testing I discovered this isn't quite ready yet.

lukedegruchy commented 8 years ago

OK. It's apparently not that bad. I'm going to reopen this pull request and add another one to cover the gap that I found tonight.

With this pull request the end result is that the Herd module will show as "Missing" with no link instead of "Herd Module" with a link the modules.ceylon-lang.org. In addition, uploading a new version of the module, as described above, will result in having to re-resolve the module.

FroMage commented 8 years ago

Yay, I'll look at this tomorrow to merge it, thanks!

lukedegruchy commented 8 years ago

Just realized I didn't originally add the necessary changes for a database schema change. I just checked in changes to recognize the new DB version 20 in which I've added a new table: herddependency.

quintesse commented 8 years ago

@lukedegruchy Almost, the update-20.sql file is missing an UDPATE statement for the herd_metainf table:

update herd_metainf set value = :DB_SCHEMA_VERSION where key = 'db_schema_version';

(I think, typing from memory here)

FroMage commented 8 years ago

Yes, merged it, thanks a lot! It was only missing the part to display in the module view, and the DB update was a bit confused. Great work, though :)

lukedegruchy commented 8 years ago

Thanks :)