Skip to content

Commit 8d1480a

Browse files
authored
Merge pull request #3348 from github/koesie10/ruby-canary
Remove `enableRuby` feature flag
2 parents 4ed6a7b + 00076a9 commit 8d1480a

File tree

3 files changed

+5
-17
lines changed

3 files changed

+5
-17
lines changed

extensions/ql-vscode/src/config.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,6 @@ const LLM_GENERATION_DEV_ENDPOINT = new Setting(
716716
MODEL_SETTING,
717717
);
718718
const EXTENSIONS_DIRECTORY = new Setting("extensionsDirectory", MODEL_SETTING);
719-
const ENABLE_RUBY = new Setting("enableRuby", MODEL_SETTING);
720719
const ENABLE_ACCESS_PATH_SUGGESTIONS = new Setting(
721720
"enableAccessPathSuggestions",
722721
MODEL_SETTING,
@@ -726,7 +725,6 @@ export interface ModelConfig {
726725
flowGeneration: boolean;
727726
llmGeneration: boolean;
728727
getExtensionsDirectory(languageId: string): string | undefined;
729-
enableRuby: boolean;
730728
enableAccessPathSuggestions: boolean;
731729
}
732730

@@ -765,10 +763,6 @@ export class ModelConfigListener extends ConfigListener implements ModelConfig {
765763
});
766764
}
767765

768-
public get enableRuby(): boolean {
769-
return !!ENABLE_RUBY.getValue<boolean>();
770-
}
771-
772766
public get enableAccessPathSuggestions(): boolean {
773767
return !!ENABLE_ACCESS_PATH_SUGGESTIONS.getValue<boolean>();
774768
}

extensions/ql-vscode/src/model-editor/model-editor-module.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,7 @@ export class ModelEditorModule extends DisposableObject {
143143

144144
const language = db.language;
145145

146-
if (
147-
!isQueryLanguage(language) ||
148-
!isSupportedLanguage(language, this.modelConfig)
149-
) {
146+
if (!isQueryLanguage(language) || !isSupportedLanguage(language)) {
150147
void showAndLogErrorMessage(
151148
this.app.logger,
152149
`The CodeQL Model Editor is not supported for ${language} databases.`,

extensions/ql-vscode/src/model-editor/supported-languages.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { QueryLanguage } from "../common/query-language";
2-
import type { ModelConfig } from "../config";
2+
import { isCanary } from "../config";
33

44
/**
55
* Languages that are always supported by the model editor. These languages
@@ -10,17 +10,14 @@ export const SUPPORTED_LANGUAGES: QueryLanguage[] = [
1010
QueryLanguage.CSharp,
1111
];
1212

13-
export function isSupportedLanguage(
14-
language: QueryLanguage,
15-
modelConfig: ModelConfig,
16-
) {
13+
export function isSupportedLanguage(language: QueryLanguage) {
1714
if (SUPPORTED_LANGUAGES.includes(language)) {
1815
return true;
1916
}
2017

2118
if (language === QueryLanguage.Ruby) {
22-
// Ruby is only enabled when the config setting is set
23-
return modelConfig.enableRuby;
19+
// Ruby is only enabled when in canary mode
20+
return isCanary();
2421
}
2522

2623
return false;

0 commit comments

Comments
 (0)