-
Notifications
You must be signed in to change notification settings - Fork 8
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
Compile time restrictions w.r.t SESSION #1459
Comments
The very first message warns you that there exists a database that was deployed based on another (version) of an ampersand script. It also warns you that that database has a different structure that the database that would be generated by your script. It is by design that Ampersand does not automatically delete that old database to be able to install a new one with the required structure. As a consequence, the old database is as is. In some cases you can be lucky, in other cases it might lead to errors. Like in this case. The only way I see to avoid these bugs is to delete the old database instead of generating a warning. Since this can cause serious data loss, I think this is unacceptable. The current behavior, warn about the change of the structure and throwing an error with a suggestion to reinstall the database is in my opinion the best alternative. |
Han, your diagnosis misses the point. Please reconsider after rereading the issue. The minimized example demonstrates the bug. |
I cannot reproduce this error. Normally, when you see such red error, you can click on it and it reveals details, sometimes with valuable clues. Could you show these? |
What happened
I got a run time error message immediately after deploying a script:
I was surprised because the compiler found my script correct and yet its deployment produces a database error. Since Ampersand must generate code that doesn't break, this is a bug.
Analysis
I made the script as small as I could, based on the assumption that there is something wrong with my use of "SESSION". This is the script:
And this is what I saw:
Obviously, I should not have obtained a red error message because Ampersand must never generate software that breaks. So even though this error message looks different, it exposes some way of using SESSION that isn't kosher.
What I expected
In the small example, I expected to see the following
Version of ampersand that was used
Steps to reproduce
Screenshot / Video
Context / Source of ampersand script
The text was updated successfully, but these errors were encountered: