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

The package version must match the major tag version #1654

Merged
merged 4 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ INSTALLDIR=$(PREFIX)/bin
# This must remain the first target in this file, which is what 'make' with no
# arguments will run.
build:
go build github.com/johnkerl/miller/cmd/mlr
go build github.com/johnkerl/miller/v6/cmd/mlr
@echo "Build complete. The Miller executable is ./mlr (or .\mlr.exe on Windows)."
@echo "You can use 'make check' to run tests".

quiet:
@go build github.com/johnkerl/miller/cmd/mlr
@go build github.com/johnkerl/miller/v6/cmd/mlr

# For interactive use, 'mlr regtest' offers more options and transparency.
check: unit-test regression-test
Expand All @@ -33,25 +33,25 @@ install: build
# ----------------------------------------------------------------
# Unit tests (small number)
unit-test ut: build
go test github.com/johnkerl/miller/pkg/...
go test github.com/johnkerl/miller/v6/pkg/...

ut-lib:build
go test github.com/johnkerl/miller/pkg/lib...
go test github.com/johnkerl/miller/v6/pkg/lib...
ut-scan:build
go test github.com/johnkerl/miller/pkg/scan/...
go test github.com/johnkerl/miller/v6/pkg/scan/...
ut-mlv:build
go test github.com/johnkerl/miller/pkg/mlrval/...
go test github.com/johnkerl/miller/v6/pkg/mlrval/...
ut-bifs:build
go test github.com/johnkerl/miller/pkg/bifs/...
go test github.com/johnkerl/miller/v6/pkg/bifs/...
ut-input:build
go test github.com/johnkerl/miller/pkg/input/...
go test github.com/johnkerl/miller/v6/pkg/input/...

bench:build
go test -run=nonesuch -bench=. github.com/johnkerl/miller/pkg/...
go test -run=nonesuch -bench=. github.com/johnkerl/miller/v6/pkg/...
bench-mlv:build
go test -run=nonesuch -bench=. github.com/johnkerl/miller/pkg/mlrval/...
go test -run=nonesuch -bench=. github.com/johnkerl/miller/v6/pkg/mlrval/...
bench-input:build
go test -run=nonesuch -bench=. github.com/johnkerl/miller/pkg/input/...
go test -run=nonesuch -bench=. github.com/johnkerl/miller/v6/pkg/input/...

# ----------------------------------------------------------------
# Regression tests (large number)
Expand Down Expand Up @@ -114,7 +114,7 @@ it: build check
so: install

mlr:
go build github.com/johnkerl/miller/cmd/mlr
go build github.com/johnkerl/miller/v6/cmd/mlr

