exercism / elixir-representer

GNU Affero General Public License v3.0
11 stars 6 forks source link

Error for dancing-dots submissions #96

Closed ErikSchierboom closed 8 months ago

ErikSchierboom commented 8 months ago

When a submission to the dancing-dots exercise is submitted, it errors:

exercism@ip-10-1-1-49:/opt/jobs/cddd5c5d7cdf4c9385b9cb8e9fa2d3f8-718721e06c997d91e59a802160dba5cd/__exercism_output__$ cat stderr 
** (FunctionClauseError) no function clause matching in Code.Formatter.each_quoted_to_algebra_without_comments/4    

    The following arguments were given to Code.Formatter.each_quoted_to_algebra_without_comments/4:

        # 1
        nil

        # 2
        []

        # 3
        %{file: nil, force_do_end_blocks: false, comments: [], locals_without_parens: [alias: 1, alias: 2, case: 2, cond: 1, for: :*, import: 1, import: 2, quote: 1, quote: 2, receive: 1, require: 1, require: 2, try: 1, with: :*, def: 1, def: 2, defp: 1, defp: 2, defguard: 1, defguardp: 1, defmacro: 1, defmacro: 2, defmacrop: 1, defmacrop: 2, defmodule: 2, defdelegate: 2, defexception: 1, defoverridable: 1, defstruct: 1, destructure: 2, raise: 1, raise: 2, reraise: 2, reraise: 3, if: 2, unless: 2, use: 1, use: 2, defrecord: 2, defrecord: 3, defrecordp: 2, defrecordp: 3, assert: 1, assert: 2, assert_in_delta: 3, assert_in_delta: 4, ...], operand_nesting: 2, inspect_opts: %Inspect.Opts{base: :decimal, binaries: :infer, char_lists: :infer, charlists: :infer, custom_options: [], inspect_fun: &Inspect.inspect/2, limit: 50, pretty: false, printable_limit: 4096, safe: true, structs: true, syntax_colors: [], width: 80}, normalize_bitstring_modifiers: true, skip_eol: false, normalize_charlists_as_sigils: true, sigils: %{}}

        # 4
        #Function<0.25879960/3 in Code.Formatter.args_to_algebra_with_comments/7>

    (elixir 1.16.0) lib/code/formatter.ex:1993: Code.Formatter.each_quoted_to_algebra_without_comments/4
    (elixir 1.16.0) lib/code/formatter.ex:1984: Code.Formatter.quoted_to_algebra_with_comments/6
    (elixir 1.16.0) lib/code/formatter.ex:1721: Code.Formatter.args_to_algebra_with_comments/7
    (elixir 1.16.0) lib/code/formatter.ex:1530: Code.Formatter.map_to_algebra/4
    (elixir 1.16.0) lib/code/formatter.ex:727: Code.Formatter.binary_op_to_algebra/8
    (elixir 1.16.0) lib/code/formatter.ex:492: Code.Formatter.quoted_to_algebra/3
    (elixir 1.16.0) lib/code/formatter.ex:1695: anonymous fn/5 in Code.Formatter.args_to_algebra_with_comments/7
    (elixir 1.16.0) lib/code/formatter.ex:1713: Code.Formatter.args_to_algebra_with_comments/7

As we're using the representations for our community solutions search, this means no community solutions are shown: https://exercism.org/tracks/elixir/exercises/dancing-dots/solutions

angelikatyborska commented 8 months ago

I'm trying to reproduce failures locally using the exemplar solution to dancing-dots and I can't.

I'm also confused about the stack trace of this error. The stack trace doesn't contain any files from the representer project, it's just all standard lib calls. But then again, maybe that's normal from an escript? However, the outermost function call, args_to_algebra_with_comments, does not appear in the representer's codebase 😕 we have Code.string_to_quoted! or Code.format_string! that could maybe be related?

angelikatyborska commented 8 months ago

I'm trying to reproduce failures locally using the exemplar solution to dancing-dots and I can't.

False alarm, I reproduced it now 🙂 I didn't notice that this exercise has extra files in the lib besides the exemplar solution.