diff --git a/.github/workflows/go-test-darwin.yaml b/.github/workflows/go-test-darwin.yaml.disabled similarity index 87% rename from .github/workflows/go-test-darwin.yaml rename to .github/workflows/go-test-darwin.yaml.disabled index 1424c7b..1ee6127 100644 --- a/.github/workflows/go-test-darwin.yaml +++ b/.github/workflows/go-test-darwin.yaml.disabled @@ -3,8 +3,9 @@ name: Go test darwin on: [pull_request, workflow_dispatch] env: - DYLD_LIBRARY_PATH: /opt/senzing/g2/lib:/opt/senzing/g2/lib/macos - LD_LIBRARY_PATH: /opt/senzing/g2/lib:/opt/senzing/g2/lib/macos + DYLD_LIBRARY_PATH: /opt/senzing/er/lib:/opt/senzing/er/lib/macos + LD_LIBRARY_PATH: /opt/senzing/er/lib:/opt/senzing/er/lib/macos + SENZING_LOG_LEVEL: TRACE SENZING_TOOLS_DATABASE_URL: sqlite3://na:na@nowhere/tmp/sqlite/G2C.db permissions: @@ -42,7 +43,7 @@ jobs: senzingapi-version: ${{ matrix.senzingapi-version }} - name: Copy /etc files - run: sudo mkdir -p /opt/senzing/g2/etc && sudo cp testdata/senzing-license/g2.lic /opt/senzing/g2/etc/g2.lic + run: sudo mkdir -p /opt/senzing/er/etc && sudo cp testdata/senzing-license/g2.lic /opt/senzing/er/etc/g2.lic - name: Copy test database files run: mkdir -p /tmp/sqlite && cp testdata/sqlite/G2C.db /tmp/sqlite/ diff --git a/.github/workflows/go-test-linux.yaml b/.github/workflows/go-test-linux.yaml index ce46e6d..417ad44 100644 --- a/.github/workflows/go-test-linux.yaml +++ b/.github/workflows/go-test-linux.yaml @@ -3,7 +3,7 @@ name: Go test linux on: [push] env: - LD_LIBRARY_PATH: /opt/senzing/g2/lib + LD_LIBRARY_PATH: /opt/senzing/er/lib SENZING_LOG_LEVEL: TRACE SENZING_TOOLS_DATABASE_URL: sqlite3://na:na@nowhere/tmp/sqlite/G2C.db diff --git a/.github/workflows/go-test-windows.yaml b/.github/workflows/go-test-windows.yaml.disabled similarity index 98% rename from .github/workflows/go-test-windows.yaml rename to .github/workflows/go-test-windows.yaml.disabled index 2f55fbd..8314526 100644 --- a/.github/workflows/go-test-windows.yaml +++ b/.github/workflows/go-test-windows.yaml.disabled @@ -3,6 +3,7 @@ name: Go test windows on: [pull_request, workflow_dispatch] env: + SENZING_LOG_LEVEL: TRACE SENZING_TOOLS_DATABASE_URL: "sqlite3://na:na@nowhere/C:\\Temp\\sqlite\\G2C.db" permissions: diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml index 8c0f53a..444b398 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/golangci-lint.yaml @@ -31,20 +31,20 @@ jobs: - name: Copy Senzing headers run: | mkdir --parents ./szconfig/gohelpers - cp /opt/senzing/g2/sdk/c/*.h ./szconfig/ - cp /opt/senzing/g2/sdk/c/gohelpers/*.h ./szconfig/gohelpers + cp /opt/senzing/er/sdk/c/*.h ./szconfig/ + cp /opt/senzing/er/sdk/c/gohelpers/*.h ./szconfig/gohelpers mkdir --parents ./szconfigmanager/gohelpers - cp /opt/senzing/g2/sdk/c/*.h ./szconfigmanager/ - cp /opt/senzing/g2/sdk/c/gohelpers/*.h ./szconfigmanager/gohelpers + cp /opt/senzing/er/sdk/c/*.h ./szconfigmanager/ + cp /opt/senzing/er/sdk/c/gohelpers/*.h ./szconfigmanager/gohelpers mkdir --parents ./szdiagnostic/gohelpers - cp /opt/senzing/g2/sdk/c/*.h ./szdiagnostic/ - cp /opt/senzing/g2/sdk/c/gohelpers/*.h ./szdiagnostic/gohelpers + cp /opt/senzing/er/sdk/c/*.h ./szdiagnostic/ + cp /opt/senzing/er/sdk/c/gohelpers/*.h ./szdiagnostic/gohelpers mkdir --parents ./szengine/gohelpers - cp /opt/senzing/g2/sdk/c/*.h ./szengine/ - cp /opt/senzing/g2/sdk/c/gohelpers/*.h ./szengine/gohelpers + cp /opt/senzing/er/sdk/c/*.h ./szengine/ + cp /opt/senzing/er/sdk/c/gohelpers/*.h ./szengine/gohelpers mkdir --parents ./szproduct/gohelpers - cp /opt/senzing/g2/sdk/c/*.h ./szproduct/ - cp /opt/senzing/g2/sdk/c/gohelpers/*.h ./szproduct/gohelpers + cp /opt/senzing/er/sdk/c/*.h ./szproduct/ + cp /opt/senzing/er/sdk/c/gohelpers/*.h ./szproduct/gohelpers - name: Setup go uses: actions/setup-go@v5 diff --git a/Makefile b/Makefile index 3bdc956..12abd35 100644 --- a/Makefile +++ b/Makefile @@ -36,11 +36,11 @@ GO_ARCH = $(word 2, $(GO_OSARCH)) # Conditional assignment. ('?=') # Can be overridden with "export" -# Example: "export LD_LIBRARY_PATH=/path/to/my/senzing/g2/lib" +# Example: "export LD_LIBRARY_PATH=/path/to/my/senzing/er/lib" DOCKER_IMAGE_TAG ?= $(GIT_REPOSITORY_NAME):$(GIT_VERSION) GOBIN ?= $(shell go env GOPATH)/bin -LD_LIBRARY_PATH ?= /opt/senzing/g2/lib +LD_LIBRARY_PATH ?= /opt/senzing/er/lib # Export environment variables. @@ -174,7 +174,7 @@ coverage: coverage-osarch-specific check-coverage: export SENZING_LOG_LEVEL=TRACE check-coverage: @go test ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./... - @${GOBIN}/go-test-coverage --config=.github/coverage/.testcoverage.yaml + @${GOBIN}/go-test-coverage --config=.github/coverage/testcoverage.yaml # ----------------------------------------------------------------------------- # Documentation @@ -234,7 +234,7 @@ help: print-make-variables: @$(foreach V,$(sort $(.VARIABLES)), \ $(if $(filter-out environment% default automatic, \ - $(origin $V)),$(warning $V=$($V) ($(value $V))))) + $(origin $V)),$(info $V=$($V) ($(value $V))))) .PHONY: update-pkg-cache diff --git a/bin/macos_exec_dyld.sh b/bin/macos_exec_dyld.sh index ace01c4..6724147 100755 --- a/bin/macos_exec_dyld.sh +++ b/bin/macos_exec_dyld.sh @@ -1,6 +1,6 @@ #!/bin/zsh -export DYLD_LIBRARY_PATH=/opt/senzing/g2/lib:/opt/senzing/g2/lib/macos +export DYLD_LIBRARY_PATH=/opt/senzing/er/lib:/opt/senzing/er/lib/macos export LD_LIBRARY_PATH=${DYLD_LIBRARY_PATH} "$@" diff --git a/docs/development.md b/docs/development.md index 9044aee..3bb9ac5 100644 --- a/docs/development.md +++ b/docs/development.md @@ -21,8 +21,8 @@ These are "one-time tasks" which may already have been completed. Since the Senzing library is a prerequisite, it must be installed first. 1. Verify Senzing C shared objects, configuration, and SDK header files are installed. - 1. `/opt/senzing/g2/lib` - 1. `/opt/senzing/g2/sdk/c` + 1. `/opt/senzing/er/lib` + 1. `/opt/senzing/er/sdk/c` 1. `/etc/opt/senzing` 1. If not installed, see [How to Install Senzing for Go Development]. diff --git a/go.mod b/go.mod index d954c7d..efff546 100644 --- a/go.mod +++ b/go.mod @@ -24,13 +24,13 @@ require ( github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect - github.com/spf13/cast v1.6.0 // indirect + github.com/spf13/cast v1.7.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.6.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect - golang.org/x/sys v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/text v0.17.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index b422de0..864f408 100644 --- a/go.sum +++ b/go.sum @@ -41,8 +41,8 @@ github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9yS github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= -github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= -github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= +github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -62,12 +62,12 @@ github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8 github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa h1:ELnwvuAXPNtPk1TJRuGkI9fDTwym6AYBu0qzT8AcHdI= +golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/makefiles/linux.mk b/makefiles/linux.mk index 47dd5cb..3c1ac45 100644 --- a/makefiles/linux.mk +++ b/makefiles/linux.mk @@ -4,7 +4,7 @@ # Variables # ----------------------------------------------------------------------------- -LD_LIBRARY_PATH ?= /opt/senzing/g2/lib +LD_LIBRARY_PATH ?= /opt/senzing/er/lib SENZING_TOOLS_DATABASE_URL ?= sqlite3://na:na@nowhere/tmp/sqlite/G2C.db PATH := $(MAKEFILE_DIRECTORY)/bin:/$(HOME)/go/bin:$(PATH) @@ -46,7 +46,7 @@ documentation-osarch-specific: .PHONY: docker-build-osarch-specific docker-build-osarch-specific: - @docker build \ + @$(DOCKER_BUILDKIT) docker build \ --tag $(DOCKER_IMAGE_NAME) \ --tag $(DOCKER_IMAGE_NAME):$(BUILD_VERSION) \ . @@ -61,8 +61,8 @@ hello-world-osarch-specific: package-osarch-specific: docker-build-package @mkdir -p $(TARGET_DIRECTORY) || true @CONTAINER_ID=$$(docker create $(DOCKER_BUILD_IMAGE_NAME)); \ - docker cp $$CONTAINER_ID:/output/. $(TARGET_DIRECTORY)/; \ - docker rm -v $$CONTAINER_ID + @docker cp $$CONTAINER_ID:/output/. $(TARGET_DIRECTORY)/; \ + @docker rm -v $$CONTAINER_ID .PHONY: run-osarch-specific diff --git a/package.Dockerfile b/package.Dockerfile index c9b9a1d..bd18bec 100755 --- a/package.Dockerfile +++ b/package.Dockerfile @@ -37,8 +37,8 @@ COPY . ${GOPATH}/src/${GO_PACKAGE_NAME} # Copy files from prior stage. -COPY --from=senzingapi_runtime "/opt/senzing/g2/lib/" "/opt/senzing/g2/lib/" -COPY --from=senzingapi_runtime "/opt/senzing/g2/sdk/c/" "/opt/senzing/g2/sdk/c/" +COPY --from=senzingapi_runtime "/opt/senzing/er/lib/" "/opt/senzing/er/lib/" +COPY --from=senzingapi_runtime "/opt/senzing/er/sdk/c/" "/opt/senzing/er/sdk/c/" # Build go program.