bazelbuild / rules_gwt

Bazel rules for GWT
Apache License 2.0
19 stars 14 forks source link

Classpath construction is not portable #5

Open davido opened 7 years ago

davido commented 7 years ago

This line:

   ":".join([dep.path for dep in all_deps]),

would produce claspath that will not work on Windows. It should be ";" on this platform.

I have the same issue in Gerrit build: [1].

[1] https://github.com/GerritCodeReview/gerrit/blob/master/tools/bzl/gwt.bzl#L149

ekuefler commented 7 years ago

Makes sense. Do you know if Skylark provides us any easy way to check which platform we're on?

davido commented 7 years ago

I havn't found it yet. There is os attribute in repository_ctx, but it looks like it's only exposed in repository rule, that doesn't help us:

/** A Skylark structure to deliver information about the system we are running on. */
@Immutable
@SkylarkModule(
  name = "repository_os",
  category = SkylarkModuleCategory.NONE,
  doc = "Various data about the current platform Bazel is running on."
)
final class SkylarkOS {
[...]