question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does Buck support Scala?

See original GitHub issue

Looking through the source code, I noticed several references to scala_library(), and using it in my BUCK file seems to work (except it asks me to specify a Scala library dependency). However, there does not seem to be any reference to Scala at all on the documentation site. Does this library support Scala or am I missing something?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Nickersoftcommented, Jan 23, 2018

@kageiit Oh wow, my bad. I forgot to include the mvn: prefix this time around, but in my original code I had it in and still got an error. I added the prefix back to my URLs and updating the hashes to rule out hash errors I still get an error:

Unable to download: mvn:org.scala-lang:scala-library-all:pom:2.12.4
Build failed: Command failed with exit code -1.
    When running <curl>.
    When building rule //:scala-library-source.

And like before, here’s the v8 output.

It would appear it’s checking for the existence of http://central.maven.org/maven2/org/scala-lang/scala-library-all/2.12.4/scala-library-all-2.12.4-pom.jar, which doesn’t exist. However, http://central.maven.org/maven2/org/scala-lang/scala-library-all/2.12.4/scala-library-all-2.12.4.pom does exist, which Gradle still seems to be able to understand despite Buck failing to.

I actually just did a check and changed my task to:

remote_file(
    name = 'scala-library-source',
    out = 'scala-library-source.jar',
    url = 'mvn:org.scala-lang:scala-library:jar:2.12.4',
    sha1 = '7663f74ef944453c86cc7e6597ed33e9281f6412',
)

and it seems to work now… I’m not super familiar with how pom files are handled, so I guess I’ll just ignore it. Anyway, I’ll close this for now seeing it seems to be working and I’ll look into updating the docs.

0reactions
kageiitcommented, Jan 22, 2018

@Nickersoft the remote file url seems incorrect

according to https://buckbuild.com/rule/remote_file.html , you need a mvn: prefix before your maven coordinates

Read more comments on GitHub >

github_iconTop Results From Across the Web

ScalacStep - Buck
Returns the environment variables to include when running this ShellStep . By default, this method returns an empty map. Overrides: getEnvironmentVariables in ...
Read more >
Gerrit Code Review - Building with Buck
It is safe to run several buck daemons started from different project directories and they will not interfere with each other. Buck's documentation...
Read more >
sbt Reference Manual — Combined Pages
Supports testing with ScalaCheck, specs, and ScalaTest. JUnit is supported by a plugin. Starts the Scala REPL with project classes and dependencies on...
Read more >
Buck (software) - Wikipedia
It supports C++ (Objective-C, Swift), Shell, Java (Kotlin, Groovy), Python, Lua, OCaml, Rust, Go and other languages as source code input. It can...
Read more >
Pants
Pants 2 is a fast, scalable, user-friendly build system for codebases of all ... Java, Scala, Kotlin, Shell, and Docker, with support for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found