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): correct module-resolver error messages @bug W-5192589@ #551

Merged
merged 7 commits into from
Aug 1, 2018

Conversation

apapko
Copy link
Collaborator

@apapko apapko commented Jul 31, 2018

Details

Edit the error messages to provide a more clear description of the issue.

Does this PR introduce a breaking change?

  • Yes
  • No

@apapko apapko requested a review from pmdartus July 31, 2018 22:08
@salesforce-best-lwc-internal
Copy link

Benchmark results

Base commit: 3c68a69 | Target commit: 2df24a1


const { diagnostics, result, success } = await compile(COMPILER_CONFIG_BASEDIR);
expect(success).toBe(false);
console.log(diagnostics);
Copy link
Member

Choose a reason for hiding this comment

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

Remove console.log

const { diagnostics, result, success } = await compile(COMPILER_CONFIG_BASEDIR);
expect(success).toBe(false);
console.log(diagnostics);
expect(diagnostics[0].level).toBe(0);
Copy link
Member

Choose a reason for hiding this comment

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

Use Diagnostive.Error instead of 0.

"foo.js": `
import { Element } from 'engine';
export default class Test extends Element {}`,
"foo.html": `<template><p>Component Template</p></template>`,
Copy link
Member

Choose a reason for hiding this comment

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

No need to have an html file if the entry point can't be resolved.

