!lymvtcwDJ7ZA9Npq:lix.systems

Lix Development

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

Load older messages


SenderMessageTime
10 Dec 2024
@jade_:matrix.orgjade_
In reply to @9999years:matrix.org
but nothing actually checks them
i want to completely Obliterate the fixture system and replace it with one that mandates annotations and just has a registry of fixtures
18:50:16
@jade_:matrix.orgjade_but this is like, totally doable with 100% source compatibility as long as we are hardasses about type annotations, and we keep the current situation where we kinda dont do anything that weird with fixtures in the first place18:51:19
@jade_:matrix.orgjade_like, the way that i see us using pytest is not using much of their discovery system, using their assert rewriting system, and none of their actual running/state code18:53:18
@jade_:matrix.orgjade_including possibly not using their fixture system either. the pytest fixture system exists to combine context managers imo18:53:43
@jade_:matrix.orgjade_its a syntactic hack to deal with nesting of context managers. if you introduced a composition primitive for context managers, it would become far less interesting. now yes there is sharing of those and maybe we want the ability to do that, but i think theres got to be different ways we can actually achieve the sharing; i dont personally care that much about sharing in our use case18:54:36
@jade_:matrix.orgjade_https://git.lix.systems/lix-project/lix/issues/594 anyway here is the rfc issue for possible pytest replacement18:55:07
@jade_:matrix.orgjade_but like, i think it is easy enough to preserve adequate source compat that we can replace pytest in the future18:55:26
@jade_:matrix.orgjade_https://git.lix.systems/lix-project/lix/issues/600 here's another value-adding thing that could be built for the test suite there is the other question of whether python is the right choice. i still do think it is, since it is highly unfortunate to have to eat the build time and worse iteration loop of rust or so, and i would strongly prefer to avoid having more C++ especially due to its effects on build time. it is a bit more accessible than rust also. there is also no barrier to using it since it is an unavoidable forced lix dependency due to meson. rust tooling is nice and does allow for directly linking to lix and thus in the future maybe more reuse of fixturing for unit vs integration tests (but execve() exists also for stuff like fixturing a web server, so idk). however, libtest being very tightly coupled to the compiler makes it quite hard to do particularly interesting things with rust test suites, and there is no well-integrated solution to the problem of sharing fixtures or so. i think in general python gives us more flexibility but i think it is important to commit to something rather than letting ourselves get too busy yak shaving. regardless of what we choose to do we are going to have to invest a fair amount of time in fixturing work to make writing tests nice.19:31:19
@charles:computer.surgeryCharlesif i were to write a test suite thingy in rust i would probably just write it as a regular crate, not using any existing test harness; idk19:42:58
@charles:computer.surgeryCharlesi feel like python is a reasonable choice19:44:34
@charles:computer.surgeryCharlesi don't really have a horse in this race, so sorry if me sharing my opinion is more annoying than anything else19:44:51
@jade_:matrix.orgjade_i do appreciate you sharing your opinion though; knowing that pytest is indeed painful in the expected ways is valuable info19:47:15
@jade_:matrix.orgjade_if we would be writing it as a normal crate, it puts both rust and python on the same playing field, that we would be writing a runner19:47:42
@jade_:matrix.orgjade_ puck: do you know how to figure out why our gerrit is sitting here on 100% cpu on two cores? my specific annoyance is trying to use the ssh cli and having it not answer ssh gerrit gerrit --help 19:49:35
@piegames:flausch.socialpiegamesOne minor annoyance I have with current functional-lang is that everything is just thrown into some huge flat folders. I find these pretty uncomfy to navigate19:50:38
@piegames:flausch.socialpiegamesalso having to touch multiple files per test is tedious as well IMO19:50:51
@jade_:matrix.orgjade_yeah19:51:51
@jade_:matrix.orgjade_oh speaking of which let me file another feature request for functional219:52:04
@jade_:matrix.orgjade_specifically a little DSL to throw stuff into the test-dir19:52:16
@puck:puck.moepuck
In reply to @jade_:matrix.org
puck: do you know how to figure out why our gerrit is sitting here on 100% cpu on two cores? my specific annoyance is trying to use the ssh cli and having it not answer ssh gerrit gerrit --help
uhhhhhh, jdwp it? :p
19:55:15
@puck:puck.moepucki'm probably not able to do this rn19:55:24
@jade_:matrix.orgjade_alright i can try to attach uhhh visualvm to it i guess19:55:36
@puck:puck.moepuck https://github.com/patric-r/jvmtop/blob/master/doc/ConsoleProfiler.md hmm 19:56:40
@jade_:matrix.orgjade_
In reply to @jade_:matrix.org
specifically a little DSL to throw stuff into the test-dir
filed
19:56:42
@charles:computer.surgeryCharlessomething else that might be worth investigating is snapshot testing. snapshot testing really excels when you need to run the same testing logic on different inputs and assert on the outputs19:56:47
@jade_:matrix.orgjade_theres an expecttest issue filed on lix, and i implemented expect testing that is as good as the rust one on the train to here :319:57:48
@jade_:matrix.orgjade_it is merged into the upstream expecttest python lib, just needs a release19:58:00
@charles:computer.surgeryCharlesvery nice19:58:05
@jade_:matrix.orgjade_ Expect("""foo""").assert_expected("bar") does exactly what you think it does 19:58:29
@jade_:matrix.orgjade_and can rewrite the sources19:58:38

Show newer messages


Back to Room ListRoom Version: 10