Type checking helps find a number of errors in seed packet definition at parse time. But there are other possible errors that it would be good to catch earlier.
For example, SeedReference to an invalid seed in the same packet. In the future there will likely be other problems (and possibly other warnings, a lint). Once there is a verifyPacket() for an unrolled packet, I'm sure we'll figure out other things to verify.
Once this is done, a convention for let/var is to have a named seed that wraps it:
That way you can fail at packet parse if you have the wrong variable name.
If you want this to be internal, make sure it's marked private:true. But if it's private:false then it's able to be used by other seed packets.
Originally tracked in #36.
[x] Verify that every in-packet reference in a packet points to a seedID that exists.
[ ] Warn if there is a let on a private seed that has only one associated var, which is an unnecessary let. Return an error (not thrown) from vverifySeedPacket. (don't throw it if threre's an out-of-packet seed reference that we haven't loaded)
[x] A noop seed type (like log but just literally returns value.
[x] Warn if a namespace is not set
[x] The CLI should print out warnings if --warn is set
Type checking helps find a number of errors in seed packet definition at parse time. But there are other possible errors that it would be good to catch earlier.
For example,
SeedReference
to an invalid seed in the same packet. In the future there will likely be other problems (and possibly other warnings, a lint). Once there is a verifyPacket() for an unrolled packet, I'm sure we'll figure out other things to verify.Once this is done, a convention for let/var is to have a named seed that wraps it:
That way you can fail at packet parse if you have the wrong variable name.
If you want this to be internal, make sure it's marked
private:true
. But if it'sprivate:false
then it's able to be used by other seed packets.Originally tracked in #36.
var
, which is an unnecessary let. Return an error (not thrown) from vverifySeedPacket. (don't throw it if threre's an out-of-packet seed reference that we haven't loaded)noop
seed type (like log but just literally returns value.--warn
is set