Skip to content
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

Softcode import #349

Merged
merged 1 commit into from
Jan 30, 2025
Merged

Softcode import #349

merged 1 commit into from
Jan 30, 2025

Conversation

mandolaerik
Copy link
Contributor

@mandolaerik mandolaerik commented Jan 27, 2025

No description provided.

@mandolaerik
Copy link
Contributor Author

The same can be done in DLS, but the change there should wait some time to stay compatible with base packages without the change (imports are idempotent so the change to the lib is backward compatible with old DLSes).

@syssimics
Copy link
Contributor

Verification #14348287: ❌ fail

@syssimics
Copy link
Contributor

Verification #14348326: ✅ pass

@JonatanWaern
Copy link
Contributor

The same can be done in DLS, but the change there should wait some time to stay compatible with base packages without the change (imports are idempotent so the change to the lib is backward compatible with old DLSes).

Noted.

@lwaern-intel
Copy link
Contributor

Hm. What made it special? Why wasn't it soft-coded to begin with?

@mandolaerik
Copy link
Contributor Author

Used to be this not so long ago:

     implicit_imports = [
         ast.import_(SimpleSite("%s:0" % (inputfilename,)), "dml-builtins.dml"),
         ast.import_(SimpleSite("%s:0" % (inputfilename,)),
                     simics_api_file(version, dml.globals.api_version))]

and further archeology points to this change 2013:

 def simics_api_file(dml_version, api_version):
-    if api_version.startswith('3') or api_version == '4.0':
-        return "simics/obsolete/limited-dml-simics-api.dml"
-    else:
-        return "simics/device-api.dml"
+    assert (dml_version == (1,2)
+            and not (api_version.startswith('3') or api_version == '4.0'))
+    return "simics/device-api.dml"

Copy link
Contributor

@lwaern-intel lwaern-intel left a comment

Choose a reason for hiding this comment

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

That's pretty funny

@mandolaerik mandolaerik merged commit 6274e77 into intel:main Jan 30, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants