Skip to content

Commit

Permalink
0.2.5
Browse files Browse the repository at this point in the history
tweak-readme

reduce polling frequency of BackgroundWrapper
  • Loading branch information
lihaoyi committed Jul 22, 2018
1 parent 57f4968 commit 8182e0f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
17 changes: 15 additions & 2 deletions docs/pages/1 - Intro to Mill.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pacaur -S mill
### Windows

To get started, download Mill from:
https://github.com/lihaoyi/mill/releases/download/0.2.4/0.2.4, and save it as
https://github.com/lihaoyi/mill/releases/download/0.2.5/0.2.5, and save it as
`mill.bat`.

If you're using [Scoop](https://scoop.sh) you can install Mill via
Expand Down Expand Up @@ -73,7 +73,7 @@ To get started, download Mill and install it into your system via the following
`curl`/`chmod` command:

```bash
sudo sh -c '(echo "#!/usr/bin/env sh" && curl -L https://github.com/lihaoyi/mill/releases/download/0.2.4/0.2.4) > /usr/local/bin/mill && chmod +x /usr/local/bin/mill'
sudo sh -c '(echo "#!/usr/bin/env sh" && curl -L https://github.com/lihaoyi/mill/releases/download/0.2.5/0.2.5) > /usr/local/bin/mill && chmod +x /usr/local/bin/mill'
```

### Development Releases
Expand Down Expand Up @@ -141,6 +141,8 @@ $ mill foo.compile # compile sources into classfiles

$ mill foo.run # run the main method, if any

$ mill foo.runBackground # run the main method in the background

$ mill foo.launcher # prepares a foo/launcher/dest/run you can run later

$ mill foo.jar # bundle the classfiles into a jar
Expand Down Expand Up @@ -314,12 +316,23 @@ the task as necessary when the inputs change:
```bash
$ mill --watch foo.compile
$ mill --watch foo.run
$ mill -w foo.compile
$ mill -w foo.run
```

Mill's `--watch` flag watches both the files you are building using Mill, as
well as Mill's own `build.sc` file and anything it imports, so any changes to
your `build.sc` will automatically get picked up.

For long-running processes like web-servers, you can use `.runBackground` to
make sure they re-compile and re-start when code changes, forcefully terminating
the previous process even though it may be still alive:

```bash
$ mill -w foo.compile
$ mill -w foo.runBackground
```

## Command-line Tools

Mill comes built in with a small number of useful command-line utilities:
Expand Down
15 changes: 15 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,21 @@ optimizer without classpath conflicts.

## Changelog

### 0.2.5

- Add `.runBackground` and `.runMainBackground` commands, to run something in
the background without waiting for it to return. The process will keep running
until it exits normally, or until the same `.runBackground` command is run a
second time to spawn a new version of the process. Can be used with `-w` for
auto-reloading of long-running servers.

- [Scala-Native support](http://www.lihaoyi.com/mill/page/common-project-layouts.html#scala-native-modules).
Try it out!

- Add `--disable-ticker` to reduce spam in CI

- Fix propagation of `--color` flag

### 0.2.4

- Fix resolution of `scala-{library,compiler,reflect}` in case of conflict
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static void main(String[] args) throws Exception{
public void run() {
while (true) {
try{
Thread.sleep(10);
Thread.sleep(50);
String token = new String(
java.nio.file.Files.readAllBytes(java.nio.file.Paths.get(watched))
);
Expand Down

0 comments on commit 8182e0f

Please sign in to comment.