Skip to content

Enhance consolidated config.yaml and remove extensions.yaml#65

Merged
patritzenfeld merged 4 commits intofmidue:fmiduefrom
nimec01:consolidate-config
Apr 16, 2026
Merged

Enhance consolidated config.yaml and remove extensions.yaml#65
patritzenfeld merged 4 commits intofmidue:fmiduefrom
nimec01:consolidate-config

Conversation

@nimec01
Copy link
Copy Markdown
Collaborator

@nimec01 nimec01 commented Apr 15, 2026

This PR moves the declaration for extra extensions from the extensions.yaml file to the config.yaml file.

It also adds the compile option to adjust how many compiles (default: 4) / error checks (default: 2) can run simultaneously.

The new config looks like this:

preview:
  enabledByDefault: false
  defaultHoleValues:
    "Double -> Picture": "const blank"
    "Double": "0"
    "Color": "black"
    "Picture": "blank"
    "TextStyle": "Plain"
    "Font": "Monospace"
    "Text": "mempty"
    "Data.Text.Internal.Text": "mempty"
    "Point": "(0,0)"
    "Vector": "(0,0)"
extraExtensions:
  codeworld: []
  haskell:
    - LambdaCase
    - NoTemplateHaskell
    - TupleSections

@jvoigtlaender
Copy link
Copy Markdown
Member

For the purpose of discoverability, I'd suggest to actually add entries (with the current default values) for the compile options to the config file. (So that a user looking at that file will know there is something they can adjust.)

@jvoigtlaender
Copy link
Copy Markdown
Member

Do we have any way of knowing/experimenting what values of maxSimultaneousCompiles and maxSimultaneousErrorChecks would "make sense" for us?

That is, are these actually limiting usage scenarios like several students in a lab room concurrently trying to render their Autotool submissions-to-be via CodeWorld?

And could our server handle larger numbers without problems?

@patritzenfeld
Copy link
Copy Markdown
Member

Maybe we could just log when one of the semaphores is exhausted, but there's another request waiting, e.g. something like this in place of the plain MSem.with sem action calls that are currently used:

waitAndLogExhausted name sem action = do
  open <- MSem.peekAvail sem
  when (open < 1) $
    hPutStrLn stderr $ name ++ " has exhausted its available resources, but there is further demand." 
  MSem.with sem action

with waitAndLogExhausted "Compiles" (compileSem ctx) someIO

Then we can see how often requests have to queue up because of the current limit and can try increasing the values.

For how much the server can handle I'm not sure yet. I will look into what the setup is and if there's any additional limitations set on the CodeWorld instance compared to Autotool.

@jvoigtlaender
Copy link
Copy Markdown
Member

Okay, let‘s do the logging stuff in a separate PR.

This here can be merged, I think.

@patritzenfeld patritzenfeld merged commit 39f8b14 into fmidue:fmidue Apr 16, 2026
@nimec01 nimec01 deleted the consolidate-config branch April 27, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants