-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
false match on lines ending with import
#43
Comments
R4R: Combined three stores into one with Whois struct as value Agoric#2
Three stores had been combined in Agoric#43.
Vats normally use send() to queue messages for things they've imported (either the exports of other vats, or kernel promises which hopefully resolve to an export of some other vat). But if a Vat uses send() on one if its own exports, that will queue a message which will be delivered back to themselves later. There's currently no good reason to do this, and it probably indicates the vat got confused about what it was passing to send(). So for now, detect this and throw an exception. This might change when we add escalators later, but even then I can't currently imagine a scenario in which we want to defer execution that isn't more efficient to express with a local `Promise.resolve`. closes Agoric#43
@agoric/evaluate: use published version 1.1.0
@warner I'm assigning to myself and closing, under the assumption that this is fixed enough and is not currently an active thorn in our side. If I need to do more on this, please reopen and leave assigned to me. |
Not so related, but i'm having this |
The SES code that prohibits dynamic import expressions doesn't use a full parser, so it gets false matches when the word
import
appears just before a comment opening token, possibly separated by whitespace. Twice I've had this trigger on comments in my code that look like:The scanner doesn't know that
import
is already in a comment, so it is guarding against:SES should eventually learn to ignore the first, but for now it would be nice if SwingSet just had a nicer error message. The one you get happens after
rollup
finishes combining all the files into a single string, and then you get an error referring to the line number in the merged file:I'm thinking maybe we scan the
rollup
output for/\bimport\s*$/
and then if eval() throws, we print the full line that matched, rather than just the line number of a string that only ever existed in memory. Not sure quite where we'd do this, it may have to go into SES itself.The text was updated successfully, but these errors were encountered: