petrus-jvrensburg
I’m currently trying to use livebook to work with the suite of ex_cldr packages, but I’m tripping over the automatic execution of doctests.
E.g. for a minimal ex_cldr backend module definition, I’m seeing this error when the cell executes:
Evaluation process terminated - an exception was raised:
** (MatchError) no match of right hand side value: []
lib/livebook/runtime/evaluator/doctests.ex:57: Livebook.Runtime.Evaluator.Doctests.report_doctest_result/2
lib/livebook/runtime/evaluator/doctests.ex:27: anonymous fn/2 in Livebook.Runtime.Evaluator.Doctests.run/2
(elixir 1.14.5) lib/enum.ex:975: Enum."-each/2-lists^foreach/1-0-"/2
lib/livebook/runtime/evaluator/doctests.ex:24: Livebook.Runtime.Evaluator.Doctests.run/2
lib/livebook/runtime/evaluator.ex:465: Livebook.Runtime.Evaluator.continue_do_evaluate_code/6
lib/livebook/runtime/evaluator.ex:330: Livebook.Runtime.Evaluator.loop/1
(stdlib 4.3) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
The problem is that use Cldr in the backend module generates a bunch of code that includes doctests. And usually those doctests would pass, but the test setup does not seem to be replicated 100% when the code is generated in this way.
Would it make sense to add a flag for skipping doctests in cases like these?
Trending in Discussions
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
New
Hey there,
It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Quite interesting article Google brought me. Didn’t find any mentions about it here.
What do you think in general? Would you use togethe...
New
:warning: Security advisory: Decimal DoS vulnerability
A vulnerability has been published for decimal where very large exponents can cau...
New
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
New
What IDE or editor are you using for Elixir development?
Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New
Other Trending Topics
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
Aludel - LLM Evaluation Workbench
Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming












Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
benwilson512
Hey @petrus-jvrensburg do you have an example livebook I can run that shows this issue? How are tests being run at all?
kip
I believe the error arises because the backend configuration you defined does not include the locales that the doctests use. In this case
:plis not configured.You can chose to omit the docs for a backend module by adding
generate_docs: falseto the backend configuration and I believe that will mean no docs, and therefore no doc tests would be executed.Its new to me that Livebook is executing doctests in this way though. It seems a little unexpected - what am I missing?
jonatanklosko
Hey, it can happen when
use Moddefines functions with doctests. Livebook should ignore those, we are looking into this : )kip
That’s great to hear @jonatanklosko. They are, I think, first and foremost docs. That they are tests is almost a side affect.
petrus-jvrensburg
That’s great. It would make sense for these to be ignored.
And thanks for all your effort, livebook is really good!
jonatanklosko
FTR fixed in Don't run doctests for generated functions by jonatanklosko · Pull Request #1966 · livebook-dev/livebook · GitHub, will merge when the next Elixir v1.15 rc is out (but the fix also works with v1.14).