Skip to content

Commit 26ca2c9

Browse files
authored
major: first v0.3.0 release PR (#220)
This PR lays the foundation for the next iteration of the library, `v0.3.0`, as it introduces some breaking changes to the current API. ## Revert to single Go module In terms of UX, the library reverts back to being a single Go module, rather than continuing along the path of a monorepo of multiple Go modules. This move introduces multiple benefits, such as: - Easier discoverability of packages within the lib, as they are imported with the same `go get`, - Easier experience in development and release of updated, especially minor dependency updates. The potential downside of this move is the introduction of more transient dependencies for consumers; however, the Go compiler already handles the removal of dependencies in the dependency graph that are not used/referenced during compilation. ## Minimum version Go 1.21 The library does rely by a pretty good margin on generics, especially when it comes to the core packages (e.g. `aggregate`, `message`, etc.) With Go 1.21, the ergonomics around generics usage has increased considerably, therefore we now target that specific API version. ## More functional constructors Connected to the previous point, to increase the UX for consumers of the library, we expect that many of the `struct` components with previously exported fields will now have _private_ fields and require a functional constructor, i.e. `func NewComponent()`. The reason for this change is that generics type inference works much better on functions than it does on direct `struct` instancing.
1 parent 9540ad1 commit 26ca2c9

118 files changed

Lines changed: 3063 additions & 3190 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/setup-go/action.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/actions/setup-golangci-lint/action.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,15 @@
1+
---
12
# To get started with Dependabot version updates, you'll need to specify which
23
# package ecosystems to update and where the package manifests are located.
34
# Please see the documentation for all configuration options:
45
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
56

67
version: 2
78
updates:
8-
# Maintain dependencies for Go
99
- package-ecosystem: "gomod"
10-
directory: "/core"
11-
schedule:
12-
interval: "weekly"
13-
- package-ecosystem: "gomod"
14-
directory: "/oteleventually"
15-
schedule:
16-
interval: "weekly"
17-
- package-ecosystem: "gomod"
18-
directory: "/postgres"
19-
schedule:
20-
interval: "weekly"
21-
- package-ecosystem: "gomod"
22-
directory: "/serdes"
10+
directory: "/"
2311
schedule:
2412
interval: "weekly"
25-
26-
# Maintain dependencies for GitHub Actions
2713
- package-ecosystem: "github-actions"
2814
directory: "/"
2915
schedule:
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1+
---
2+
name: Release
3+
14
on: workflow_dispatch
25

36
concurrency:
47
group: ${{ github.workflow }}-${{ github.ref }}
58
cancel-in-progress: true
69

7-
name: release-please
10+
permissions: read-all
11+
812
jobs:
9-
release-please:
13+
run:
1014
runs-on: ubuntu-latest
1115
permissions:
1216
contents: write
1317
pull-requests: write
1418
steps:
15-
- name: Release
19+
- name: Run release-please
1620
uses: google-github-actions/release-please-action@v4
1721
with:
1822
include-component-in-tag: true

.github/workflows/lint.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
name: Lint
3+
4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
6+
cancel-in-progress: true
7+
8+
on: # yamllint disable-line rule:truthy
9+
pull_request:
10+
branches:
11+
- main
12+
push:
13+
branches:
14+
- main
15+
16+
permissions: read-all
17+
18+
jobs:
19+
go:
20+
name: Go
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
pull-requests: write
25+
steps:
26+
- name: Checkout source code
27+
uses: actions/checkout@v4
28+
- name: Set up Go
29+
uses: actions/setup-go@v5
30+
with:
31+
go-version: '1.21'
32+
- name: Run golangci-lint
33+
uses: golangci/golangci-lint-action@v4
34+
with:
35+
args: --timeout=5m
36+
37+
super-linter:
38+
name: Super Linter
39+
runs-on: ubuntu-latest
40+
permissions:
41+
contents: read
42+
packages: read
43+
statuses: write
44+
steps:
45+
- name: Checkout source code
46+
uses: actions/checkout@v4
47+
with:
48+
# Full git history is needed to get a proper
49+
# list of changed files within `super-linter`
50+
fetch-depth: 0
51+
- name: Run super-linter
52+
uses: super-linter/super-linter@v6
53+
env:
54+
VALIDATE_ALL_CODEBASE: false
55+
DEFAULT_BRANCH: main
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
# Linters are on the top-level of the repository.
58+
LINTER_RULES_PATH: ./
59+
# Go is made out of copy-paste, forget this one.
60+
VALIDATE_JSCPD: false
61+
# NOTE: using Buf as linter, which is not supported by SuperLinter.
62+
VALIDATE_PROTOBUF: false
63+
# NOTE: super-linter has quite poor support for golangci-lint.
64+
# We use the official linter action for it instead.
65+
VALIDATE_GO: false
66+
VALIDATE_GO_MODULES: false

.github/workflows/main.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Test
3+
4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
6+
cancel-in-progress: true
7+
8+
on: # yamllint disable-line rule:truthy
9+
pull_request:
10+
branches:
11+
- main
12+
push:
13+
branches:
14+
- main
15+
16+
permissions: read-all
17+
18+
jobs:
19+
go:
20+
name: Go
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout source code
24+
uses: actions/checkout@v4
25+
- name: Set up Go
26+
uses: actions/setup-go@v5
27+
with:
28+
go-version: '1.21'
29+
- name: Run go test
30+
run: make go.test
31+
- name: Analyze with SonarCloud
32+
uses: sonarsource/sonarcloud-github-action@v2.1
33+
env:
34+
GITHUB_TOKEN: ${{ github.token }}
35+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
vendor
2-
*.out
3-
go.work.sum
4-
1+
# local development environment
52
.direnv
3+
4+
# go
5+
coverage.txt

.go-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)