namespace: "x",
files: {
"foo.js": `
import { Element } from 'engine';
Copy link
Member

Choose a reason for hiding this comment

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

Keep the test minimal remove the entry file content empty.

export default class Test extends Element {
get mytitle() { return nested; }
}`,
"foo.html": `<template><p>Component Template</p></template>`,
Copy link
Member

Choose a reason for hiding this comment

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

Remove the html file.

files: {
"foo.js": `
import { Element } from 'engine';
import { nested } from './lib/foo';
Copy link
Member

Choose a reason for hiding this comment

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

Keep the test minimal and only keep an import statement.

import './lib/foo';

name: "foo",
namespace: "x",
files: {
"foo.js": `
Copy link
Member

Choose a reason for hiding this comment

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

Can you also make this test minimal?

@salesforce-best-lwc-internal
Copy link

Benchmark results

Base commit: b77df3a | Target commit: 00a0ef2

lwc-engine-benchmark

table-append-1k metric base(b77df3a) target(00a0ef2) trend
benchmark-table/append/1k duration 142.60 (± 3.90 ms) 144.70 (± 3.70 ms) -1.47% 👌
table-clear-1k metric base(b77df3a) target(00a0ef2) trend
benchmark-table/clear/1k duration 11.40 (± 0.70 ms) 11.50 (± 0.60 ms) -0.88% 👌
table-create-10k metric base(b77df3a) target(00a0ef2) trend
benchmark-table/create/10k duration 839.65 (± 3.45 ms) 845.00 (± 4.60 ms) -0.64% 👎
table-create-1k metric base(b77df3a) target(00a0ef2) trend
benchmark-table/create/1k duration 102.20 (± 1.30 ms) 101.00 (± 1.70 ms) 1.17% 👍
table-update-10th-1k metric base(b77df3a) target(00a0ef2) trend
benchmark-table/update-10th/1k duration 84.90 (± 5.00 ms) 83.30 (± 3.60 ms) 1.88% 👌
tablecmp-append-1k metric base(b77df3a) target(00a0ef2) trend
benchmark-table-component/append/1k duration 225.90 (± 4.50 ms) 227.30 (± 5.60 ms) -0.62% 👌
tablecmp-clear-1k metric base(b77df3a) target(00a0ef2) trend
benchmark-table-component/clear/1k duration 34.60 (± 2.00 ms) 35.00 (± 1.70 ms) -1.16% 👌
tablecmp-create-10k metric base(b77df3a) target(00a0ef2) trend
benchmark-table-component/create/10k duration 1528.70 (± 12.60 ms) 1529.10 (± 10.70 ms) -0.03% 👌
tablecmp-create-1k metric base(b77df3a) target(00a0ef2) trend
benchmark-table-component/create/1k duration 173.00 (± 3.30 ms) 172.00 (± 3.90 ms) 0.58% 👌
tablecmp-update-10th-1k metric base(b77df3a) target(00a0ef2) trend
benchmark-table-component/update-10th/1k duration 77.60 (± 3.60 ms) 78.20 (± 4.40 ms) -0.77% 👌
wc-append-1k metric base(b77df3a) target(00a0ef2) trend
benchmark-table-wc/append/1k duration 264.10 (± 6.60 ms) 264.50 (± 4.70 ms) -0.15% 👌
wc-clear-1k metric base(b77df3a) target(00a0ef2) trend
benchmark-table-wc/clear/1k duration 35.30 (± 0.95 ms) 35.40 (± 1.10 ms) -0.28% 👌
wc-create-10k metric base(b77df3a) target(00a0ef2) trend
benchmark-table-wc/create/10k duration 1995.20 (± 8.60 ms) 1975.60 (± 8.00 ms) 0.98% 👍
wc-create-1k metric base(b77df3a) target(00a0ef2) trend
benchmark-table-wc/create/1k duration 211.60 (± 5.40 ms) 210.90 (± 5.70 ms) 0.33% 👌
wc-update-10th-1k metric base(b77df3a) target(00a0ef2) trend
benchmark-table-wc/update-10th/1k duration 73.60 (± 6.80 ms) 72.20 (± 5.40 ms) 1.90% 👌

@salesforce-best-lwc-internal
Copy link

Benchmark results

Base commit: b77df3a | Target commit: 81a771f

lwc-engine-benchmark

table-append-1k metric base(b77df3a) target(81a771f) trend
benchmark-table/append/1k duration 142.60 (± 3.90 ms) 145.35 (± 4.80 ms) -1.93% 👌
table-clear-1k metric base(b77df3a) target(81a771f) trend
benchmark-table/clear/1k duration 11.40 (± 0.70 ms) 11.50 (± 0.40 ms) -0.88% 👌
table-create-10k metric base(b77df3a) target(81a771f) trend
benchmark-table/create/10k duration 839.65 (± 3.45 ms) 856.40 (± 3.50 ms) -1.99% 👎
table-create-1k metric base(b77df3a) target(81a771f) trend
benchmark-table/create/1k duration 102.20 (± 1.30 ms) 99.90 (± 2.00 ms) 2.25% 👍
table-update-10th-1k metric base(b77df3a) target(81a771f) trend
benchmark-table/update-10th/1k duration 84.90 (± 5.00 ms) 83.90 (± 5.00 ms) 1.18% 👌
tablecmp-append-1k metric base(b77df3a) target(81a771f) trend
benchmark-table-component/append/1k duration 225.90 (± 4.50 ms) 226.90 (± 5.10 ms) -0.44% 👌
tablecmp-clear-1k metric base(b77df3a) target(81a771f) trend
benchmark-table-component/clear/1k duration 34.60 (± 2.00 ms) 35.20 (± 2.00 ms) -1.73% 👌
tablecmp-create-10k metric base(b77df3a) target(81a771f) trend
benchmark-table-component/create/10k duration 1528.70 (± 12.60 ms) 1517.60 (± 8.80 ms) 0.73% 👍
tablecmp-create-1k metric base(b77df3a) target(81a771f) trend
benchmark-table-component/create/1k duration 173.00 (± 3.30 ms) 167.50 (± 4.90 ms) 3.18% 👍
tablecmp-update-10th-1k metric base(b77df3a) target(81a771f) trend
benchmark-table-component/update-10th/1k duration 77.60 (± 3.60 ms) 77.60 (± 4.20 ms) 0.00% 👌
wc-append-1k metric base(b77df3a) target(81a771f) trend
benchmark-table-wc/append/1k duration 264.10 (± 6.60 ms) 251.30 (± 13.90 ms) 4.85% 👍
wc-clear-1k metric base(b77df3a) target(81a771f) trend
benchmark-table-wc/clear/1k duration 35.30 (± 0.95 ms) 35.40 (± 1.30 ms) -0.28% 👌
wc-create-10k metric base(b77df3a) target(81a771f) trend
benchmark-table-wc/create/10k duration 1995.20 (± 8.60 ms) 1965.60 (± 10.70 ms) 1.48% 👍
wc-create-1k metric base(b77df3a) target(81a771f) trend
benchmark-table-wc/create/1k duration 211.60 (± 5.40 ms) 210.60 (± 3.40 ms) 0.47% 👌
wc-update-10th-1k metric base(b77df3a) target(81a771f) trend
benchmark-table-wc/update-10th/1k duration 73.60 (± 6.80 ms) 77.30 (± 5.40 ms) -5.03% 👌

@pmdartus pmdartus merged commit d1e93cc into master Aug 1, 2018
@pmdartus pmdartus deleted the apapko/nested-folders-path branch August 1, 2018 00:49
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