diff --git a/compiler/build.sbt b/compiler/build.sbt index 7f6416e0a..a7e49def2 100644 --- a/compiler/build.sbt +++ b/compiler/build.sbt @@ -4,7 +4,7 @@ name := "edg-compiler" version := "0.1-SNAPSHOT" -scalaVersion := "2.13.14" +scalaVersion := "2.13.18" scalacOptions += "-deprecation" diff --git a/edg/core/Core.py b/edg/core/Core.py index e1647bb53..388bdf11f 100644 --- a/edg/core/Core.py +++ b/edg/core/Core.py @@ -245,17 +245,7 @@ def _name_from(self, base: LibraryElement, allow_unknown: bool = False) -> str: def _static_def_name(cls) -> str: """If this library element is defined by class (all instances have an equivalent library definition), returns the definition name. Otherwise, should crash.""" - if cls.__module__ == "__main__": - # when the top-level design is run as main, the module name is __main__ which is meaningless - # and breaks when the HDL server tries to resolve the __main__ reference (to itself), - # so this needs to resolve the correct name - import inspect - import os - - module = os.path.splitext(os.path.basename(inspect.getfile(cls)))[0] - else: - module = cls.__module__ - return module + "." + cls.__name__ + return cls.__module__ + "." + cls.__name__ def _get_def_name(self) -> str: """Returns the definition name""" diff --git a/edg/core/HierarchyBlock.py b/edg/core/HierarchyBlock.py index a05824976..8de595f02 100644 --- a/edg/core/HierarchyBlock.py +++ b/edg/core/HierarchyBlock.py @@ -505,9 +505,8 @@ def _def_to_proto(self) -> edgir.HierarchyBlock: ref_map = self._create_ref_map() pb = edgir.HierarchyBlock() - pb.prerefine_class.target.name = ( - self._get_def_name() - ) # TODO integrate with a non-link populate_def_proto_block... + # TODO integrate with a non-link populate_def_proto_block... + pb.prerefine_class.target.name = self._get_def_name() self._populate_def_proto_block_base(pb) self._populate_def_proto_port_init(pb, ref_map) diff --git a/edg/core/resources/edg-compiler-precompiled.jar b/edg/core/resources/edg-compiler-precompiled.jar index 01ec30d99..0a269c6e7 100644 Binary files a/edg/core/resources/edg-compiler-precompiled.jar and b/edg/core/resources/edg-compiler-precompiled.jar differ diff --git a/pyproject.toml b/pyproject.toml index 50ed0c8e3..d4693f5a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,11 +18,11 @@ classifiers = [ keywords = ["PCB", "hardware description language"] dependencies = [ "protobuf >= 3.20.0", - "sexpdata==0.0.3", - "Deprecated==1.2.14", + "sexpdata ~= 1.0", + "Deprecated ~= 1.0", "typing_extensions >= 4.4.0", - "pydantic == 2.8.2", - "install-jdk == 1.1.0", + "pydantic ~= 2.0", + "install-jdk ~= 1.0", ] requires-python = ">=3.9"