Skip to content

Releases: com-lihaoyi/os-lib

0.10.7

11 Sep 00:56
Compare
Choose a tag to compare

Merged Pull Requests

  • Allow even more dynamic instrumentation of pwd via os.dynamicPwdFunction by @lihaoyi in #299
  • Allow multiple segments in Stringliterals by @pawelsadlo in #297
  • Update error messages to allow better error messages for invalid path segments by @lihaoyi in #301
  • Make use of concise literal paths everywhere by @lihaoyi in #302
  • Update mima comparison versions by @lihaoyi in #303

New Contributors

Full Changelog: 0.10.6...0.10.7

0.10.7-M2

10 Sep 11:19
4262d5c
Compare
Choose a tag to compare
0.10.7-M2 Pre-release
Pre-release
Allow multiple segments in Stringliterals (#297)

This PR adds support for multi-segment literal strings.
for example
```scala
val path = root / "foo/bar" 
val qux = "qux"
val path = root / "foo/bar" / "baz" / qux
val path = root / "foo/bar" / "baz/qux"
```
it also parses `..` segments from literal as `os.up` enabling syntax
like:
```scala
val path = root / "foo" / ".." / "bar" // equivalent to `root / "foo" / os.up / "bar"`
val path = root / "foo" /  "../bar" // equivalent to `root / "foo" / os.up / "bar"`
```
non-canonical paths used in literals result in compile-time errors,
suggesting usage of canonical paths or removing path segment, eg.
```scala
val path = root / "foo/./bar" //suggests "foo/bar"
val path = root / "foo//bar" //suggests "foo/bar"
val path = root / "//foo//bar/./baz" //suggests "foo/bar/baz"

val path = root / ""  //suggests removing the segment
val path = root / "." //suggests removing the segment
val path = root / "/" //suggests removing the segment
val path = root / "//" //suggests removing the segment
val path = root / "/./" //suggests removing the segment

```

Note:
Its not usable in os-Lib itself, due to the fact that it would lead to
macro expansion in the same compilation unit as its definition.

@lihaoyi 
there is a little bit of hacking involved:

1. There is a default implicit conversion not being a macro to be used
within os library, without this we would have to add a submodule and
split the whole project, I'm not even sure if its doable.
4. Needed to turn off acyclic in `Path` and particular `Macro` files
(also needed to mock `acyclic.skipped` in case of `scala 3`).
5. Needed to provide another implicit conversion in `ViewBoundImplicit`
trait because macros turn out to be not avaliable as implicit views,
this is needed for `ArrayPathChunk` and `SeqPathChunk` to work.

0.10.7-M1

07 Sep 11:25
5561ad6
Compare
Choose a tag to compare
0.10.7-M1 Pre-release
Pre-release
Allow even more dynamic instrumentation of `pwd` via `os.dynamicPwdFu…

…nction` (#299)

Follow up to https://github.com/com-lihaoyi/os-lib/pull/298, which it
turns out was not flexible enough to do what we need in Mill. Mill uses
references to the `pwd` to create the `.dest` folder lazily, thus we
cannot just assign a value to the `os.pwd` but actually need to assign a
lambda that can be replaced to implement the lazy evaluation

I pulled the trigger too quickly on releasing 0.10.6 with
`os.dynamicPwd`, so this one has to be named differently. I chose
`os.dynamicPwdFunction` and will make sure to test it with an unstable
release before releasing a stable tag

0.10.6

07 Sep 10:13
Compare
Choose a tag to compare

Merged Pull Requests

  • Make os.pwd modifiable via the os.pwd0 dynamic variable by @lihaoyi in #298

Full Changelog: 0.10.5...0.10.6

0.10.5

30 Aug 20:19
Compare
Choose a tag to compare

Merged Pull Requests

Full Changelog: 0.10.4...0.10.5

0.10.4

19 Aug 23:26
Compare
Choose a tag to compare

Merged Pull Requests

New Contributors

Full Changelog: 0.10.3...0.10.4

0.10.3

20 Jul 13:57
Compare
Choose a tag to compare

Merged Pull Requests

Full Changelog: 0.10.2...0.10.3

0.10.2

30 May 11:03
c984ddf
Compare
Choose a tag to compare

Merged Pull Requests

Full Changelog: 0.10.1...0.10.2

0.10.1

18 May 06:31
Compare
Choose a tag to compare

Merged Pull Requests

New Contributors

Full Changelog: 0.10.0...0.10.1

0.10.0

15 Apr 00:50
Compare
Choose a tag to compare

Merged Pull Requests

New Contributors

Full Changelog: 0.9.3...0.10.0