Skip to content

refactor: remove deno_core dependency from deno_permissions #29467

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

Merged

Conversation

dsherret
Copy link
Member

For making this code more usable without deno_core. Will be useful in deno_resolver.

let len = stack.len();
for (idx, frame) in stack.into_iter().enumerate() {
writeln!(
&mut output,
"┃ {} {}",
colors::gray(if idx != len - 1 { "├─" } else { "└─" }),
colors::gray(deno_core::error::format_frame::<
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this a functional change? We're no longer formatting the frame here

stack
.into_iter()
.map(|frame| {
deno_core::error::format_frame::<deno_core::error::NoAnsiColors>(
Copy link
Member

Choose a reason for hiding this comment

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

Oh I see, it's rewritten here. Maybe add a comment in runtime/permissions/ that it's expected the frames are in readable format?

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated the name from GetStackFn to GetFormattedStackFn.

@dsherret dsherret enabled auto-merge (squash) May 27, 2025 15:17
@dsherret dsherret merged commit e3bf5ee into denoland:main May 27, 2025
18 checks passed
@dsherret dsherret deleted the refactor_remove_deno_core_deno_permissions branch May 27, 2025 16:04
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.

2 participants