Skip to content

Add Vespa Schema Definition language#7880

Open
thomasht86 wants to merge 2 commits intogithub-linguist:mainfrom
thomasht86:add-vespa-schema-definition
Open

Add Vespa Schema Definition language#7880
thomasht86 wants to merge 2 commits intogithub-linguist:mainfrom
thomasht86:add-vespa-schema-definition

Conversation

@thomasht86
Copy link
Copy Markdown

@thomasht86 thomasht86 commented Mar 27, 2026

Description

Add Vespa Schema Definition as a new language. Vespa .sd files define document schemas, ranking profiles, and indexing pipelines for the Vespa search engine. The language has programming characteristics — ranking expressions, tensor operations, conditional logic, and ONNX model integration.

The grammar lives in the vespa-engine/vespa monorepo at integration/tmgrammar/grammar/vespa-schema.tmLanguage.json. Since the grammar directory is named grammar/ (singular) rather than the conventional grammars/, "grammar" was added to GrammarsInNonStdPath in tools/grammars/compiler/data.go. No other submodules use a grammar/ directory with .json files, so there are no false positives.

The .sd extension is not currently claimed by any other language in linguist. Heuristics are included proactively to match Vespa keywords (schema, document, field, rank-profile).

Checklist:

@thomasht86 thomasht86 requested a review from a team as a code owner March 27, 2026 06:43
@thomasht86 thomasht86 force-pushed the add-vespa-schema-definition branch from 754671a to 9244b75 Compare March 27, 2026 06:46
Add Vespa Schema Definition (.sd) as a new programming language with
syntax highlighting grammar from vespa-engine/vespa.
@thomasht86 thomasht86 force-pushed the add-vespa-schema-definition branch from 9244b75 to 6ab9b22 Compare March 27, 2026 06:48
Copy link
Copy Markdown
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

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

See inline comments.

Comment thread lib/linguist/heuristics.yml Outdated
Comment thread lib/linguist/languages.yml Outdated
Comment thread test/test_heuristics.rb Outdated
- Remove heuristics for .sd (single-language extension)
- Remove corresponding heuristics test
- Change type from programming to data
@thomasht86
Copy link
Copy Markdown
Author

Thanks a lot for the quick feedback @lildude!
I see you added "pending popularity" label, but afaict there are a lot more than the requirements?
Vespa Schemas are also most commonly in the "1 per application" - category, althought it is possible to have multiple.
Any chance you could reconsider? 🙏

@thomasht86
Copy link
Copy Markdown
Author

ping @lildude - any pointer on what needs to be done to get this through? ☺️

@lildude
Copy link
Copy Markdown
Member

lildude commented Apr 8, 2026

Popularity is reassessed when preparing for a new release, which happens approximately every 3 months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants