eclipse-archived / ceylon-ide-eclipse

Eclipse Plugin for Ceylon
http://ceylon-lang.org/documentation/ide
Eclipse Public License 1.0
59 stars 28 forks source link

support multiple module repos #317

Closed gavinking closed 12 years ago

gavinking commented 12 years ago

Instead of just one external repo, you should be able to specify a list of them.

quintesse commented 12 years ago

External or local! Because right now ./modules gets wiped clean on each build which means you can't put any dependencies there, which makes it difficult to just zip up a project and give it to someone else (it would always have to contain some instructions about manually copying the modules or fixing the project link). +1 on the high priority ;)

gavinking commented 12 years ago

project/modules is an output folder. It is definitely not meant to be a module repo containing dependencies, and ceylon builder will not even look for dependencies there.

quintesse commented 12 years ago

sure, but if you are used to command line compiling you might be surprised by this behaviour. So having an extra one (at least) would fix this.

gavinking commented 12 years ago

This is now essentially done. What I still need to do is figure out how to disable the defaulting behavior the goes on where ~/.ceylon/repo gets automatically added to the build path even when we don't explicitly ask for it.

Also I suppose the UI could do with some extra polishing...

quintesse commented 12 years ago

Gavin, this is probably because of the last issue I have with the CMR. There's still one last part where it has the ~/.ceylon/repo hard-coded and there's no way (seemingly) to get rid of it. I still need to get a hold of @alesj to ask him about it.

davidfestal commented 12 years ago

Gavin, should we assign it back to you ;) ?

gavinking commented 12 years ago

@quintesse Any progress on this?

gavinking commented 12 years ago

We also need to allow you to add remote repos. I need a separate Add Remote Repo... button/popup.

gavinking commented 12 years ago

I can't figure out how to add Herd to the list of module repos using -rep.

FroMage commented 12 years ago

For reading: http://modules.ceylon-lang.org/test, for writing, we need an API.

gavinking commented 12 years ago

For reading: http://modules.ceylon-lang.org/test

I'm trying that, but it doesn't seem to be working for me.

FroMage commented 12 years ago

Oh, you have to build it as a WebDAVContentStore or something:

WebDAVContentStore rcs = new WebDAVContentStore("http://modules.ceylon-lang.org/test", log);
Repository repo = new DefaultRepository(rcs.createRoot());
gavinking commented 12 years ago

@FroMage The only code I can find that deals explicitly with this shit is the following, in CeylonBuilder.parseCeylonModel()

    TypeCheckerBuilder typeCheckerBuilder = new TypeCheckerBuilder()
        .verbose(false)
        .moduleManagerFactory(new ModuleManagerFactory(){
            @Override
            public ModuleManager createModuleManager(Context context) {
                return new JDTModuleManager(context, javaProject);
            }
        });

    List<String> repos = getUserRepositories(project);
    typeCheckerBuilder.setRepositoryManager(CeylonUtils.makeRepositoryManager(repos, 
            getCeylonModulesOutputDirectory(project).getAbsolutePath(), 
            new EclipseLogger()));
    TypeChecker typeChecker = typeCheckerBuilder.getTypeChecker();

What should this be if I repos contains the URL of remote repos?

FroMage commented 12 years ago

CeylonUtils.makeRepositoryManager should handle it. I'm going to ask @quintesse if this weirdness could be related to his recent config work.

gavinking commented 12 years ago

Closing this: the work that remains is now covered by #383, #395, and #394.