Skip to content

Remove Yaegi #349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/wasm/go-repl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

//
// "go-repl" is a self-contained Go REPL with package downloader to be run in web browser as WASM binary.
// DEPRECATED: Yaegi interpreter is removed in #348.
//

package main
Expand Down
11 changes: 0 additions & 11 deletions web/src/components/elements/inputs/RunTargetSelector/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,6 @@ export const createDropdownOptions = (
description: 'Run program in browser as WebAssembly module.',
},
},
{
key: keyFromOption(TargetType.Interpreter),
text: 'Go Interpreter',
disabled: !supportsWebAssembly,
data: {
icon: SiWebassembly,
iconColor: OptionColors.WebAssembly,
type: TargetType.Interpreter,
description: 'Use Yaegi Go interpreter to run code. Works offline.',
},
},
]

export const dropdownOptionsFromResponse = ({
Expand Down
10 changes: 8 additions & 2 deletions web/src/services/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { type PanelState } from '~/store'
import { defaultPanelProps } from '~/styles/layout'
import { supportsPreferColorScheme } from '~/utils/theme'

import { type RunTargetConfig, defaultRunTarget } from './target'
import { type RunTargetConfig, TargetType, defaultRunTarget } from './target'
import { type MonacoSettings, defaultMonacoSettings } from './monaco'

const DARK_THEME_KEY = 'ui.darkTheme.enabled'
Expand Down Expand Up @@ -56,7 +56,13 @@ const Config = {
},

get runTargetConfig(): RunTargetConfig {
return this.getObject<RunTargetConfig>(RUN_TARGET_KEY, defaultRunTarget)
const cfg = this.getObject<RunTargetConfig>(RUN_TARGET_KEY, defaultRunTarget)
if (cfg.target === TargetType.Interpreter) {
// Yaegi is unsupported anymode, see #348
cfg.target = TargetType.WebAssembly
}

return cfg
},

set runTargetConfig(newVal: RunTargetConfig) {
Expand Down
2 changes: 2 additions & 0 deletions web/src/services/config/target.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ export enum TargetType {

/**
* Execute code inside Go interpreted in browser
*
* @deprecated Replaced by `TargetType.WebAssembly` and not supported anymore.
*/
Interpreter = 'INTERPRETER',
}
Expand Down
1 change: 0 additions & 1 deletion web/src/services/gorepl/index.ts

This file was deleted.

43 changes: 0 additions & 43 deletions web/src/services/gorepl/pkgcache/db.ts

This file was deleted.

208 changes: 0 additions & 208 deletions web/src/services/gorepl/pkgcache/filestore.ts

This file was deleted.

3 changes: 0 additions & 3 deletions web/src/services/gorepl/pkgcache/index.ts

This file was deleted.

31 changes: 0 additions & 31 deletions web/src/services/gorepl/pkgcache/pkgindex.ts

This file was deleted.

17 changes: 0 additions & 17 deletions web/src/services/gorepl/pkgcache/utils.ts

This file was deleted.

Loading
Loading