Order/Priority of configuration settings

Just realized a strange behaviour with v2:

I have a script generating a calendar view. That uses some configuration settings via config API (like config.set(“JournalCalendar”, {bla}) )

I run that in my index page with lua expression like ${generate_calendar()}

At first I thought it was working fine, but now I realized this:

After opening my space for the first time in a browsersession, the config seems to be ignored.
After an “System: reload”, everything is working as expected.

So it looks like the config.set is evaluated too late.

I managed it with setting -- priority: 100 for the config and -- priority: 90 for my script.

However, it might be good to evaluate configs before everything else?

I understand the issue, but I’m not sure how to address it other than consciously using ordering with priority. Config is yet another API. It’s code that’s just run whenever the space lua script executes, the order of which is managed by the priority comment that you’re now using. Not sure how I would even prioritize it differently, unless we make config a “special” thing again (like space-config in v1).

The more I think about it, the more logical it is to simply stay with the priority solution :slight_smile:
Fine for me!
Thanks for the confirmation :slight_smile: