Skip to content

Commit 656b6d9

Browse files
authored
Merge branch 'main' into templates
2 parents 8492960 + 013d9ff commit 656b6d9

File tree

22 files changed

+172
-78
lines changed

22 files changed

+172
-78
lines changed

.devcontainer/Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM mcr.microsoft.com/vscode/devcontainers/go:0-1.18
1+
FROM mcr.microsoft.com/devcontainers/go:1.21

.github/workflows/ci.yaml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,22 @@ jobs:
2121
name: Linter
2222
runs-on: ubuntu-latest
2323
steps:
24-
- name: Checkout source code
25-
uses: actions/checkout@v2
26-
- name: Setup Go
27-
uses: actions/setup-go@v2
24+
- uses: actions/checkout@v3
25+
- uses: actions/setup-go@v4
2826
with:
29-
go-version: '1.18'
30-
- name: Install golangci-lint
31-
run: |
32-
curl -sSLO https://github.com/golangci/golangci-lint/releases/download/v$GOLANGCI_LINT_VERSION/golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz
33-
tar -xf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz
34-
sudo mv golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64/golangci-lint /usr/local/bin/golangci-lint
35-
rm -rf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64*
36-
env:
37-
GOLANGCI_LINT_VERSION: '1.50.1'
38-
- name: Run Lint
39-
run: make lint
27+
go-version: '1.21'
28+
cache: false
29+
- name: golangci-lint
30+
uses: golangci/golangci-lint-action@v3
31+
with:
32+
version: v1.51
4033

4134
build:
4235
name: build
4336
runs-on: ubuntu-latest
4437
strategy:
4538
matrix:
46-
go: [1.18]
39+
go: [1.21]
4740
fix-version:
4841
-
4942
- fix40

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ _test/echo_server
88
_test/tmp
99
_vendor*
1010
gen
11+
.DS_Store

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
## 0.8.1 (October 27, 2023)
2+
3+
BUG FIXES
4+
5+
* Remove initiator wait [GH 587]
6+
* for xml charset and bug of "Incorrect NumInGroup" [GH 368, 363, 365, 366]
7+
* Allow time.Duration or int for timeouts [GH 477]
8+
* Trim extra non-ascii characters that can arise from manually editing [GH 463, 464]
9+
10+
## 0.8.0 (October 25, 2023)
11+
12+
ENHANCEMENTS
13+
14+
* Remove tag from field map [GH 544]
15+
* Add message.Bytes() to avoid string conversion [GH 546]
16+
* Check RejectInvalidMessage on FIXT validation [GH 572]
17+
18+
BUG FIXES
19+
20+
* Fix repeating group read tags lost [GH 462]
21+
* Acceptance test result must be predictable [GH 578]
22+
* Makes event timer stop idempotent [GH 580, 581]
23+
* Added WaitGroup Wait in Initiator [GH 584]
24+
125
## 0.7.0 (January 2, 2023)
226

