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

Click to Copy button disappears on error #2434

Closed
lkarthee opened this issue Jan 20, 2024 · 7 comments
Closed

Click to Copy button disappears on error #2434

lkarthee opened this issue Jan 20, 2024 · 7 comments

Comments

@lkarthee
Copy link
Contributor

I have noticed the click to copy button on top right side disappears when an error occurs. Is this intentional?

Can we enable this button as it will help copying error stack trace.

@lkarthee lkarthee changed the title Click to Copy button disappear on error Click to Copy button disappears on error Jan 20, 2024
@josevalim
Copy link
Contributor

I think it disappears because it changes the output type but I am also fine with showing it. Thoughts @jonatanklosko? Are PRs welcome?

@jonatanklosko
Copy link
Member

Agreed, it is a different output and it totally makes sense to show it!

@lkarthee
Copy link
Contributor Author

Can I send PR - from long time I wanted to dive into livebook source ?

@josevalim
Copy link
Contributor

@lkarthee yes, please, go for it. it would be lovely to have your contributions here too :)

@jonatanklosko
Copy link
Member

Closed in #2435.

@lkarthee
Copy link
Contributor Author

lkarthee commented Jan 22, 2024

On my mac these test fail everytime - do you know why ?



13:17 $ elixir -v
Erlang/OTP 26 [erts-14.1.1] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]

Elixir 1.16.0 (compiled with Erlang/OTP 26)
13:18 $ mix test
Compiling 1 file (.ex)
Excluding tags: [erl_docs: true, teams_integration: true]

........................................................................................................................................................................................................................................................................................................................................................................................................................................

  1) test intellisense completion for remote nodes find modules from apps (Livebook.RemoteIntellisenseTest)
     test/livebook/remote_intellisense_test.exs:94
     match (=) failed
     code:  assert [
              %{
                label: "all_keys/1",
                kind: :function,
                detail: ":mnesia.all_keys/1",
                documentation: _all_keys_doc,
                insert_text: "all_keys($0)"
              }
            ] = Intellisense.get_completion_items(":mnesia.all", context, node)
     left:  [%{detail: ":mnesia.all_keys/1", documentation: _all_keys_doc, insert_text: "all_keys($0)", kind: :function, label: "all_keys/1"}]
     right: [
              %{detail: nil, documentation: "No documentation available", insert_text: "all_keys($0)", kind: :function, label: "all_keys/1"},
              %{label: "all_keys/4", kind: :function, detail: nil, documentation: "No documentation available", insert_text: "all_keys($0)"}
            ]
     stacktrace:
       test/livebook/remote_intellisense_test.exs:97: (test)

...........................................................................................................................................................................................................................................................................................

  2) test get_details/3 includes type specs (Livebook.IntellisenseTest)
     test/livebook/intellisense_test.exs:1491
     Assertion with =~ failed
     code:  assert type =~ "@type load_error_rsn() ::"
     left:  "[View on Erlang Docs](https://www.erlang.org/doc/man/code.html#type-load_error_rsn)\n\n---\n\nNo documentation available"
     right: "@type load_error_rsn() ::"
     stacktrace:
       test/livebook/intellisense_test.exs:1500: (test)

......................................................................................................................................................................................................................................................................................................................................................................................................................................................

  3) test get_details/3 returns module-prepended type signatures (Livebook.IntellisenseTest)
     test/livebook/intellisense_test.exs:1479
     Assertion with =~ failed
     code:  assert type =~ ":code.load_error_rsn()"
     left:  "[View on Erlang Docs](https://www.erlang.org/doc/man/code.html#type-load_error_rsn)\n\n---\n\nNo documentation available"
     right: ":code.load_error_rsn()"
     stacktrace:
       test/livebook/intellisense_test.exs:1488: (test)

..................................................................................................................................
Finished in 27.5 seconds (27.5s async, 0.04s sync)
78 doctests, 1299 tests, 3 failures, 99 excluded

@jonatanklosko
Copy link
Member

@lkarthee some tests require erlang docs, so we skip them if the local erlang is not compiled with docs, but some tests are missing the annotations. I've just pushed a fix :)

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

No branches or pull requests

3 participants