!lymvtcwDJ7ZA9Npq:lix.systems

Lix Development

259 Members
(Technical) development of Lix, the package manager, a Nix implementation. Please be mindful of ongoing technical conversations in this channel.100 Servers

Load older messages


SenderMessageTime
22 Oct 2024
@just1602:systemli.orgjust1602 KFears (tragedy arc): out of curiosity, what are you "bad git habits"? 18:06:46
23 Oct 2024
@navi:tchncs.de@navi:tchncs.de joined the room.05:22:28
@uep:matrix.orguepoof, just had a lix crash pulling in a flake update ..08:42:07
@uep:matrix.orguepoh, no, never mind, there are conflict markers in flake.lock08:42:53
@kfears:matrix.orgKFears (tragedy arc)

I really need someone to help me out on this...
I'm writing a test in Python for Lix. I'm literally trying to do the bare minimum right now. This code hangs infinitely. If I launch the shebang manually - it runs in 2 seconds successfully. How do I even debug this?

from .testlib.fixtures import Nix
from pathlib import Path

def test_trivial_shebang(nix: Nix):
    trivial_shebang = '''
#! /usr/bin/env nix-shell
#! nix-shell --no-substitute
#! nix-shell --pure -i bash -p hello
hello
    '''.strip()
    trivial_path = nix.test_root / "shell.shebang.sh"

    _ = trivial_path.write_text(trivial_shebang)
    trivial_path.chmod(0o777)
    result = nix.call([str(trivial_path), 'abc', 'def'])
    new_path = Path("/tmp/something-something")
    _ = new_path.write_text(result.stdout.decode('utf-8').strip())
    assert result.ok().stdout.decode('utf-8').strip() == 'Hello, world! abc def'
14:30:48
@piegames:flausch.socialpiegames Does strace show anything useful? 14:43:45
@kfears:matrix.orgKFears (tragedy arc)

Haven't tried that. I'm now trying to set all the same env vars and run the thing manually. It looks like something is happening, at the very least:

  /tmp/pytest-of-nixchad/pytest-31/popen-gw2/test_trivial_shebang0/store/xmlkd6c11nl1f3fsqqj2vpya6ll9vra7-hello-2.12.1.tar.gz.drv
  /tmp/pytest-of-nixchad/pytest-31/popen-gw2/test_trivial_shebang0/store/yldz05a86ppdxzqsfj0kaf1mji4515kf-hello-2.12.1.drv
building '/tmp/pytest-of-nixchad/pytest-31/popen-gw2/test_trivial_shebang0/store/q72pnadsjl15qp6l73dvdfig0jl920s6-bison-3.8.2.tar.gz.drv'...
building '/tmp/pytest-of-nixchad/pytest-31/popen-gw2/test_trivial_shebang0/store/dxx9rkl5f0wni9rbrzi165x88wf1vw7v-gcc-12.3.0.tar.xz.drv'...
14:44:55
@kfears:matrix.orgKFears (tragedy arc)Uhh, so it looks like it pulled gcc from cache, and now it compiles Perl5... I really hope I'm not rebuilding stdenv14:52:33
@kfears:matrix.orgKFears (tragedy arc)
make[3]: Entering directory '/build/bison-3.8.2/runtime-po'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/build/bison-3.8.2/runtime-po'
Making all in gnulib-po
make[3]: Entering directory '/build/bison-3.8.2/gnulib-po'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/build/bison-3.8.2/gnulib-po'
Making all in .
make[3]: Entering directory '/build/bison-3.8.2'
  GEN      doc/bison.help
make[3]: Leaving directory '/build/bison-3.8.2'
make[2]: Leaving directory '/build/bison-3.8.2'
/tmp/pytest-of-nixchad/pytest-31/popen-gw2/test_trivial_shebang0/store/70j5mzii8q4z4y3gzk7yzm5r9795ngbp-bootstrap-tools/bin/bash ./tests/testsuite -C tests -j16 AUTOTEST_PATH='/tmp/pytest-of-nixchad/pytest-31/popen-gw2/test_trivial_shebang0/store/g4nyddmadx9wnzry2g8rwnlgczdk8azg-bison-3.8.2/bin'
## --------------------------- ##
## GNU Bison 3.8.2 test suite. ##
## --------------------------- ##

  5: Invalid inputs with {}                          ok
  9: Invalid symbol declarations                     ok
 13: Invalid $n and @n                               ok
 14: Type Clashes                                    ok
  3: Invalid options                                 ok
  2: Invalid number of arguments                     ok
  1: Generating Comments                             ok
  4: Invalid inputs                                  ok
 21: Per-type %printer and %destructor redeclared    ok
 19: Symbol class redefinition                       ok
 12: Symbol declarations                             ok
