question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

From 3.9.1 a compiler bug?

See original GitHub issue

Reproduction: https://github.com/igneosaur/sveltejs-template/tree/terser-compress-await-bug

@igneosaur opened https://github.com/sveltejs/template/issues/59 thinking it was terser.

If you clone and change sveltejs from 3.9.1 to 3.9.0 it works fine.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
Conduitrycommented, Aug 31, 2019

It looks to me like a terser bug involving invalid inlining of a function call.

  let current_component;
  // ...
  function get_current_component() {
    if (!current_component)
    throw new Error(`Function called outside component initialization`);
    return current_component;
  }

is turning into

      const n = function () {
        if (!n) throw new Error('Function called outside component initialization');
        return n
      }();

I haven’t tracked down what about the output changed between Svelte 3.9.0 and 3.9.1 to cause this to happen, but it does appear to be a bug in Terser.

1reaction
Conduitrycommented, Sep 25, 2019

The Terser bug was fixed in 4.3.2.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't install 3.9.1 on M1 with GCC 12: "error: implicit ... - GitHub
The immediate cause is that we include XCode SDK into INCLUDE_PATH -- which breaks compilers incompatible with it. But then the compilation ...
Read more >
Pyenv and Python 3.9.1. - BUILD FAILED on Big Sur
1': configure: error: C compiler cannot create executables See `config.log' for more details make: *** No targets specified and no makefile ...
Read more >
CMAKE 3.9.1 AIX CMakeCommonCompilerMacros error ...
1 AIX CMakeCommonCompilerMacros error CMAKE_C_STANDARD_COMPUTED_DEFAULT should be set for XL. I was using cmake 3.7.2 and upgraded to 3.9.1 ( ...
Read more >
CHANGES.md.html · js_of_ocaml-ocamlbuild 3.11.0 · OCaml ...
Compiler from OCaml bytecode to JavaScript ... 3.9.1 (2021-02-17) - Lille ... Compiler: fix bug generating invalid javascript for if-then construct (#1046).
Read more >
Built-in Functions — Python 3.11.1 documentation
Compiler flags can be found in ast module, with PyCF_ prefix. ... as a suite of Python statements which is then executed (unless...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found