# ----------------------------------------------------------------
# Please see comments in ./create-release-tarball as well as
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ See also [building from source](https://miller.readthedocs.io/en/latest/build.ht
* To install: `make install`. This installs the executable `/usr/local/bin/mlr` and manual page `/usr/local/share/man/man1/mlr.1` (so you can do `man mlr`).
* You can do `./configure --prefix=/some/install/path` before `make install` if you want to install somewhere other than `/usr/local`.
* Without `make`:
* To build: `go build github.com/johnkerl/miller/cmd/mlr`.
* To run tests: `go test github.com/johnkerl/miller/pkg/...` and `mlr regtest`.
* To install: `go install github.com/johnkerl/miller/cmd/mlr` will install to _GOPATH_`/bin/mlr`.
* To build: `go build github.com/johnkerl/miller/v6/cmd/mlr`.
* To run tests: `go test github.com/johnkerl/miller/v6/pkg/...` and `mlr regtest`.
* To install: `go install github.com/johnkerl/miller/v6/cmd/mlr` will install to _GOPATH_`/bin/mlr`.
* See also the doc page on [building from source](https://miller.readthedocs.io/en/latest/build).
* For more developer information please see [README-dev.md](./README-dev.md).

Expand Down
2 changes: 1 addition & 1 deletion cmd/experiments/colors/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main

import (
"fmt"
"github.com/johnkerl/miller/pkg/colorizer"
"github.com/johnkerl/miller/v6/pkg/colorizer"
)

const boldString = "\u001b[1m"
Expand Down
2 changes: 1 addition & 1 deletion cmd/mlr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"
"time"

"github.com/johnkerl/miller/pkg/entrypoint"
"github.com/johnkerl/miller/v6/pkg/entrypoint"
"github.com/pkg/profile" // for trace.out
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/scan/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"os"

"github.com/johnkerl/miller/pkg/scan"
"github.com/johnkerl/miller/v6/pkg/scan"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/sizes/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
// ================================================================

/*
go build github.com/johnkerl/miller/cmd/sizes
go build github.com/johnkerl/miller/v6/cmd/sizes
*/

package main

import (
"fmt"

"github.com/johnkerl/miller/pkg/mlrval"
"github.com/johnkerl/miller/v6/pkg/mlrval"
)

func main() {
Expand Down
8 changes: 4 additions & 4 deletions docs/src/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ Two-clause BSD license [https://github.com/johnkerl/miller/blob/master/LICENSE.t
* `cd mlr-i.j.k`
* `cd go`
* `make` creates the `./mlr` (or `.\mlr.exe` on Windows) executable
* Without `make`: `go build github.com/johnkerl/miller/cmd/mlr`
* Without `make`: `go build github.com/johnkerl/miller/v6/cmd/mlr`
* `make check` runs tests
* Without `make`: `go test github.com/johnkerl/miller/pkg/...` and `mlr regtest`
* Without `make`: `go test github.com/johnkerl/miller/v6/pkg/...` and `mlr regtest`
* `make install` installs the `mlr` executable and the `mlr` manpage
* Without make: `go install github.com/johnkerl/miller/cmd/mlr` will install to _GOPATH_`/bin/mlr`
* Without make: `go install github.com/johnkerl/miller/v6/cmd/mlr` will install to _GOPATH_`/bin/mlr`

## From git clone

* `git clone https://github.com/johnkerl/miller`
* `make`/`go build github.com/johnkerl/miller/cmd/mlr` as above
* `make`/`go build github.com/johnkerl/miller/v6/cmd/mlr` as above

## In case of problems

Expand Down
8 changes: 4 additions & 4 deletions docs/src/build.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ Two-clause BSD license [https://github.com/johnkerl/miller/blob/master/LICENSE.t
* `cd mlr-i.j.k`
* `cd go`
* `make` creates the `./mlr` (or `.\mlr.exe` on Windows) executable
* Without `make`: `go build github.com/johnkerl/miller/cmd/mlr`
* Without `make`: `go build github.com/johnkerl/miller/v6/cmd/mlr`
* `make check` runs tests
* Without `make`: `go test github.com/johnkerl/miller/pkg/...` and `mlr regtest`
* Without `make`: `go test github.com/johnkerl/miller/v6/pkg/...` and `mlr regtest`
* `make install` installs the `mlr` executable and the `mlr` manpage
* Without make: `go install github.com/johnkerl/miller/cmd/mlr` will install to _GOPATH_`/bin/mlr`
* Without make: `go install github.com/johnkerl/miller/v6/cmd/mlr` will install to _GOPATH_`/bin/mlr`

## From git clone

* `git clone https://github.com/johnkerl/miller`
* `make`/`go build github.com/johnkerl/miller/cmd/mlr` as above
* `make`/`go build github.com/johnkerl/miller/v6/cmd/mlr` as above

## In case of problems

Expand Down
14 changes: 7 additions & 7 deletions docs/src/miller-as-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ package main
import (
"fmt"

"github.com/johnkerl/miller/pkg/bifs"
"github.com/johnkerl/miller/pkg/mlrval"
"github.com/johnkerl/miller/v6/pkg/bifs"
"github.com/johnkerl/miller/v6/pkg/mlrval"
)

func main() {
Expand Down Expand Up @@ -86,11 +86,11 @@ import (
"fmt"
"os"

"github.com/johnkerl/miller/pkg/bifs"
"github.com/johnkerl/miller/pkg/cli"
"github.com/johnkerl/miller/pkg/input"
"github.com/johnkerl/miller/pkg/output"
"github.com/johnkerl/miller/pkg/types"
"github.com/johnkerl/miller/v6/pkg/bifs"
"github.com/johnkerl/miller/v6/pkg/cli"
"github.com/johnkerl/miller/v6/pkg/input"
"github.com/johnkerl/miller/v6/pkg/output"
"github.com/johnkerl/miller/v6/pkg/types"
)

// Put your record-processing logic here.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/miller-as-library/main1.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"fmt"

"github.com/johnkerl/miller/pkg/bifs"
"github.com/johnkerl/miller/pkg/mlrval"
"github.com/johnkerl/miller/v6/pkg/bifs"
"github.com/johnkerl/miller/v6/pkg/mlrval"
)

func main() {
Expand Down
12 changes: 6 additions & 6 deletions docs/src/miller-as-library/main2.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"fmt"
"os"

"github.com/johnkerl/miller/pkg/bifs"
"github.com/johnkerl/miller/pkg/cli"
"github.com/johnkerl/miller/pkg/input"
"github.com/johnkerl/miller/pkg/output"
"github.com/johnkerl/miller/pkg/types"
"github.com/johnkerl/miller/v6/pkg/bifs"
"github.com/johnkerl/miller/v6/pkg/cli"
"github.com/johnkerl/miller/v6/pkg/input"
"github.com/johnkerl/miller/v6/pkg/output"
"github.com/johnkerl/miller/v6/pkg/types"
)

// Put your record-processing logic here.
Expand Down Expand Up @@ -49,7 +49,7 @@ func custom_options() *cli.TOptions {
func run_custom_processor(
fileNames []string,
options *cli.TOptions,
record_processor func (irac *types.RecordAndContext) (*types.RecordAndContext, error),
record_processor func(irac *types.RecordAndContext) (*types.RecordAndContext, error),
) error {
outputStream := os.Stdout
outputIsStdout := true
Expand Down
10 changes: 5 additions & 5 deletions docs/src/miller-as-library/main3.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"fmt"
"os"

"github.com/johnkerl/miller/pkg/cli"
"github.com/johnkerl/miller/pkg/input"
"github.com/johnkerl/miller/pkg/output"
"github.com/johnkerl/miller/pkg/transformers"
"github.com/johnkerl/miller/pkg/types"
"github.com/johnkerl/miller/v6/pkg/cli"
"github.com/johnkerl/miller/v6/pkg/input"
"github.com/johnkerl/miller/v6/pkg/output"
"github.com/johnkerl/miller/v6/pkg/transformers"
"github.com/johnkerl/miller/v6/pkg/types"
)

func convert_csv_to_json(fileNames []string) error {
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/johnkerl/miller
module github.com/johnkerl/miller/v6

// The repo is 'miller' and the executable is 'mlr', going back many years and
// predating the Go port.
Expand All @@ -7,8 +7,8 @@ module github.com/johnkerl/miller
// executable would be 'miller' not 'mlr'.
//
// So we have cmd/mlr/main.go:
// * go build github.com/johnkerl/miller/cmd/mlr
// * go install github.com/johnkerl/miller/cmd/mlr
// * go build github.com/johnkerl/miller/v6/cmd/mlr
// * go install github.com/johnkerl/miller/v6/cmd/mlr

// go get github.com/johnkerl/[email protected]
// Local development:
Expand Down
4 changes: 2 additions & 2 deletions pkg/bifs/arithmetic.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"fmt"
"math"

"github.com/johnkerl/miller/pkg/lib"
"github.com/johnkerl/miller/pkg/mlrval"
"github.com/johnkerl/miller/v6/pkg/lib"
"github.com/johnkerl/miller/v6/pkg/mlrval"
)

// ================================================================
Expand Down Expand Up @@ -947,9 +947,9 @@
// Do the bulk arithmetic on native ints not Mlrvals, to avoid unnecessary allocation.
retval := lib.UTF8Strlen(mlrvals[0].OriginalString())
for i, _ := range mlrvals {
clen := lib.UTF8Strlen(mlrvals[i].OriginalString())

Check failure on line 950 in pkg/bifs/arithmetic.go

View workflow job for this annotation

GitHub Actions / Codespell

clen ==> clean, clan
if clen < retval {

Check failure on line 951 in pkg/bifs/arithmetic.go

View workflow job for this annotation

GitHub Actions / Codespell

clen ==> clean, clan
retval = clen

Check failure on line 952 in pkg/bifs/arithmetic.go

View workflow job for this annotation

GitHub Actions / Codespell

clen ==> clean, clan
}
}
return mlrval.FromInt(retval)
Expand All @@ -962,8 +962,8 @@
// Do the bulk arithmetic on native ints not Mlrvals, to avoid unnecessary allocation.
retval := lib.UTF8Strlen(m.Head.Value.OriginalString())
for pe := m.Head.Next; pe != nil; pe = pe.Next {
clen := lib.UTF8Strlen(pe.Value.OriginalString())

Check failure on line 965 in pkg/bifs/arithmetic.go

View workflow job for this annotation

GitHub Actions / Codespell

clen ==> clean, clan
if clen < retval {

Check failure on line 966 in pkg/bifs/arithmetic.go

View workflow job for this annotation

GitHub Actions / Codespell

clen ==> clean, clan
retval = clen
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/bifs/arithmetic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/johnkerl/miller/pkg/mlrval"
"github.com/johnkerl/miller/v6/pkg/mlrval"
)

func TestBIF_plus_unary(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions pkg/bifs/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ package bifs
import (
"fmt"

"github.com/johnkerl/miller/pkg/lib"
"github.com/johnkerl/miller/pkg/mlrval"
"github.com/johnkerl/miller/pkg/types"
"github.com/johnkerl/miller/v6/pkg/lib"
"github.com/johnkerl/miller/v6/pkg/mlrval"
"github.com/johnkerl/miller/v6/pkg/types"
)

// Function-pointer type for zary functions.
Expand Down
2 changes: 1 addition & 1 deletion pkg/bifs/bits.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package bifs

import (
"github.com/johnkerl/miller/pkg/mlrval"
"github.com/johnkerl/miller/v6/pkg/mlrval"
)

// ================================================================
Expand Down
2 changes: 1 addition & 1 deletion pkg/bifs/bits_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/johnkerl/miller/pkg/mlrval"
"github.com/johnkerl/miller/v6/pkg/mlrval"
)

func TestBIF_bitcount(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/bifs/booleans.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package bifs

import (
"github.com/johnkerl/miller/pkg/mlrval"
"github.com/johnkerl/miller/v6/pkg/mlrval"
)

func BIF_logical_NOT(input1 *mlrval.Mlrval) *mlrval.Mlrval {
Expand Down
4 changes: 2 additions & 2 deletions pkg/bifs/cmp.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
package bifs

import (
"github.com/johnkerl/miller/pkg/lib"
"github.com/johnkerl/miller/pkg/mlrval"
"github.com/johnkerl/miller/v6/pkg/lib"
"github.com/johnkerl/miller/v6/pkg/mlrval"
)

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Expand Down
4 changes: 2 additions & 2 deletions pkg/bifs/collections.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strconv"
"strings"

"github.com/johnkerl/miller/pkg/lib"
"github.com/johnkerl/miller/pkg/mlrval"
"github.com/johnkerl/miller/v6/pkg/lib"
"github.com/johnkerl/miller/v6/pkg/mlrval"
)

// ================================================================
Expand Down
2 changes: 1 addition & 1 deletion pkg/bifs/collections_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/johnkerl/miller/pkg/mlrval"
"github.com/johnkerl/miller/v6/pkg/mlrval"
)

func TestBIF_length(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions pkg/bifs/datetime.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"regexp"
"time"

strptime "github.com/johnkerl/miller/pkg/pbnjay-strptime"
strptime "github.com/johnkerl/miller/v6/pkg/pbnjay-strptime"
"github.com/lestrrat-go/strftime"

"github.com/johnkerl/miller/pkg/lib"
"github.com/johnkerl/miller/pkg/mlrval"
"github.com/johnkerl/miller/v6/pkg/lib"
"github.com/johnkerl/miller/v6/pkg/mlrval"
)

const ISO8601_TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
Expand Down
2 changes: 1 addition & 1 deletion pkg/bifs/hashing.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"crypto/sha512"
"fmt"

"github.com/johnkerl/miller/pkg/mlrval"
"github.com/johnkerl/miller/v6/pkg/mlrval"
)

func BIF_md5(input1 *mlrval.Mlrval) *mlrval.Mlrval {
Expand Down
2 changes: 1 addition & 1 deletion pkg/bifs/hashing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/johnkerl/miller/pkg/mlrval"
"github.com/johnkerl/miller/v6/pkg/mlrval"
)

func TestBIF_md5(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/bifs/mathlib.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ package bifs
import (
"math"

"github.com/johnkerl/miller/pkg/lib"
"github.com/johnkerl/miller/pkg/mlrval"
"github.com/johnkerl/miller/v6/pkg/lib"
"github.com/johnkerl/miller/v6/pkg/mlrval"
)

// ----------------------------------------------------------------
Expand Down
Loading
Loading