-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Development Tooling #377
Development Tooling #377
Conversation
c0f6bb9
to
bda911c
Compare
160e1ec
to
bae1616
Compare
12ef488
to
29c7467
Compare
This now also closes #34. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kschiffer please review the list of babel plugins you added, lets try to add less stage 0 proposals. Also, what about the .babelrc
file?
$ make js.clean
make: *** No rule to make target `js.clean'. Stop.
package.json
Outdated
} | ||
], | ||
"@babel/plugin-proposal-nullish-coalescing-operator", | ||
"@babel/plugin-proposal-do-expressions", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this?
package.json
Outdated
], | ||
"@babel/plugin-proposal-nullish-coalescing-operator", | ||
"@babel/plugin-proposal-do-expressions", | ||
"@babel/plugin-proposal-function-bind" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really want to import stage 0 features?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had them enabled before, that's why they're added now individually. I can also remove some, as it's true that we actually don't use most of them.
|
||
return { | ||
ids: { | ||
device_id: faker.lorem.slug(), | ||
application_ids: { | ||
application_id: app.ids.application_id, | ||
application_id: '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how is this related to this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the babel 7 upgrade, this line resulted in an error. Didn't want to bother a lot about it, as it is dead code anyway.
return eslint("./pkg/webui/**/*.snap", "--no-ignore", "--color") | ||
} | ||
|
||
func (js Js) LintAll() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing comment
4a7b47f
to
f6c0e73
Compare
This now also closes #66. |
f6c0e73
to
3204db7
Compare
046524a
to
1d6c019
Compare
.mage/proto.go
Outdated
|
||
// All generates protos. | ||
func (p Proto) All(ctx context.Context) { | ||
mg.CtxDeps(ctx, Proto.Image) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this.
- It's redundant, since
docker run
will automatically pull the image if not available. - It breaks
proto:all
in offline scenarios in cases where the image is already available and in cases where image is available locally, but not in the repository. - This target generates protos. Updating the image is an unexpected side-effect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I ran this proto:all
without pulling the image first, it started pulling the image concurrently for all the jobs below. We don't want that. Feel free to suggest an alternative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I favor offline support over concurrent pulling images. If we can have (explicit) offline support, I'm fine with that too, but we need offline support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed that in 82c670f
CONTRIBUTING.md
Outdated
@@ -245,7 +245,7 @@ In the API, the enum descriptions, error messages and event descriptions availab | |||
These messages are then collected in the `config/messages.json` file, which will be processed in the frontend build process, but may also be used by other (native) user interfaces. When you define new enums, errors or events or when you change them, the messages need to be updated into the `config/messages.json` file. | |||
|
|||
```sh | |||
make messages | |||
make go.messages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not go:messages
?
DEVELOPMENT.md
Outdated
@@ -142,7 +143,7 @@ From the `.proto` files, we generate code using the `protoc` compiler. As we pla | |||
The actual commands for compilation are handled by our Makefile, so the only thing you have to execute, is: | |||
|
|||
```sh | |||
make protos.clean protos | |||
make proto.clean proto.all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not proto:clean
and proto:all
?
Makefile
Outdated
$(err) "Previous operations have created changes that were not recorded in the repository. Please make those changes on your local machine before pushing them to the repository:"; \ | ||
git diff; \ | ||
exit 1; \ | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove the passthrough target to mage
?
.mage/rules.make
Outdated
@@ -0,0 +1,257 @@ | |||
# Copyright © 2019 The Things Network Foundation, The Things Industries B.V. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we're migrating to Mage in this PR? Why do we need these?
Makefile
Outdated
@echo " run \"make build-all\"" | ||
|
||
.PHONY: build-all | ||
build-all: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this still here?
@@ -12,30 +12,49 @@ | |||
# See the License for the specific language governing permissions and | |||
# limitations under the License. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we still have targets here? Aren't we migrating to mage
?
in fresh repo
gives:
|
.mage/translations.js
Outdated
@@ -202,7 +202,7 @@ const readMessages = async function () { | |||
} | |||
|
|||
/** | |||
* Read and parse (and marshal) the backend messages, coming from `make go.messages` | |||
* Read and parse (and marshal) the backend messages, coming from `./mage go.messages` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
colon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😭
0585342
to
61eac7d
Compare
@rvolosatovs we got rid of the proxy, now we run |
Notes to all:
|
Summary:
This PR migrates our development tooling to Mage.
Closes #3
Closes #11
Closes #66
Closes #34
Changes:
Notes for Reviewers:
There are a lot of fixup commits in here (although they aren't indicated with
!fixup
), but unfortunately rebasing all of this isn't feasible.The
fix-grpc-gateway-names.sh
script is still TODO. @rvolosatovs promised to solve that in a future PRRelease Notes