Giter Site home page Giter Site logo

sbt / website Goto Github PK

View Code? Open in Web Editor NEW
77.0 77.0 340.0 16.92 MB

The source for scala-sbt.org

Home Page: https://www.scala-sbt.org/

License: Apache License 2.0

Scala 29.41% JavaScript 15.24% CSS 28.12% HTML 2.31% Python 9.21% Shell 0.06% StringTemplate 10.44% MDX 5.21%

website's Introduction

CI Latest version Discord

sbt

sbt is a build tool for Scala, Java, and more.

For general documentation, see https://www.scala-sbt.org/.

sbt 1.x

This is the 1.x series of sbt. The source code of sbt is split across several GitHub repositories, including this one.

  • sbt/io hosts sbt.io module.
  • sbt/librarymanagement hosts sbt.librarymanagement module that wraps Ivy.
  • sbt/zinc hosts Zinc, an incremental compiler for Scala.
  • sbt/sbt, this repository hosts modules that implements the build tool.

Other links

  • Setup: Describes getting started with the latest binary release.
  • FAQ: Explains how to get help and more.
  • sbt/sbt-zero-seven: hosts sbt 0.7.7 and earlier versions

Issues and Pull Requests

Please read CONTRIBUTING carefully before opening a GitHub Issue.

The short version: try searching or asking on StackOverflow.

license

See LICENSE.

website's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

website's Issues

Broken link in Organizing Build page

If you go the the Organizing Build page, and ctrl+f for "ld is to define one-off auto plugins in" The link to auto plugins is broken. What is this supposed to point to? I can submit a pull request with it fixed if someone can tell me where it's supposed to go.

confusing documentation about sbt axises

here http://www.scala-sbt.org/0.13.5/docs/Getting-Started/Scopes.html some descriptions are very confusing.

In particular it took me long time to undestand that in

{<build-uri>}<project-id>/config:intask::key

I should choose between config or intask and then add ::key
I think one or two examples like:

fooproject/config::name
fooproject/intask::bartask

will resolve the problem.
In my case confusing parts appeared because I got used to the notion that I operate with sbt as if I operate with scala-code. But in case of project/axis::key notation I operate just with some sbt-specific command syntax that is not code. I think it should be highlighted in the beginning that we are dealing with some special notation and axises here do not mean some scala traits (like I thought in the beginning) but a part of sbt console commands.

version switch

Any improvement on this front would be great

problem 1

When you get to 0.13.5 from Google for example http://www.scala-sbt.org/0.13.5/docs/Getting-Started/Welcome.html, 0.13 isn't on the version switch menu.
0.13 should be at the top, and it should navigate to http://www.scala-sbt.org/0.13/tutorial/ if you're on Getting Started guide; http://www.scala-sbt.org/0.13/docs/ otherwise.

problem 2

If you can jump to the corresponding page on 0.13 that'll be cool. I think there are some redirects that I generated.

problem 3

When you are on 0.13 tutorial or reference, version switch control is not displayed.
Again, I think it's ok for the first round to jump to the index page.

notes

Here are the stuff to fix

segfault while installing sbt via apt-get

This issue was initially posted to sbt/sbt: sbt/sbt#1883

The documentation says to run the following commands to install on ubuntu

echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-get update
sudo apt-get install sbt

If you do that, then you will get the following crash.

NV\sowen@kafka01:~$ echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
...
...
NV\sowen@kafka01:~$ sudo apt-get update
NV\sowen@kafka01:~$ sudo apt-get install sbt
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  sbt
0 upgraded, 1 newly installed, 0 to remove and 24 not upgraded.
Need to get 1,041 kB of archives.
After this operation, 1,224 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  sbt
Install these packages without verification? [y/N] y
E: Method https has died unexpectedly!
E: Sub-process https received a segmentation fault.

Downloading the deb-file manually and installing with dpkg works fine. See:
http://stackoverflow.com/questions/13711395/install-sbt-on-ubuntu/13718915#13718915
http://stackoverflow.com/questions/28543911/sbt-install-failure-with-aptitude-on-ubuntu-14-04

Either the documentation should be updated, or a key should be included with the package.

Answer to original bug from jsuereth:

It looks like bintray recently starting having issues with HTTPs. Suprised it's a segfault. In any case, please reopen this against sbt/website.

Credentials best practice

https://github.com/sbt/website/blame/master/src/reference/02-DetailTopics/03-Dependency-Management/05-Publishing.md#L72 states that ~/.ivy2/.credentials is the preferred way to specify credentials. I disagree, at least as long as it doesn't clarify how to specify different credentials for multiple hosts.