14:53:36
@k900:0upti.meK900You are14:53:38
@k900:0upti.meK900For sure14:53:40
@kfears:matrix.orgKFears (tragedy arc)Oh god how, why14:54:49
@kfears:matrix.orgKFears (tragedy arc)What have I done to deserve it14:54:59
@k900:0upti.meK900Wrong store?14:55:25
@kfears:matrix.orgKFears (tragedy arc)But I thought the point is to have a temporary store for integration tests?14:59:44
@kfears:matrix.orgKFears (tragedy arc)Why doesn't it substitute?15:00:06
@puck:puck.moepuck…--no-substitute?15:04:04
@kfears:matrix.orgKFears (tragedy arc)I made a re-run without this flag, the logs are from there actually15:05:10
@kfears:matrix.orgKFears (tragedy arc)(I didn't find this flag in nix-shell manual so I'm not sure if it even exists)15:05:41
@puck:puck.moepuckhm. i wonder what config it is using. forgot the command to list config tho lol15:06:06
@puck:puck.moepuckoh, i see15:06:38
@puck:puck.moepuckyou're not on a chroot store15:06:42
@puck:puck.moepuckso it can't reuse the substituted paths15:06:55
@kfears:matrix.orgKFears (tragedy arc)
In reply to @kfears:matrix.org
I made a re-run without this flag, the logs are from there actually
Even if the flag would affect it, it would be pretty weird, because it substitutes gcc and some other things already
15:07:02
@puck:puck.moepuck
In reply to @kfears:matrix.org
make[3]: Entering directory '/build/bison-3.8.2/runtime-po'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/build/bison-3.8.2/runtime-po'
Making all in gnulib-po
make[3]: Entering directory '/build/bison-3.8.2/gnulib-po'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/build/bison-3.8.2/gnulib-po'
Making all in .
make[3]: Entering directory '/build/bison-3.8.2'
  GEN      doc/bison.help
make[3]: Leaving directory '/build/bison-3.8.2'
make[2]: Leaving directory '/build/bison-3.8.2'
/tmp/pytest-of-nixchad/pytest-31/popen-gw2/test_trivial_shebang0/store/70j5mzii8q4z4y3gzk7yzm5r9795ngbp-bootstrap-tools/bin/bash ./tests/testsuite -C tests -j16 AUTOTEST_PATH='/tmp/pytest-of-nixchad/pytest-31/popen-gw2/test_trivial_shebang0/store/g4nyddmadx9wnzry2g8rwnlgczdk8azg-bison-3.8.2/bin'
## --------------------------- ##
## GNU Bison 3.8.2 test suite. ##
## --------------------------- ##

  5: Invalid inputs with {}                          ok
  9: Invalid symbol declarations                     ok
 13: Invalid $n and @n                               ok
 14: Type Clashes                                    ok
  3: Invalid options                                 ok
  2: Invalid number of arguments                     ok
  1: Generating Comments                             ok
  4: Invalid inputs                                  ok
 21: Per-type %printer and %destructor redeclared    ok
 19: Symbol class redefinition                       ok
 12: Symbol declarations                             ok
note how it mentions /tmp/pytest-of-…/store and not /nix/store
15:08:14
@kfears:matrix.orgKFears (tragedy arc) Right, but I thought that's expected, because my store is literally on a different path from /nix/store? 15:09:31
@kfears:matrix.orgKFears (tragedy arc) I vaguely remember something about the store being cursed and pretty much hardcoded to /nix/store if you don't try to have a bad time, but I only remember it vaguely 15:10:38
@puck:puck.moepuck
In reply to @kfears:matrix.org
Right, but I thought that's expected, because my store is literally on a different path from /nix/store?
yes, so it won't be able to substitute
15:10:43
@kfears:matrix.orgKFears (tragedy arc)
In reply to @puck:puck.moe
yes, so it won't be able to substitute
Why?
15:11:21
@puck:puck.moepuckbecause the store dirs don't match; it can't just replace /nix/store with a longer string15:11:55

Show newer messages


Back to Room ListRoom Version: 10