[go: nahoru, domu]

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

refactor(cli): resolve TODO comment in Version.test.ts #18459

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aqrln
Copy link
Member
@aqrln aqrln commented Mar 23, 2023

This came up during a deep dive meeting with @millsp and @SevInf.

PR marked as draft because we were not sure.

@aqrln aqrln force-pushed the refactor/version-test-todo branch from ae8bc73 to ee5e16f Compare March 23, 2023 18:08
@codspeed-hq
Copy link
codspeed-hq bot commented Mar 23, 2023

CodSpeed Performance Report

Merging #18459 refactor/version-test-todo (ee5e16f) will create unknown performance changes.

Summary

🔥 0 improvements
❌ 0 regressions
✅ 0 untouched benchmarks

🆕 1 new benchmarks
⁉️ 2 dropped benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main refactor/version-test-todo Change
⁉️ client generation ~50 Models 46.9 ms N/A N/A
🆕 client generation 100 models with relations N/A 143.9 ms N/A
⁉️ typescript compilation ~50 Models 12.7 ms N/A N/A

@millsp millsp added this to the 4.12.0 milestone Mar 23, 2023
@@ -112,17 +112,15 @@ function cleanSnapshot(str: string, versionOverride?: string): string {
// ^^^^^^^^^^^^^^^^^^^
str = str.replace(/\(at (.*engines)(\/|\\)/g, '(at sanitized_path/')

// TODO: replace '[a-z0-9]{40}' with 'ENGINE_VERSION'.
// Currently, the engine version of @prisma/prisma-fmt-wasm isn't necessarily the same as the enginesVersion
Copy link
Member

Choose a reason for hiding this comment

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

cc @jkomyno do you know why they aren't necessarily the same versions?

Copy link
Member

Choose a reason for hiding this comment

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

Technically one could use a different one if there are not relevant changes that affect prisma-fmt/schema-wasm maybe, but I don't think our setup is designed to ever actually do that. They should be in sync. (cc @millsp)

Copy link
Contributor

Choose a reason for hiding this comment

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

You can safely remove that TODO.

Originally the Wasm's package version() method returned a constant string (with gibberish, and not the actual engines version). So, we started reading @prisma/prisma-fmt-wasm's version from its own package.json file, which was however upgraded less often than the rest of our Rust crates that result in @prisma/engines-version updates. At some point, we aligned the Rust pipeline with Wasm's, which made the comment highlighted above silently deprecated.

(I had originally missed this notification 🙈 @millsp)

@millsp
Copy link
Member
millsp commented Jul 5, 2023

Do you remember was the outcome of our conversation for this?

@Jolg42 Jolg42 added tech/typescript Issue for tech TypeScript. topic: tech debt Initiatives to improve the experience of working with the code base labels Dec 7, 2023
@CLAassistant
Copy link
CLAassistant commented Jul 8, 2024

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech/typescript Issue for tech TypeScript. topic: tech debt Initiatives to improve the experience of working with the code base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants