[Ur] code bug
Adam Chlipala
adamc at csail.mit.edu
Tue Oct 1 07:34:47 EDT 2013
Oh, interesting; my abstraction of your test case led me to find and fix
a different bug than was actually causing trouble for you. ;)
I think I've now fixed the original bug, in the public repo!
On 10/01/2013 07:17 AM, Sergey Mironov wrote:
> Hmm, that could be, but if you mean the database directive of the
> *urp, then I should say that I have one:
>
> database dbname=App.db
>
> I'll pull the urweb updates soon. For now I've created small project
> containing the error and the copy of webapp.c. Repo is located here:
>
> https://github.com/grwlf/urbugs/blob/master/AppMM.ur
>
> Regards,
> Sergey
>
> 2013/10/1 Adam Chlipala<adamc at csail.mit.edu>:
>
>> On 09/30/2013 12:21 PM, Sergey Mironov wrote:
>>
>>> Consider following code:
>>>
>>> fun noDml (q:dml) : transaction {} =
>>> e<- tryDml q;
>>> return {}
>>>
>>> task initialize = fn {} =>
>>> noDml (INSERT INTO page(Id, Caption) VALUES (0, "Top"));
>>> noDml (INSERT INTO page(Id, Caption) VALUES (1, "Top"));
>>> return {}
>>>
>>> When compiling, urweb issues the following error:
>>>
>>> dev:[grwlf at greyblade:~/proj/urdesign]$ LANG=C make
>>> building stamp1
>>> urweb -dbms sqlite AppMM
>>> /tmp/filestFy18/webapp.c:371:37: error: unknown type name 'uw_Basis_dml'
>>>
>>>
>>
>> Ah, this was just a case of a bad error message. I meant for the compiler
>> to complain that you haven't used a 'database' directive to declare the
>> database connection of this application, so it is not legal to use SQL
>> actions. There was a bug in the analysis for detecting when SQL is used in
>> program code, and your experience with small program variants "fixing" the
>> problem is just based on the particularities of that bug. It's fixed now,
>> in a changeset pushed to the public repo.
>>
More information about the Ur
mailing list