Closed qazwsxedckll closed 7 months ago
@qazwsxedckll Why was the directory name _examples
changed back? See #384
@qazwsxedckll Tracking the go.sum
file of examples may causing a lot unnecessary changes.
👋🏻 @cupen
@cupen It is ignored by go build and I cannot get any lint from vscode even if I add go.work. I understand about removing example dependencies from the main module by adding go.mod to every example.
Maybe there were many problems before go.work came out so add underscore to ignore them make sense. Now we can just run go work init && go work use -r .
to add all examples.
I have no opinions on go.sum
files.
Hi @rogeralsing @qazwsxedckll To my point of view, these examples are not a part of protoactor-go
, but rather some usecases for demonstration purposes. So the examples
and protactor-go
can be treated as two separate projects, it might be enough to just place a go.work
in the examples
directory for linter.
So, for avoid the lots of unnecessary changes with go.sum
of examples
, is there a better way than .gitignore
?
btw: These examples also could be the first choice to check our locally modification, so the replace xxx => ./..
in go.mod
of examples
is useful. And also it could works with go.work
.
@cupen First, go.work
is not recommanded to be commited to the repository. Run go work init && go work use -r .
in the root directory is the way to go. When using go.work
, it is alway using the local modifications, no matter the verson chosed in go.mod
. When not using go.work
, examples are using the version specified in go.mod
. I find it is extremely useful. So replace
is not neccessay here. You can try it out first.
@qazwsxedckll Yes, that's true. I mistakenly thought you wanted to put a go.work
file in the root path for resolve the linter problems, so I suggested use the examples
as an alternative. Sorry for that.
add ErrorReason in proto file.
return in service
assert error