It's all about the answers!

Ask a question

How to provide easy access to open source code for external tools and sites?


Chris McGee (50511117) | asked May 25 '13, 3:01 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
I am interested in making my project's source code easily retrievable by various external packaging tools.

For instance, the Go language has a tool that scans your source code for dependencies crafted in a certain form (e.g. 'import "github.com/johndoe/mylib"' and automatically downloads them from various source code hosting sites on the internet. Other languages and development frameworks have similar capabilities.

There are also cases where other websites can crawl and index the source code from popular open source hosting websites on the internet (e.g. http://godoc.org).

It would be great if jazzhub could provide some kind of unauthenticated access to the latest source code for an open project for these kinds of purposes. It might also help to increase general awareness of this site.

Thanks,
Chris

One answer



permanent link
Scott Rich (57136) | answered May 25 '13, 4:04 p.m.
JAZZ DEVELOPER
Hey Chris, interesting idea.  Can you say more about how these tools access the code for a project?  We're evaluating our options for providing Guest access to source code.

Thanks,
Scott

Comments
Chris McGee commented May 25 '13, 4:36 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

Hi Scott,

The "go get" tool relies on a certain naming convention (e.g. import "github.com/johndoe/mylib"). The first part is the internet site The second is the username of the project owner. Finally, the last part is the project name.

Go get will probe for git/svn/bazaar repos if the first segment of the import is of the form "github.com" or "jazz.net." To do this it relies on the CLI tool for each of the scm systems (skipping any that are not installed on your system) with some built-in knowledge of the correct command-line options to use. If a ping is successful then it knows the command-line options to pull down the code for each type of scm, again relying on launching the cli tool for the scm system.

I'm not sure if this will fit very well with RTC SCM at the moment because there's no way to download directly from a stream (not a repo workspace) using the CLI. There was some prototype work done recently to provide a zip/tar download option from the SCM web UI that could be beneficial but I don't know if it has made it into a an RTC release yet. In any case authenticated accss is required.


McQ Wilson commented May 26 '13, 3:51 p.m.
FORUM ADMINISTRATOR

 re "I'm not sure if this will fit very well with RTC SCM..."


One possibility we could look at is using the workspace built by the JazzHub development tools as the source for what is being scanned. This is similar to what the "vmc" support at JazzHub does today.

You could do a client side (browser) version of this now, I'm pretty sure, based on the underlying Orion file system plug-in.


Chris McGee commented May 27 '13, 9:03 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

I'm definitely interesting in learning more about this "vmc" support. It would be great if I could propose a patch to the standard "go get" tool to let people download source from JazzHub.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.