From ca6067f4db07bea7292efeed867b75167e28b44e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Wa=C5=9Bko?= Date: Wed, 16 Oct 2024 13:25:19 +0200 Subject: [PATCH] Revert "Add `Meta.engine_version` (#11320)" This reverts commit 21bd05f3189c729d480eea5cdca123e29e5df3ab. --- .../lib/Standard/Base/0.0.0-dev/src/Meta.enso | 6 --- .../meta/CurrentEngineVersionNode.java | 45 ------------------- test/Base_Tests/src/Semantic/Meta_Spec.enso | 5 --- 3 files changed, 56 deletions(-) delete mode 100644 engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/meta/CurrentEngineVersionNode.java diff --git a/distribution/lib/Standard/Base/0.0.0-dev/src/Meta.enso b/distribution/lib/Standard/Base/0.0.0-dev/src/Meta.enso index 230da42d53e2..49d4095ef40c 100644 --- a/distribution/lib/Standard/Base/0.0.0-dev/src/Meta.enso +++ b/distribution/lib/Standard/Base/0.0.0-dev/src/Meta.enso @@ -688,9 +688,3 @@ type Instrumentor - fqn: fully qualified name. find_type_by_qualified_name : Text -> Any find_type_by_qualified_name fqn = @Builtin_Method "Meta.find_type_by_qualified_name" - -## PRIVATE - ADVANCED - Returns the version of the currently running Enso engine. -engine_version : Text -engine_version = @Builtin_Method "Meta.engine_version" diff --git a/engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/meta/CurrentEngineVersionNode.java b/engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/meta/CurrentEngineVersionNode.java deleted file mode 100644 index 881446ef38c3..000000000000 --- a/engine/runtime/src/main/java/org/enso/interpreter/node/expression/builtin/meta/CurrentEngineVersionNode.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.enso.interpreter.node.expression.builtin.meta; - -import com.oracle.truffle.api.CompilerDirectives; -import com.oracle.truffle.api.nodes.Node; -import org.enso.interpreter.dsl.BuiltinMethod; -import org.enso.interpreter.runtime.data.text.Text; -import org.enso.version.BuildVersion; - -@BuiltinMethod( - type = "Meta", - name = "engine_version", - description = "Returns the version of the currently running Enso engine.", - autoRegister = false) -public class CurrentEngineVersionNode extends Node { - - public Text execute() { - return getCurrentVersion(); - } - - @CompilerDirectives.TruffleBoundary - private Text getCurrentVersion() { - StringBuilder sb = new StringBuilder(); - sb.append("Enso Engine Version: "); - sb.append(BuildVersion.ensoVersion()); - sb.append("\nDefault Edition: "); - sb.append(BuildVersion.currentEdition()); - - sb.append("\nCompiled with GraalVM "); - sb.append(BuildVersion.graalVersion()); - sb.append(", Scalac "); - sb.append(BuildVersion.scalacVersion()); - - sb.append("\nBased on commit "); - sb.append(BuildVersion.commit()); - sb.append(" (at "); - sb.append(BuildVersion.latestCommitDate()); - sb.append(")\non ref "); - sb.append(BuildVersion.ref()); - if (BuildVersion.isDirty()) { - sb.append("\n(with uncommitted changes)"); - } - - return Text.create(sb.toString()); - } -} diff --git a/test/Base_Tests/src/Semantic/Meta_Spec.enso b/test/Base_Tests/src/Semantic/Meta_Spec.enso index 42d75e555327..9714a3882d9e 100644 --- a/test/Base_Tests/src/Semantic/Meta_Spec.enso +++ b/test/Base_Tests/src/Semantic/Meta_Spec.enso @@ -476,11 +476,6 @@ add_specs suite_builder = typ = Meta.Type.find fqn typ . should_equal meta_type - suite_builder.group "Engine Metadata" group_builder-> - group_builder.specify "should return engine version" <| - version = Meta.engine_version - version.should_contain "Enso Engine Version:" - main filter=Nothing = suite = Test.build suite_builder-> add_specs suite_builder