~sircmpwn/hare-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
3 3

[PATCH hare] hare build: create empty td file if necessary

Details
Message ID
<20240205173241.3035-1-ecs@d2evs.net>
DKIM signature
pass
Download raw message
Patch: +1 -3
we can decide whether to make modules without hare sources illegal to
import later, but the simplest thing to do is to just make them work as
you'd expect

the reason this caused an abort earlier is that the os::open() for the
temporary td would fail and cleanup_ssa_task would return before
initializing ctx.hashes[mod][stage::TD], such that when the run_task for
the module that depended on it called get_deps(), the
get_cache(..., stage::TD) failed

Fixes: https://todo.sr.ht/~sircmpwn/hare/909
Signed-off-by: Ember Sawady <ecs@d2evs.net>
---
supersedes Enno's patch which makes this an error
 cmd/hare/build/queue.ha | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/cmd/hare/build/queue.ha b/cmd/hare/build/queue.ha
index 56696672..e143aecd 100644
--- a/cmd/hare/build/queue.ha
+++ b/cmd/hare/build/queue.ha
@@ -279,11 +279,9 @@ fn cleanup_ssa_task(ctx: *context, t: *task, out: str) (void | error) = {
	let tmp = strings::concat(out, ".td.tmp");
	defer free(tmp);

	let f = match (os::open(tmp)) {
	let f = match (os::create(tmp, 0o644, fs::flag::RDWR)) {
	case let f: io::file =>
		yield f;
	case errors::noentry =>
		return;
	case let err: fs::error =>
		return err;
	};
-- 
2.43.0

[hare/patches] build failed

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CYXBR0CWDY4B.1ONG8UB4RCR8P@fra02>
In-Reply-To
<20240205173241.3035-1-ecs@d2evs.net> (view parent)
DKIM signature
missing
Download raw message
hare/patches: FAILED in 1m22s

[hare build: create empty td file if necessary][0] from [Ember Sawady][1]

[0]: https://lists.sr.ht/~sircmpwn/hare-dev/patches/49205
[1]: ecs@d2evs.net

✗ #1143805 FAILED  hare/patches/alpine.yml  https://builds.sr.ht/~sircmpwn/job/1143805
✗ #1143807 FAILED  hare/patches/openbsd.yml https://builds.sr.ht/~sircmpwn/job/1143807
✓ #1143806 SUCCESS hare/patches/freebsd.yml https://builds.sr.ht/~sircmpwn/job/1143806
Details
Message ID
<7zqzjnvezvxi5humhcd534ci2ropy4ryogckbp5hobd2zrd5ql@pd4yncdxq2zh>
In-Reply-To
<20240205173241.3035-1-ecs@d2evs.net> (view parent)
DKIM signature
missing
Download raw message
On 24/02/05 17:32:25, Ember Sawady wrote:
> we can decide whether to make modules without hare sources illegal to
> import later, but the simplest thing to do is to just make them work as
> you'd expect

I'd either vote for a warning ('imported module xyz is empty') or just
exposing all submodules with the parent as prefix? Anyway...


Builds and fixes the issue, without having to do shady stuff with
ctx.tests :) Thanks for investigating!
Details
Message ID
<CZJX1GCH1VPC.2XWGJK6TJ40RZ@sebsite.pw>
In-Reply-To
<20240205173241.3035-1-ecs@d2evs.net> (view parent)
DKIM signature
pass
Download raw message
Thanks!

To gitsrht:~sircmpwn/hare
   eac36b91..d61cd911  master -> master
Reply to thread Export thread (mbox)