You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we build the context in order that the options were provided
This has caused confusion, such as with this example where it was not obvious why it didn't work:
funcnewContext() (context.Context, *_dal.DAL) {
ctx:=ftltest.Context(
ftltest.WithMapsAllowed(),
ftltest.WithDatabase(dbHandle), // <--- Assumes we have DSNsftltest.WithDefaultProjectFile(), // <--- Provides DSNs
)
dal:=_dal.New(dbHandle.Get(ctx))
returnctx, dal
}
We may want to always handle project file options first, which would solve this issue.
Alternatively we could detect that the project file option was provided after options that could make use of it so atleast we explain to the user what to change.
The text was updated successfully, but these errors were encountered:
fixes#1866
introduces a rudimentary partial ordering scheme for context options -
this is used to sort them before they get executed to build the context
We may want to always handle project file options first, which would solve this issue.
Alternatively we could detect that the project file option was provided after options that could make use of it so atleast we explain to the user what to change.
The text was updated successfully, but these errors were encountered: