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

chore(std/http): server module name migration #11890

Merged

Conversation

cmorten
Copy link
Contributor

@cmorten cmorten commented Sep 1, 2021

Relates to https://github.com/denoland/deno_std/discussions/1034 and denoland/deno_std#1128.

For expedience I have made the simplest change of migrating server.ts -> server_legacy.ts. It would be good to use the new std/http APIs for these tests in future - happy to try rework these, but will take a little longer to do. If we do go with this, we can raise an issue to cover this off at a slower cadence.

@cmorten
Copy link
Contributor Author

cmorten commented Sep 1, 2021

I believe this won’t pass CI until the next version of std is released.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

@cmorten test_util/std/ is a git submodule, so we don't have to wait for std release to update it. Let me know if you want to try and do that or should I

@cmorten
Copy link
Contributor Author

cmorten commented Sep 2, 2021

Hmm I believe I've updated the submodule ok @bartlomieju (please shout if not!), but looks like there are some errors thrown in the format tests - the result of some changes @kitsonk made prior to the "native" HTTP server work in std for TypeScript 4.4 support denoland/deno_std#1171.

Not sure how best to proceed? Happy to raise a PR to try resolve the type issues in std as seen by this repo (but not std's CI)?

@bartlomieju
Copy link
Member

Hmm I believe I've updated the submodule ok @bartlomieju (please shout if not!), but looks like there are some errors thrown in the format tests - the result of some changes @kitsonk made prior to the "native" HTTP server work in std for TypeScript 4.4 support denoland/deno_std#1171.

Not sure how best to proceed? Happy to raise a PR to try resolve the type issues in std as seen by this repo (but not std's CI)?

Yes, format and lint script use latest deno binary and the TypeScript update is not yet available there. I guess we'll have to wait for 1.14 release before we can update deno_std submodule.

@cmorten
Copy link
Contributor Author

cmorten commented Sep 3, 2021

Yes, format and lint script use latest deno binary and the TypeScript update is not yet available there. I guess we'll have to wait for 1.14 release before we can update deno_std submodule.

Curiously in CI, the lint steps were fixed to v1.11.3 which is 2 minor versions behind latest? (last updated in #11369). I've updated for the purpose of this PR - let me know if any reason why couldn't bump to the latest!

Seems this just uncovers the old test issue which thought would be solved by the std submodule update, so will have a debug locally to see what's going on...

…map magic points to the local `https_deno.land-std-http-server.ts` file 🤦
@cmorten
Copy link
Contributor Author

cmorten commented Sep 4, 2021

Ok think it's sorted - I had misunderstood the file_tests-checkwithconfig.ts test's use of

import { ServerRequest } from "https://deno.land/std/http/server.ts";

This isn't going to the std lib, but instead resolves to a local https_deno.land-std-http-server.ts mock via importmap. See #8167 and #8163 for details. We could consider renaming the import + mock file so to not to cause the same confusion in future, but not sure if that detracts from the test - I suspect it is fine as-is, and actually looking at the blame + test setup quickly pointed to the purpose.

@cmorten
Copy link
Contributor Author

cmorten commented Sep 4, 2021

@bartlomieju all issues resolved now 🤞🏻

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for looking into this Craig!

@bartlomieju bartlomieju merged commit 930cb0a into denoland:main Sep 5, 2021
@cmorten cmorten deleted the chore/prepare-for-new-native-server branch September 5, 2021 22:16
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.

None yet

2 participants