Your SlideShare is downloading. ×
Ceylon module repositories by Aleš Justin
Ceylon module repositories by Aleš Justin
Ceylon module repositories by Aleš Justin
Ceylon module repositories by Aleš Justin
Ceylon module repositories by Aleš Justin
Ceylon module repositories by Aleš Justin
Ceylon module repositories by Aleš Justin
Ceylon module repositories by Aleš Justin
Ceylon module repositories by Aleš Justin
Ceylon module repositories by Aleš Justin
Ceylon module repositories by Aleš Justin
Ceylon module repositories by Aleš Justin
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Ceylon module repositories by Aleš Justin

9,798

Published on

Discover how Ceylon modules are implemented.

Discover how Ceylon modules are implemented.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
9,798
On Slideshare
0
From Embeds
0
Number of Embeds
25
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Module repositories Aleš Justin, Red Hat
  • 2. Modules? • History • • • Java SDK monolith JSR-277, JSR-294, … OSGi ! • Should be part of the language! • Well, you cannot ignore legacy • A ton of cool Java libs, … ! • It’s all about modules in Ceylon! • (at least that’s what Stéphane tells me ;-)
  • 3. Compiling the app? • Something needs to know how to *find* dependent modules • • • Typechecker “talks” to Ceylon Module Repository (CMR) ! Once an app module is compiled, it goes into local module repo → *ready* to be used by other modules ! But how do we share it “globally”?
  • 4. Running the app? • Directly — MyApp::main(String… args) ? • • BOOM!! … as nobody knows how to *load* dependent modules ! Custom “Runtime” • • • JBoss Modules based (WildFly AS proven; p2p classloading) “Talks” to CMR to lookup modules Lazy initialisation; build minimal transient closure of dependency info
  • 5. More module lookups • • Sources, module list view and compiling JavaScript backend • IDE • Lookup .js files
  • 6. Module lookup • <name,version> → module or <null> • No range lookup • Set of repositories • • Local Remote • • • • File system Maven WebDav Herd • Transferring module’ bytecode bits and *dependency info* • Type of repository • Remote → Local
  • 7. Dependency info • • import org.acme.poke “1.0” Maven • • From pom.xml / via Aether • JBoss Modules • module.xml Custom jar • • module.properties • OSGi (wip) Native
  • 8. Maven trouble? • Some Maven pom.xml files are “invalid” • • Transitive dependencies / flat classpath 2nd level dep used directly ! • Fix? • • • • • Current workaround = overrides.xml Add Remove Replace Any better idea?
  • 9. Repositories configuration • • Distrib, Project, User, Cache, Herd, … Add your own • • —rep <repo config> Customise things in .ceylon/config • Default
  • 10. Module sharing? • Herd (http://modules.ceylon-lang.org/) • • • • • Upload your modules Upload permission Dependency pre-check Integrity validation check Set-up your own Herd ! • Query for modules • If supported by repository type
  • 11. Misc • • Can be used in the app; but not encouraged Language and JDK are added by default • • Yes, even JDK is a module (actually multiple modules) Logging module(s) have special treatment • • So all logs end-up at the same place — JBoss LogManager CMR is pluggable — RepositoryBuilder • CMR, Runtime, Typechecker, … are also all modules • Impl your own Repository
  • 12. Thanks! ! ajustin@redhat.com Q&A anytime

×