sourcegraph / srclib

srclib is a polyglot code analysis library, built for hackability. It consists of language analysis toolchains (currently for Go and Java, with Python, JavaScript, and Ruby in beta) with a common output format, and a CLI tool for running the analysis.
https://srclib.org
Other
942 stars 62 forks source link

Windows support #149

Open pauljz opened 9 years ago

pauljz commented 9 years ago

It'd be great to have Windows support in srclib for cross-platform editors.

Go itself supports Windows just fine, so most of the fixes that need to take place for this are oriented around taking advantage of Go's standard library. Most of the fixes are really simple things:

There are some more complex issues:

I've started on some fixes for a lot of these issues and will put a PR together soon once I'm sure the tests pass. I'll probably need a lot of help from folks that are more experienced with the srclib ecosystem, since this is all new to me.

dmitshur commented 9 years ago

Hey @pauljz,

Windows support sounds great! The easy parts like using filepath.SplitList should definitely be done regardless, since it's more correct. I've recently made a PR https://github.com/sourcegraph/srclib-go/pull/35 to fix some of those. There are likely more things like that remaining.

I don't have a Windows machine to test on, but I can try to assist in other ways. I'll keep an eye on this and help review your future PRs.

pauljz commented 9 years ago

This round of changes should be ready to review now, @shurcooL. I took out the changes to toolchain_cmd that were breaking the build, changed all refs to os.PathSeparator to filepath.Separator for consistency, and changed erroneous path.Joins to filepath.Joins.

Travis build passes, all tests pass locally now on OS X for me. Windows tests... well, still a long way to go there, but it's better than it was.