Skip to content

Typos (misc): cmake, tools, utils, unittests, validation-test + more #75034

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 5 commits into from
Jul 11, 2024
Merged

Typos (misc): cmake, tools, utils, unittests, validation-test + more #75034

merged 5 commits into from
Jul 11, 2024

Conversation

Sajjon
Copy link
Contributor

@Sajjon Sajjon commented Jul 7, 2024

Fix typos in misc folders: cmake, tools, utils, unittests, validation-test + more

This is one batch of many PRs fixing typos, see the tracking issue.

@@ -313,19 +313,19 @@ fileprivate class ConcurrencyDumper {
let taskToThread: [swift_addr_t: UInt64] =
Dictionary(threadCurrentTasks.map{ ($1, $0) }, uniquingKeysWith: { $1 })

var lastChilds: [Bool] = []
var lastChildren: [Bool] = []
Copy link
Member

Choose a reason for hiding this comment

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

While grammatically incorrect, I think that in general, this type of change is less desirable as it is changing terminology for variables rather than correcting an obvious typo. In this specific case, the rename is fine, but it is not always so obvious.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1. This array isn't an array of children. It's an array of "last child" flags. lastChildren is wrong. A better name might be lastChildFlags.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

@@ -64,6 +64,6 @@ TEST_F(ScanTest, TestDoesNotHaveArgumentQuery) {
bool hasOption;
hasOption = optionSet.find("-clearly-not-a-compiler-flag") != optionSet.end();
EXPECT_EQ(hasOption, false);
hasOption = optionSet.find("-emit-modul") != optionSet.end();
hasOption = optionSet.find("-emit-module") != optionSet.end();
Copy link
Member

Choose a reason for hiding this comment

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

Wow, this has never triggered an error? Seems like we have insufficient test coverage :(

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this is intentional, as it's followed by EXPECT_EQ(hasOption, false); and this test seems to be about arguments that don't exist. I assume it's meant to be very close to a real argument name, maybe to ensure nothing is doing a prefix match or something like that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mikeash makes sense, I will revert the change then?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, please. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mikeash fixed!

@@ -9,8 +9,8 @@ extension TestLayout {
return f()
}
}
struct EqualWitdthHStack : TestLayout {}
extension EqualWitdthHStack: View {
struct EqualWidthHStack : TestLayout {}
Copy link
Member

Choose a reason for hiding this comment

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

Again, these types of changes should be avoided IMO. In this specific case, this is a test program so it doesn't matter, but this runs the risk of an ABI break.

@compnerd
Copy link
Member

compnerd commented Jul 7, 2024

@swift-ci please test

Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
@compnerd
Copy link
Member

compnerd commented Jul 7, 2024

@swift-ci please test

Copy link
Contributor

@al45tair al45tair left a comment

Choose a reason for hiding this comment

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

lastChildren should be lastChildFlags instead, I think. Or just leave it alone.

@@ -313,19 +313,19 @@ fileprivate class ConcurrencyDumper {
let taskToThread: [swift_addr_t: UInt64] =
Dictionary(threadCurrentTasks.map{ ($1, $0) }, uniquingKeysWith: { $1 })

var lastChilds: [Bool] = []
var lastChildren: [Bool] = []
Copy link
Contributor

Choose a reason for hiding this comment

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

+1. This array isn't an array of children. It's an array of "last child" flags. lastChildren is wrong. A better name might be lastChildFlags.

@al45tair
Copy link
Contributor

al45tair commented Jul 8, 2024

@swift-ci Please test

@@ -433,7 +433,7 @@ def run():
... // ###sourceLocation(file: "/public/core/Map.swift.gyb", line: 108)
...
... /// A `Collection` whose elements consist of those in a `Base`
... /// `Collection` passed through a transform function returning `Elemen
... /// `Collection` passed through a transform function returning `Element
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, the closing "`" is missing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@@ -471,7 +471,7 @@ def run():
... // ###sourceLocation(file: "/public/core/Map.swift.gyb", line: 108)
...
... /// A `Collection` whose elements consist of those in a `Base`
... /// `Collection` passed through a transform function returning `Elemen
... /// `Collection` passed through a transform function returning `Element
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@@ -509,7 +509,7 @@ def run():
... // ###sourceLocation(file: "/public/core/Map.swift.gyb", line: 108)
...
... /// A `Collection` whose elements consist of those in a `Base`
... /// `Collection` passed through a transform function returning `Elemen
... /// `Collection` passed through a transform function returning `Element
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Contributor

@mikeash mikeash left a comment

Choose a reason for hiding this comment

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

Found one that I think is supposed to be misspelled. Everything else looks good.

@@ -64,6 +64,6 @@ TEST_F(ScanTest, TestDoesNotHaveArgumentQuery) {
bool hasOption;
hasOption = optionSet.find("-clearly-not-a-compiler-flag") != optionSet.end();
EXPECT_EQ(hasOption, false);
hasOption = optionSet.find("-emit-modul") != optionSet.end();
hasOption = optionSet.find("-emit-module") != optionSet.end();
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this is intentional, as it's followed by EXPECT_EQ(hasOption, false); and this test seems to be about arguments that don't exist. I assume it's meant to be very close to a real argument name, maybe to ensure nothing is doing a prefix match or something like that?

@al45tair
Copy link
Contributor

al45tair commented Jul 9, 2024

@swift-ci Please test

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.

6 participants