IMHO the recommendation should be to put credentials in ~/.sbt/0.13/per-user-per-organization-credentials.sbt files like so:

credentials += Credentials("My realm", "some.host", "user", "password")

The recommendation to put credential settings (e.g. credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")) into projects should also be discouraged. The reason being different projects being published to different artifact repositories an the Ivy credentials file being not flexible enough.

Does it make sense or am I missing something?

Opinion: TOC on the side rather than bottom

I found having the TOC on the right side in the old docs format much easier to navigate than having to scroll to the bottom of each page. It was also easier to keep track of where one was when jumping between sections. Not sure if Pamflet supports it, but having a more "Sphinx-style" TOC would improve usability in my opinion.

Expand on how sbt shell parses input

After some trial and error I understood a part of how the sbt shell parses scoped keys, which I didn't understand from the docs and, therefore, I think should be expanded upon.

Given (this was using sbt 0.13.7)

lazy val root = project aggregate core
lazy val core = project

here I'm getting the wrong answer because I'm asking the question wrong:

> test::publishArtifact
[info] core/*:test::publishArtifact
[info]     true
[info] root/*:test::publishArtifact
[info]     true

when I should be asking

> test:publishArtifact
[info] core/test:publishArtifact
[info]     false
[info] root/test:publishArtifact
[info]     false

Note, I was only able to understand because I was using a multi-module setup, which showed core/*:test::publishArtifact, which isn't what I was after. In a single module setup this would have just shown true.

Install via https

It would be nice to revert 801b238

We should investigate what the problem is and either fix the instructions or report the issue to bintray if that's where the problem is

Make SBT_OPS information page in Getting Started

We (cc @takezoux2 ) see common mistakes of sbt beginners who don't set SBT_OPS in our regular Scala meetups. Then, as you imagine, their sbt immediately run out of memory.

This is because recommended SBT_OPS setting was only written in Installing sbt manually page among Getting Started with sbt pages, while it should be relevant for all ways of installation (at least homebrew's). So people who have installed sbt in homebrew rarely see Installing sbt manually page and often misses SBT_OPS.

So we propose to make "recommended sbt options" page separate from Installing sbt manually, or put SBT_OPS information to all Installing sbt xxx pages.

If it's OK for you, we're happy to send pull requests as well.

StackOverflowException in MarkdownParser when running sbt under Java 8.

As of 7f98941, running makeSite causes a StackOverflowException in:

com.tristanhunt.knockoff.ChunkParser$$anon$1.findEnd(MarkdownParsing.scala:270)

Obviously not really a bug in the documentation, but logging since the docs can't be built until fixed.

Top of the stack trace:

java.lang.StackOverflowError
    at java.util.regex.Pattern.compile(Pattern.java:1683)
    at java.util.regex.Pattern.<init>(Pattern.java:1351)
    at java.util.regex.Pattern.compile(Pattern.java:1028)
    at scala.util.matching.Regex.<init>(Regex.scala:153)
    at scala.collection.immutable.StringLike$class.r(StringLike.scala:224)
    at scala.collection.immutable.StringOps.r(StringOps.scala:31)
    at scala.collection.immutable.StringLike$class.r(StringLike.scala:213)
    at scala.collection.immutable.StringOps.r(StringOps.scala:31)
    at com.tristanhunt.knockoff.ChunkParser$$anon$1.findEnd(MarkdownParsing.scala:261)
    at com.tristanhunt.knockoff.ChunkParser$$anon$1.findEnd(MarkdownParsing.scala:270)
    at com.tristanhunt.knockoff.ChunkParser$$anon$1.findEnd(MarkdownParsing.scala:270)
    at com.tristanhunt.knockoff.ChunkParser$$anon$1.findEnd(MarkdownParsing.scala:270)

Linux downloads not shown

I was just told that there exists an architecture switch on the download page. This doesn't seem to work on Linux (Debian 8, Iceweasel/Firefox 38). Inspecting the page, all platforms are greyed out instead of showing the Linux bit.

screenshot from 2016-03-09 00 01 30

Info from http://mybrowserinfo.com:

Your Browser User Agent String is Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.6.1
Operating System:
    Linux
Platform:
    UNIX
Internet Browser:
    Firefox 38.0

Put the recommended platform installers on the download page

I use Linux, so the current download instructions on http://www.scala-sbt.org/download.html are fine for me, but I think the other recommended platform installers should be front and center on this page as well. They should be above the fold when browsing the page on a common desktop resolution.

I realize the links are available as part of the docs (http://www.scala-sbt.org/0.13/docs/Setup.html), but linking directly to the Windows, OSX, and Linux install instructions would make for a better UX (a few less clicks and scrolling).

Search box

  • Sitemap
  • Search box UI that limits the search to /0.13/*/

Missing docs for ProjectRef & RootProject

I don't see ProjectRef or RootProject mentioned anywhere in the documentation. A good place to include these docs might be in the section for multi-project builds.

I have a lot of questions about how to setup multi-project builds as our codebase grows larger. Should we put our entire codebase in a single SBT build split amongst standard SBT sub-projects? Or should we make each library it's own SBT project and wire them all together with ProjectRef external references?

Dependency document should be enhanced

Dependency document should be enhanced.
What does it means (groupId, artifactId, and revision)

How's different between sbt dependency and the MVN repository.

ps .
I would like to add some more introduction to explain this.

Example in reference manual does not compile

package sbthello

import sbt._
import Keys._

object HelloPlugin3 extends AutoPlugin {
  object autoImport {
    val greeting = settingKey[String]("greeting")
  }
  import autoImport._
  override def trigger = allRequirements
  override lazy val buildSettings = Seq(
    greeting := "Hi!",
    commands += helloCommand)
  lazy val helloCommand =
    Command.command("hello") { (state: State) =>
      println(greeting.value)
      state
    }
}

error:

/home/richard/workspace/sbt-issues/HelloPlugin3.scala:17: `value` can only be used within a task or setting macro, such as :=, +=, ++=, Def.task, or Def.setting.
[error]       println(greeting.value)

/home/richard/workspace/sbt-issues/project/build.properties:

sbt.version=0.13.8

http://paste.ubuntu.com/11803979/

Def.sequential example doesn't compile

The docs for Def.sequential don't compile.

[error] /home/bmccann/src/play-multidomain-seed/project/Common.scala:23: not found: value sideEffect0
[error] sideEffect0 := {
[error] ^
[error] /home/bmccann/src/play-multidomain-seed/project/Common.scala:28: not found: value sideEffect1
[error] sideEffect1 := {
[error] ^
[error] /home/bmccann/src/play-multidomain-seed/project/Common.scala:33: not found: value foo
[error] foo := Def.sequential(compile in Compile, sideEffect0, sideEffect1, test in Test).value
[error] ^
[error] three errors found
error Compilation failed

HelloPlugin3 example does not compile

The HelloPlugin3 in 02-Plugins.md contains this code:

  lazy val helloCommand =
    Command.command("hello") { (state: State) =>
      println(greeting.value)
      state
    }

It calls .value on the SettingKey greeting outside of a task or setting macro. I've done something similar in my own plugin which gave me the following compile error:

`value` can only be used within a task or setting macro, such as :=, +=, ++=, Def.task, or Def.setting

So I guess this example also does not compile.

What would be an idiomatic way to implement helloCommand? Maybe like this:

  lazy val helloCommand =
    Command.command("hello") { (state: State) =>
      println(Project.extract(state).get(greeting))
      state
    }

?

Error in docs for "Running commands"

On this page, in section Pass arguments to a command or task in batch mode, the docs give the following example:

$ sbt 'project X' clean '~ compile'

But this is wrong. Instead, the example should read:

$ sbt "project X" clean "~ compile"

That is, the single quotes should be replaced with double quotes.

I've tested this on both Windows and Linux, and only double quotes work.

PDF

Some people really really want PDF - https://twitter.com/bhaskar_vk/status/473117421067591681

This was one of the things I added to Pamflet, so I should be able to do it fairly quickly at least on my machine. Jenkins would require pandoc, but it would also require nanoc etc that I started using too.

Extend Tags docs to include the tags SettingsKey

In our project we have a bunch of tests that can run in parallel and a whole bunch that cannot. To split these out we've created a custom scope and ran them with parallelExecution := false.

This worked great as long as we had a simple project, but the moment we went to a multi-module troubles kicked in because we couldn't assure that test tasks from the different projects were not running in parallel.

After a lot of digging through the sbt source in combination with the ParallelExecution page I found out that I could create a custom tag and tie it to my custom scope with the tag SettingsKey.

Let's say it wasn't a pleasant experience and it would be very useful if this awesome feature could be documented on the website. I'm sure many ppl are running into this in large projects that contain integration tests.

nav is slightly irritating

In a reasonably-sized browser window the "go left" and "go right" regions take up about 25% of the width of the window and it's really easy to click over to the next or previous page as you're mousing around. At least for me; I do it every single time I look at the doc. What would you think about maybe just making the buttons hot instead of the entire margin?

local toc

There should be an ability to show toc for the current section.
This could bring in Getting Started Guide into the main doc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.