Skip to content
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The official config loader for [Tableau](https://github.com/tableauio/tableau).

## Go

- Install: **go1.18** or above
- Install: **go1.21** or above
- Install protoc-gen-go: `go install google.golang.org/protobuf/cmd/protoc-gen-go@latest`
- Change dir: `cd test/go-tableau-loader`
- Generate protoconf: `bash ./gen.sh`
Expand Down
2 changes: 1 addition & 1 deletion cmd/protoc-gen-cpp-tableau-loader/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"google.golang.org/protobuf/types/pluginpb"
)

const version = "0.10.1"
const version = "0.11.0"

// specify protobuf namespace
var namespace *string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"sync/atomic"
"time"

"github.com/pkg/errors"
"github.com/tableauio/tableau/format"
"github.com/tableauio/tableau/load"
"github.com/tableauio/tableau/store"
Expand Down Expand Up @@ -115,15 +114,15 @@ func (h *Hub) Load(dir string, format format.Format, options ...load.Option) err
for name, msger := range messagerMap {
mopts := opts.ParseMessagerOptionsByName(name)
if err := msger.Load(dir, format, mopts); err != nil {
return errors.WithMessagef(err, "failed to load: %v", name)
return fmt.Errorf("failed to load %s: %w", name, err)
}
}
// create a temporary hub with messager container for post process
tmpHub := &Hub{}
tmpHub.SetMessagerMap(messagerMap)
for name, msger := range messagerMap {
if err := msger.ProcessAfterLoadAll(tmpHub); err != nil {
return errors.WithMessagef(err, "failed to process messager %s after load all", name)
return fmt.Errorf("failed to process messager %s after load all: %w", name, err)
}
}
h.SetMessagerMap(messagerMap)
Expand All @@ -137,7 +136,7 @@ func (h *Hub) Store(dir string, format format.Format, options ...store.Option) e
for name, msger := range h.GetMessagerMap() {
if opts.Filter == nil || opts.Filter(name) {
if err := msger.Store(dir, format, options...); err != nil {
return errors.WithMessagef(err, "failed to store: %v", name)
return fmt.Errorf("failed to store %s: %w", name, err)
}
}
}
Expand Down
1 change: 0 additions & 1 deletion cmd/protoc-gen-go-tableau-loader/helper/imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const (
FormatPackage = protogen.GoImportPath("github.com/tableauio/tableau/format")
LoadPackage = protogen.GoImportPath("github.com/tableauio/tableau/load")
StorePackage = protogen.GoImportPath("github.com/tableauio/tableau/store")
Errors = protogen.GoImportPath("github.com/pkg/errors")
TreeMapPackage = protogen.GoImportPath("github.com/tableauio/loader/pkg/treemap")
PairPackage = protogen.GoImportPath("github.com/tableauio/loader/pkg/pair")
TimePackage = protogen.GoImportPath("time")
Expand Down
2 changes: 1 addition & 1 deletion cmd/protoc-gen-go-tableau-loader/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"google.golang.org/protobuf/types/pluginpb"
)

const version = "0.10.1"
const version = "0.11.0"

var pkg *string

Expand Down
7 changes: 2 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ go 1.21

require (
github.com/iancoleman/strcase v0.3.0
github.com/pkg/errors v0.9.1
github.com/pmezard/go-difflib v1.0.0
github.com/stretchr/testify v1.10.0
github.com/tableauio/tableau v0.14.2
github.com/tableauio/tableau v0.15.0
golang.org/x/exp v0.0.0-20230418202329-0354be287a23
google.golang.org/protobuf v1.34.2
)
Expand All @@ -20,11 +19,10 @@ require (
github.com/cloudwego/base64x v0.1.5 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/jhump/protoreflect v1.16.0 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/protocolbuffers/txtpbfmt v0.0.0-20240820135758-21b1d9897dc7 // indirect
github.com/richardlehane/mscfb v1.0.4 // indirect
github.com/richardlehane/msoleps v1.0.4 // indirect
Expand All @@ -41,7 +39,6 @@ require (
golang.org/x/net v0.30.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/text v0.19.0 // indirect
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
127 changes: 2 additions & 125 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/hero_conf.pc.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3
// source: hero_conf.proto

Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/hero_conf.pc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3
// source: hero_conf.proto

Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/hub.pc.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3

#include "hub.pc.h"
Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/hub.pc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3

#pragma once
Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/hub_shard0.pc.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3

#include "hub.pc.h"
Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/hub_shard1.pc.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3

#include "hub.pc.h"
Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/index_conf.pc.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3
// source: index_conf.proto

Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/index_conf.pc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3
// source: index_conf.proto

Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/item_conf.pc.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3
// source: item_conf.proto

Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/item_conf.pc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3
// source: item_conf.proto

Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/load.pc.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3

#include "load.pc.h"
Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/load.pc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3

#pragma once
Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/logger.pc.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3

#include "logger.pc.h"
Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/logger.pc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3

#pragma once
Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/patch_conf.pc.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3
// source: patch_conf.proto

Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/patch_conf.pc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3
// source: patch_conf.proto

Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/scheduler.pc.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3

#include "scheduler.pc.h"
Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/scheduler.pc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3

#pragma once
Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/test_conf.pc.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3
// source: test_conf.proto

Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/test_conf.pc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3
// source: test_conf.proto

Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/util.pc.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3

#include "util.pc.h"
Expand Down
2 changes: 1 addition & 1 deletion test/cpp-tableau-loader/src/protoconf/util.pc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-cpp-tableau-loader. DO NOT EDIT.
// versions:
// - protoc-gen-cpp-tableau-loader v0.10.1
// - protoc-gen-cpp-tableau-loader v0.11.0
// - protoc v3.19.3

#pragma once
Expand Down
2 changes: 1 addition & 1 deletion test/go-tableau-loader/protoconf/loader/hero_conf.pc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions test/go-tableau-loader/protoconf/loader/hub.pc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/go-tableau-loader/protoconf/loader/index_conf.pc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/go-tableau-loader/protoconf/loader/item_conf.pc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/go-tableau-loader/protoconf/loader/messager.pc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/go-tableau-loader/protoconf/loader/patch_conf.pc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/go-tableau-loader/protoconf/loader/test_conf.pc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/go-tableau-loader/protoconf/loader/util.pc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion third_party/_submodules/tableau
Submodule tableau updated 259 files