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

feat: print warning on use of deprecated API #4200

Merged
merged 17 commits into from Jan 22, 2024
Merged

Conversation

iuioiua
Copy link
Collaborator

@iuioiua iuioiua commented Jan 15, 2024

This function prints a friendly warning if the given deprecated API is being used. This implementation is based on denoland/deno#21939, but with a few differences that make more sense for the Standard Library.

image

@iuioiua iuioiua changed the title feat: warnDeprecatedApi() feat: print warning on use of deprecated API Jan 15, 2024
@iuioiua
Copy link
Collaborator Author

iuioiua commented Jan 15, 2024

I think this tool is good enough for first pass.

@iuioiua iuioiua marked this pull request as ready for review January 15, 2024 08:13
@iuioiua iuioiua marked this pull request as draft January 16, 2024 03:53
@iuioiua iuioiua requested review from bartlomieju and removed request for crowlKats January 17, 2024 03:39
deno.json Outdated
@@ -12,7 +12,7 @@
"automation/": "https://raw.githubusercontent.com/denoland/automation/0.10.0/"
},
"tasks": {
"test": "deno test --doc --unstable --allow-all --parallel --coverage --trace-ops",
"test": "NO_DEPRECATION_WARNINGS=1 deno test --doc --unstable --allow-all --parallel --coverage --trace-ops",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is needed for cases where we must still continue to test deprecated APIs.

internal/mod.ts Outdated
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Does having an internal folder interfere with workspaces functionality, @lucacasonato?

@iuioiua iuioiua marked this pull request as ready for review January 17, 2024 04:03
Copy link
Member

@lucacasonato lucacasonato left a comment

Choose a reason for hiding this comment

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

Yes, this interferes with workspaces.

@iuioiua
Copy link
Collaborator Author

iuioiua commented Jan 17, 2024

Yes, this interferes with workspaces.

How can we make internal tools and workspaces work? What are some options?

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

LGTM

@iuioiua iuioiua merged commit 88b5f47 into main Jan 22, 2024
12 checks passed
@iuioiua iuioiua deleted the warn-deprecated-api branch January 22, 2024 04:21
@kt3k kt3k mentioned this pull request Jan 31, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants