Skip to content

Env vars config#20

Merged
4lve merged 2 commits into
Steel-Foundation:masterfrom
ReCore-sys:master
Jul 6, 2026
Merged

Env vars config#20
4lve merged 2 commits into
Steel-Foundation:masterfrom
ReCore-sys:master

Conversation

@ReCore-sys

@ReCore-sys ReCore-sys commented Jul 6, 2026

Copy link
Copy Markdown

Added environment variable based enabling/disabling of extractors and closing on exit. By default it will run the same as it used to, but you can add environment variables (such as STEEL_EXTRACTOR_ENABLE_CHUNK_EXTRACTION=false) to disable the chunk extraction.
Also modifed the gradle config to automatically download a JDK if there isn't one install/it's the wrong version.

// Example: STEEL_EXTRACTOR_DISABLE_BLOCKS=1
val immediateExtractors = mutableListOf<Extractor>()
fun addUnlessDisabled(name: String, supplier: () -> Extractor) {
if (envFlag("STEEL_EXTRACTOR_DISABLE_$name")) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does by default it return true ? to have all feature enable by default (and personally also like have the possibility to enable it with cli with arg)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah if the env var doesn't exist it will add it to the list so assuming you don't do anything, they all get used. And CLI is a bit trickier and might be harder with CI. Also get's annoying if you want to disable a majority of the extractors.

@ReCore-sys

Copy link
Copy Markdown
Author

Docs updated in this PR: Steel-Foundation/SteelDocs#33

@4lve 4lve merged commit 6ec7d2b into Steel-Foundation:master Jul 6, 2026
1 check passed
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