这是indexloc提供的服务,不要输入任何密码
Skip to content

Code Housekeeping #1367

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

Merged
merged 4 commits into from
Jun 13, 2022
Merged

Code Housekeeping #1367

merged 4 commits into from
Jun 13, 2022

Conversation

nathanhammond
Copy link
Contributor

A lot of little build housekeeping bundled into one PR.

@vercel
Copy link

vercel bot commented Jun 10, 2022

@nathanhammond is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor Author

@nathanhammond nathanhammond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of details about what is going on here to make it easier to follow along.

.gitignore Outdated
Comment on lines 10 to 11
cli/turbo-new
cli/turbo-new.exe
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These doesn't exist anymore.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this, but I think @jaredpalmer uses these?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How? There are no scripts in the repository to build or generate these artifacts. What are they, and can we get the thing that generates them upstreamed?

cli/npm/turbo-linux-mips64le/bin
cli/npm/turbo-linux-ppc64le/bin
cli/npm/turbo-linux-s390x/bin
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alphabetized as a consequence of regenerating.

Comment on lines -46 to -48
!/npm/turbo-windows-32/bin
!/npm/turbo-windows-64/bin
!/npm/turbo-install/bin
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unnecessary.

cli/Makefile Outdated
Comment on lines 11 to 12
GO_FILES = $(shell find . -name "*.go")
SRC_FILES = $(shell echo $GO_FILES | grep -v "_test.go")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The full set and the reduced set are both useful to prevent invalidation.


turbo: $(SRC_FILES) go.mod
turbo: $(SRC_FILES) go.mod go.sum
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the go.sum is also important and should be considered?

Comment on lines -16 to -31
"cross-env": "^7.0.3",
"copy-template-dir": "^1.4.0",
"esbuild": "^0.14.38",
"esbuild-register": "^3.3.2",
"execa": "^5.0.0",
"expect": "^26.6.2",
"faker": "^5.1.0",
"find-up": "^5.0.0",
"fs-extra": "^9.1.0",
"globby": "11.1.0",
"ngraph.generators": "^19.3.0",
"parse-package-name": "^0.1.0",
"shelljs": "^0.8.4",
"tempy": "^1.0.0",
"uvu": "^0.5.3",
"watchlist": "^0.2.3"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are all unused, or were removed by this PR (cross-env, watchlist)

@@ -1,6 +1,5 @@
#!/usr/bin/env node

const shelljs = require("shelljs");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused.

@@ -3,9 +3,6 @@
"version": "0.0.0",
"private": true,
"scripts": {
"format": "prettier --write",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command doesn't actually do anything and is unused.

Comment on lines -7 to -8
"deduplicate": "npx yarn-deduplicate -s fewer yarn.lock",
"deduplicate:check": "npx yarn-deduplicate -s fewer yarn.lock --list --fail",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two residual commands from the yarn days. No use anymore.

@@ -21,7 +18,7 @@
"prettier --write"
],
"*.go": [
"sh -c \"cd cli && pnpm format\""
"pnpm --filter cli format"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually leverage pnpm workspaces features.

@vercel
Copy link

vercel bot commented Jun 10, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
turbo-site ⬜️ Ignored (Inspect) Jun 13, 2022 at 3:33AM (UTC)

@nathanhammond
Copy link
Contributor Author

nathanhammond commented Jun 10, 2022

@gsoltis Any idea why this test might start failing? https://github.com/vercel/turborepo/runs/6830242709?check_suite_focus=true#step:8:89

(It doesn't reproduce for me locally.)

@ObliviousHarmony
Copy link
Contributor

ObliviousHarmony commented Jun 10, 2022

@nathanhammond When I was working in the repository I noticed that turbo.json references a JSON schema file that doesn't exist, as does the documentation. The JSON schema is in schema.d.ts, is this something we should be referencing instead?

@gsoltis gsoltis added the pr: fixship A PR which is approved with notes and does not require re-review. label Jun 10, 2022
Copy link
Contributor

@gsoltis gsoltis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I would just check w/ Jared re: turbo-new. I think I tried to remove those once before.

.gitignore Outdated
Comment on lines 10 to 11
cli/turbo-new
cli/turbo-new.exe
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this, but I think @jaredpalmer uses these?

cli/Makefile Outdated
Comment on lines 35 to 36
vet-go: $(GO_FILES) go.mod go.sum
go vet ./...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we get rid of this entirely? It's covered under golangci. In fact, it might be better to replace it with a command to do golangci-lint run --new-from-rev=main


e2e: install
pnpm e2e
e2e: install turbo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good change.

@@ -18,7 +18,7 @@ const knownWindowsPackages = {
};

const knownUnixlikePackages = {
// "android arm64 LE": "turbo-android-arm64",
"android arm64 LE": "turbo-android-arm64",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beyond the scope of this change for sure, but maybe we don't need all of these platforms?

@nathanhammond
Copy link
Contributor Author

@ObliviousHarmony Our base repository is required to be different from everybody else. We generate an up-to-date schema.json for our own repository here:

"schema": "ts-json-schema-generator -p ./schema.d.ts -o ./public/schema.json -t Schema --minify"

You can get that generated for you using turbo run schema.

@ObliviousHarmony
Copy link
Contributor

That makes sense, thanks for the clarification @nathanhammond

@nathanhammond nathanhammond requested a review from gsoltis June 13, 2022 03:33
@nathanhammond nathanhammond removed the pr: fixship A PR which is approved with notes and does not require re-review. label Jun 13, 2022
@kodiakhq kodiakhq bot merged commit 2930841 into vercel:main Jun 13, 2022
@nathanhammond nathanhammond deleted the housekeeping branch June 13, 2022 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants