mgmt icon indicating copy to clipboard operation
mgmt copied to clipboard

type unification regression

Open purpleidea opened this issue 1 year ago • 3 comments

This simple code used to work. I think I broke it, and it fails at type unification. Add a simple test in TestAstFunc1 and bisect the regression! Bonus points if you have a fix, although please ask for help before digging too deeply into it.

http:server ":8080" {
	timeout => 60,		# XXX why is this breaking type unification?
}

Broken in 7777107d83ff21094392a637bb426e2a1bad5cf1 Worked some time not too long ago.

purpleidea avatar Jan 29 '24 04:01 purpleidea

Sounds like what I could do is add a new test in txtar format in lang/interpret_test/TestAstFunc1 then do something like:

git checkout master
cd lang
git bisect start HEAD 0.0.24 -- .

Then as I go, do go test -run TestAstFunc1 and see what pops up? I'm assuming the tag 0.0.24 is a "good" commit here, but I see there's been approx. 160 commits since...

Not sure yet what will go in the test mcl file but just wanted to see if this strategy is what you had in mind? What do you think?

ollytom avatar Jan 30 '24 02:01 ollytom

Sounds perfect! Note that TestAstFunc1 has sub tests, so you can -run TestAstFunc1/test_#11_ (or whatever number it is) to just run the one test. If you run the test with -short, it will show you all the numbers. Keep in mind the number are unfortunately not stable between commits necessarily. So name it 000.txtar or something to ensure it's always first.

purpleidea avatar Jan 30 '24 04:01 purpleidea

FYI: I have a large feature branch which is not yet finished, that totally rewrites type unification and solving, so this issue should probably be ignored for now, until that's merged. With any luck we'll have fixed the bug.

purpleidea avatar May 16 '24 04:05 purpleidea