Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sbt Getting Started guide #306

Merged
merged 25 commits into from
Jan 3, 2017
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename "configuration" to "dependency configuration"
eed3si9n committed Dec 30, 2016
commit f16cba9c6247d4e3c2d164bbb0275a208990eed9
20 changes: 10 additions & 10 deletions src/reference/00-Getting-Started/06-Scopes.md
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ context, called a "scope."

Some concrete examples:

- if you have multiple projects in your build definition, a key can
- if you have multiple projects (also called subprojects) in your build definition, a key can
have a different value in each project.
- the `compile` key may have a different value for your main sources and
your test sources, if you want to compile them differently.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A code example up here somewhere would be useful. I read through pretty much the whole page here wondering how I specified a scope. Some of the content in the "Referring to scopes in a build definition" section would be great to move up towards the top.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also making those examples more real, as @lihaoyi suggested elsewhere, would be way better than ones that are "pointless! just an example".

@@ -54,11 +54,11 @@ keys).

There are three scope axes:

- Projects
- Configurations
- Subprojects
- Dependency configurations
- Tasks

#### Scoping by project axis
#### Scoping by subproject axis

If you [put multiple projects in a single build][Multi-Project], each
project needs its own settings. That is, keys can be scoped according to
@@ -69,10 +69,10 @@ to the entire build rather than a single project. Build-level settings
are often used as a fallback when a project doesn't define a
project-specific setting.

#### Scoping by configuration axis
#### Scoping by dependency configuration axis

A *configuration* defines a flavor of build, potentially with its own
classpath, sources, generated packages, etc. The configuration concept
A *dependency configuration* defines a graph of library dependencies, potentially with its own
classpath, sources, generated packages, etc. The dependency configuration concept
comes from Ivy, which sbt uses for
managed dependencies [Library Dependencies][Library-Dependencies], and from
[MavenScopes](https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope).
@@ -84,8 +84,8 @@ Some configurations you'll see in sbt:
- `Runtime` which defines the classpath for the `run` task.

By default, all the keys associated with compiling, packaging, and
running are scoped to a configuration and therefore may work differently
in each configuration. The most obvious examples are the task keys
running are scoped to a dependency configuration and therefore may work differently
in each dependency configuration. The most obvious examples are the task keys
`compile`, `package`, and `run`; but all the keys which *affect* those keys
(such as `sourceDirectories` or `scalacOptions` or `fullClasspath`) are also
scoped to the configuration.
@@ -182,7 +182,7 @@ For more details, see [Interacting with the Configuration System][Inspecting-Set

### Inspecting scopes

In sbt's interactive mode, you can use the inspect command to understand
In sbt shell, you can use the `inspect` command to understand
keys and their scopes. Try `inspect test:fullClasspath`:

```