Skip to content

New lock warning breaks Elixir-to-Elixir pipeline #14136

@halostatue

Description

@halostatue

Elixir and Erlang/OTP versions

Erlang/OTP 27 [erts-15.1.2] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]

Elixir 1.18.1 (compiled with Erlang/OTP 27)

Operating system

Linux, macOS

Current behavior

I have a workflow that runs a self-test through a pipe:

$ git clone https://github.com/KineticCafe/app_identity
$ cd app_identity/elixir
$ mix
$ mix app_identity generate --stdout | mix app_identity run --stdin

Under Elixir 1.18, I get the following exception:

** (Jason.DecodeError) unexpected byte at position 0: 0x57 ("W")
    (jason 1.4.4) lib/jason.ex:92: Jason.decode!/2
    (app_identity 1.3.2) support/app_identity/suite/runner.ex:104: AppIdentity.Suite.Runner.piped_suite/1
    (app_identity 1.3.2) support/app_identity/suite/runner.ex:68: AppIdentity.Suite.Runner.run_suites/2
    (app_identity 1.3.2) support/app_identity/suite/runner.ex:61: AppIdentity.Suite.Runner.run/1
    (mix 1.18.1) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.18.1) lib/mix/cli.ex:107: Mix.CLI.run_task/2
…

It works under Elixir 1.10 through Elixir 1.17.

The standard input read (via an inspect) is:

"Waiting for lock on the build directory (held by process 83881)\n{\n  \"name\": \"AppIdentity for Elixir\",\n …

Running these with an intermediate file (mix app_identity generate --stdout > x && mix app_identity run --stdin < x) produces no warning.

Expected behavior

The Waiting for lock… message should not be written to stdout, but to stderr.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions