~smlavine/hareimports-dev

Idea on how to deal with enums and build tags

Details
Message ID
<CKHSFJ7ED4SB.1OD2GM9B7984P@archlinux-x220>
DKIM signature
pass
Download raw message
I had the idea, what if the way we did it was that we count module level
enums declared in files with certain builds tags, only in files with the
same build tags? I think this makes sense as this is the way that it
will actually be interpreted by the build driver.

By this I mean: Suppose three files, foo.ha, bar+tag.ha, and baz+tag.ha.
An enum called "strings" is defined in bar+tag.ha. It is interpreted as
being an enum in baz+tag.ha, but interpreted as the stdlib module in
foo.ha.

This is obviously a bit more complicated, but I think it's correct and
removes any need for the -T option.

Does this make sense? Let me know what you think.
Reply to thread Export thread (mbox)