327
FEATURES

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Open Source [FIX Protocol](http://www.fixprotocol.org/) library implemented in G
1010
<ul>
1111
<li>100% free and open source with a liberal <a href="https://github.com/quickfixgo/quickfix/blob/master/LICENSE.txt">license</a></li>
1212
<li>Supports FIX versions 4.0 - 5.0SP2</li>
13-
<li>Runs on any hardware and operating system supported by Go (1.18+ required)</li>
13+
<li>Runs on any hardware and operating system supported by Go (1.21+ required)</li>
1414
<li>Spec driven run-time message validation</li>
1515
<li>Spec driven code generation of type-safe FIX messages, fields, and repeating groups</li>
1616
<li>Support for protocol customizations</li>

_test/ReflectorClient.rb

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,15 @@ def @reflector.waitConnectAction(cid)
6767
end
6868

6969
def @reflector.waitDisconnectAction(cid)
70-
socket = @sockets[cid]
71-
if IO.select([socket], nil, nil, 10) == nil then
72-
raise "Connection hangs after ten seconds."
73-
elsif !socket.eof? then
74-
raise "Expected disconnection, got data"
70+
begin
71+
socket = @sockets[cid]
72+
if IO.select([socket], nil, nil, 10) == nil then
73+
raise "Connection hangs after ten seconds."
74+
elsif !socket.eof? then
75+
raise "Expected disconnection, got data"
76+
end
77+
rescue Errno::ECONNRESET
78+
# Ignore, server has already disconnected the socket
7579
end
7680
end
7781

_test/ReflectorServer.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,14 @@ def @reflector.waitConnectAction(cid)
5858
end
5959

6060
def @reflector.waitDisconnectAction(cid)
61-
if IO.select([@socket], nil, nil, 10) == nil then
62-
raise "Connection hangs after five seconds."
63-
elsif !@socket.eof? then
64-
raise "Expected disconnection, got data"
61+
begin
62+
if IO.select([@socket], nil, nil, 10) == nil then
63+
raise "Connection hangs after five seconds."
64+
elsif !@socket.eof? then
65+
raise "Expected disconnection, got data"
66+
end
67+
rescue Errno::ECONNRESET
68+
# Ignore, client has already disconnected the socket
6569
end
6670
end
6771

_test/test-server/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
"bytes"
55
"fmt"
6-
"io/ioutil"
6+
"io"
77
"log"
88
"os"
99
"os/signal"
@@ -92,7 +92,7 @@ func copyMessage(msg *quickfix.Message) *quickfix.Message {
9292

9393
func main() {
9494
app := &EchoApplication{}
95-
app.log = log.New(ioutil.Discard, "", log.LstdFlags)
95+
app.log = log.New(io.Discard, "", log.LstdFlags)
9696
//app.log = log.New(os.Stdout, "", log.LstdFlags)
9797

9898
router.AddRoute(quickfix.BeginStringFIX40, "D", app.processMsg)

cmd/generate-fix/internal/generate.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var (
1818
printerMode = printer.UseSpaces | printer.TabIndent
1919
)
2020

21-
//ParseError indicates generated go source is invalid
21+
// ParseError indicates generated go source is invalid
2222
type ParseError struct {
2323
path string
2424
err error
@@ -28,12 +28,12 @@ func (e ParseError) Error() string {
2828
return fmt.Sprintf("Error parsing %v: %v", e.path, e.err)
2929
}
3030

31-
//ErrorHandler is a convenience struct for interpretting generation Errors
31+
// ErrorHandler is a convenience struct for interpretting generation Errors
3232
type ErrorHandler struct {
3333
ReturnCode int
3434
}
3535

36-
//Handle interprets the generation error. Proceeds with setting returnCode, or panics depending on error type
36+
// Handle interprets the generation error. Proceeds with setting returnCode, or panics depending on error type
3737
func (h *ErrorHandler) Handle(err error) {
3838
switch err := err.(type) {
3939
case nil:
@@ -64,9 +64,9 @@ func write(filePath string, fset *token.FileSet, f *ast.File) error {
6464
return err
6565
}
6666

67-
//WriteFile parses the generated code in fileOut and writes the code out to filePath.
68-
//Function performs some import clean up and gofmts the code before writing
69-
//Returns ParseError if the generated source is invalid but is written to filePath
67+
// WriteFile parses the generated code in fileOut and writes the code out to filePath.
68+
// Function performs some import clean up and gofmts the code before writing
69+
// Returns ParseError if the generated source is invalid but is written to filePath
7070
func WriteFile(filePath, fileOut string) error {
7171
fset := token.NewFileSet()
7272
f, pErr := parser.ParseFile(fset, "", fileOut, parser.ParseComments)

datadictionary/datadictionary.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,10 @@ func Parse(path string) (*DataDictionary, error) {
315315
func ParseSrc(xmlSrc io.Reader) (*DataDictionary, error) {
316316
doc := new(XMLDoc)
317317
decoder := xml.NewDecoder(xmlSrc)
318+
decoder.CharsetReader = func(encoding string, input io.Reader) (io.Reader, error) {
319+
return input, nil
320+
}
321+
318322
if err := decoder.Decode(doc); err != nil {
319323
return nil, errors.Wrapf(err, "problem parsing XML file")
320324
}

0 commit comments

Comments
 (0)