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

[BUGFIX lts] Ensure Component Lookup Is Well Formed #19336

Merged
merged 2 commits into from
Jan 14, 2021

Commits on Jan 12, 2021

  1. bugfix: Ensure Component Lookup Is Well Formed

    This PR introduces an assertion during the component name refinement to
    assert that the lookup syntax is well formed. If a developer
    accidentally types ":" instead of "::" you will end up with a runtime
    erorr that looks like:
    
    ```
    Uncaught Error: Assertion Failed: fullName must be a proper full name
        at assert (vendor.js:52729)
        at Container.lookup (vendor.js:16581)
        at Class.lookup (vendor.js:43950)
        at layoutFor (vendor.js:28680)
        at lookupComponentPair (vendor.js:28697)
        at lookupComponent (vendor.js:28711)
        at RuntimeResolver._lookupComponentDefinition (vendor.js:28992)
        at RuntimeResolver.lookupComponentHandle (vendor.js:28837)
        at CompileTimeLookup.lookupComponentDefinition (vendor.js:25065)
        at LazyCompiler.resolveLayoutForTag (vendor.js:60366)
    ```
    
    This message is not actionable for developers. This PR will causes a
    compile time error to occur with the following information:
    
    ```
    Malformed component lookup in "test.js". Got <Foo:Bar \/> but you must use \"::\" to indicate a lookup
    ```
    chadhietala committed Jan 12, 2021
    Configuration menu
    Copy the full SHA
    ba57d78 View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2021

  1. Configuration menu
    Copy the full SHA
    c874f15 View commit details
    Browse the repository at this point in the history