Skip to content
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

fix(compiler): displaying correct ambigious attribute name #377

Merged

Conversation

davidturissini
Copy link
Contributor

Details

maxlength -> maxLength in warning

Does this PR introduce a breaking change?

  • Yes
  • No

Copy link
Collaborator

@apapko apapko left a comment

Choose a reason for hiding this comment

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

All good except a typo in the word 'ambiguous'

@@ -53,9 +53,9 @@ function validatePropertyName(property) {
`Invalid property name "${propertyName}". "${propertyName}" is a reserved attribute.`
);
} else if (AMBIGIOUS_PROP_SET.has(propertyName)) {
const { propName = propertyName } = GLOBAL_ATTRIBUTE_MAP.get(propertyName) || {};
const camelCased = AMBIGIOUS_PROP_SET.get(propertyName);
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo - ambiguous

throw property.buildCodeFrameError(
`Ambigious attribute name ${propertyName}. ${propertyName} will never be called from template because its corresponding property is camel cased. Consider renaming to "${propName}".`
`Ambigious attribute name ${propertyName}. ${propertyName} will never be called from template because its corresponding property is camel cased. Consider renaming to "${camelCased}".`
Copy link
Collaborator

Choose a reason for hiding this comment

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

same type here

}
`, {
error: {
message: 'test.js: Ambigious attribute name maxlength. maxlength will never be called from template because its corresponding property is camel cased. Consider renaming to "maxLength".',
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo in ambiguous

@salesforce-best-lwc-internal
Copy link

Benchmark results

Base commit: 485357e | Target commit: d7bc9cd

lwc-engine-benchmark

table-append-1k metric base(485357e) target(d7bc9cd) trend
benchmark-table/append/1k duration 145.70 (± 5.80 ms) 145.30 (± 4.50 ms) 0.27% 👌
table-clear-1k metric base(485357e) target(d7bc9cd) trend
benchmark-table/clear/1k duration 11.00 (± 0.50 ms) 11.40 (± 0.40 ms) -3.64% 👎
table-create-10k metric base(485357e) target(d7bc9cd) trend
benchmark-table/create/10k duration 849.80 (± 4.40 ms) 847.00 (± 6.20 ms) 0.33% 👌
table-create-1k metric base(485357e) target(d7bc9cd) trend
benchmark-table/create/1k duration 101.80 (± 2.30 ms) 102.70 (± 1.10 ms) -0.88% 👌
table-update-10th-1k metric base(485357e) target(d7bc9cd) trend
benchmark-table/update-10th/1k duration 89.80 (± 5.50 ms) 87.00 (± 5.60 ms) 3.12% 👌
tablecmp-append-1k metric base(485357e) target(d7bc9cd) trend
benchmark-table-component/append/1k duration 252.20 (± 5.70 ms) 256.10 (± 4.30 ms) -1.55% 👎
tablecmp-clear-1k metric base(485357e) target(d7bc9cd) trend
benchmark-table/clear/1k duration 34.90 (± 1.10 ms) 34.80 (± 2.35 ms) 0.29% 👌
tablecmp-create-10k metric base(485357e) target(d7bc9cd) trend
benchmark-table-component/create/10k duration 1690.20 (± 13.00 ms) 1686.30 (± 9.80 ms) 0.23% 👍
tablecmp-create-1k metric base(485357e) target(d7bc9cd) trend
benchmark-table-component/create/1k duration 196.30 (± 3.70 ms) 197.50 (± 4.50 ms) -0.61% 👌
tablecmp-update-10th-1k metric base(485357e) target(d7bc9cd) trend
benchmark-table-component/update-10th/1k duration 74.60 (± 3.80 ms) 73.60 (± 4.30 ms) 1.34% 👌

@salesforce-best-lwc-internal
Copy link

Benchmark results

Base commit: 485357e | Target commit: 66e29ec

lwc-engine-benchmark

table-append-1k metric base(485357e) target(66e29ec) trend
benchmark-table/append/1k duration 145.70 (± 5.80 ms) 149.50 (± 4.40 ms) -2.61% 👎
table-clear-1k metric base(485357e) target(66e29ec) trend
benchmark-table/clear/1k duration 11.00 (± 0.50 ms) 11.70 (± 0.50 ms) -6.36% 👎
table-create-10k metric base(485357e) target(66e29ec) trend
benchmark-table/create/10k duration 849.80 (± 4.40 ms) 845.60 (± 5.90 ms) 0.49% 👍
table-create-1k metric base(485357e) target(66e29ec) trend
benchmark-table/create/1k duration 101.80 (± 2.30 ms) 103.75 (± 1.70 ms) -1.92% 👎
table-update-10th-1k metric base(485357e) target(66e29ec) trend
benchmark-table/update-10th/1k duration 89.80 (± 5.50 ms) 85.10 (± 3.10 ms) 5.23% 👌
tablecmp-append-1k metric base(485357e) target(66e29ec) trend
benchmark-table-component/append/1k duration 252.20 (± 5.70 ms) 260.50 (± 3.60 ms) -3.29% 👎
tablecmp-clear-1k metric base(485357e) target(66e29ec) trend
benchmark-table/clear/1k duration 34.90 (± 1.10 ms) 35.10 (± 2.00 ms) -0.57% 👎
tablecmp-create-10k metric base(485357e) target(66e29ec) trend
benchmark-table-component/create/10k duration 1690.20 (± 13.00 ms) 1690.70 (± 14.00 ms) -0.03% 👌
tablecmp-create-1k metric base(485357e) target(66e29ec) trend
benchmark-table-component/create/1k duration 196.30 (± 3.70 ms) 199.10 (± 2.30 ms) -1.43% 👎
tablecmp-update-10th-1k metric base(485357e) target(66e29ec) trend
benchmark-table-component/update-10th/1k duration 74.60 (± 3.80 ms) 75.20 (± 4.50 ms) -0.80% 👌

@davidturissini davidturissini merged commit 4c0720a into master Jun 6, 2018
@davidturissini davidturissini deleted the dturissini/fix-compiler-ambigious-name-warning branch June 6, 2018 17:11
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.

2 participants