AmpersandTarski / Ampersand

Build database applications faster than anyone else, and keep your data pollution free as a bonus.
http://ampersandtarski.github.io/
GNU General Public License v3.0
40 stars 8 forks source link

Odd behaviour #1472

Open stefjoosten opened 4 months ago

stefjoosten commented 4 months ago

What happened

I ran a reasonably straightforward script on a codespace and in a locally running project template:

CONTEXT Issue1472
PURPOSE CONTEXT Issue1472 
{+ There is an error in the Codespace deployment. I'm trying to reproduce it in a small script. +}

RELATION refer[Identifier*Entity] [TOT]

RELATION name[Identifier*Name] [UNI,TOT]

VIEW Identifier : Identifier(name)

INTERFACE Identifiers: "_SESSION";V[SESSION*Identifier] BOX
       [ id : I
       , name : name
       , entity : refer
       ]

ENDCONTEXT

The prototype does NOT behave as expected. Here is a video of the wrong behaviour.

In the following script, I am removing the relation refer

CONTEXT Issue1472a
PURPOSE CONTEXT Issue1472a
{+ There is an error in the Codespace deployment. I'm trying to reproduce it in a small script. +}

RELATION name[Identifier*Name] [UNI,TOT]

VIEW Identifier : Identifier(name)

INTERFACE Identifiers: "_SESSION";V[SESSION*Identifier] BOX
       [ id : I
       , name : name
       ]

ENDCONTEXT

Now, this video shows the behaviour I get. Surprisingly, this is the desired behaviour.

What I expected

I expected both scripts to behave like the second one.

Version of ampersand that was used

Steps to reproduce

  1. Go to the codespace
  2. The experiment is still there, open for investigation.

I reproduced the experiment on a locally running project template and deployed it with docker, just to confirm my hunch that this has nothing to do with deployment. I believe we need a diagnosis first. My gut feeling is this has to do with bitrot.

stefjoosten commented 4 months ago

This issue and issue #1471 make it obvious to me that we need API-scenario tests in the regression, to prevent code rot in subsequent versions.

hanjoosten commented 4 months ago

Which codespace are you running exactly?