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

fix(compile): relative permissions should be retained as relative #23719

Merged
merged 2 commits into from
May 6, 2024

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented May 6, 2024

Closes #23715

@@ -134,7 +134,7 @@ pub enum NodeModules {
pub struct Metadata {
pub argv: Vec<String>,
pub seed: Option<u64>,
pub permissions: PermissionsOptions,
pub permissions: PermissionFlags,
Copy link
Member Author

Choose a reason for hiding this comment

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

Fix is here. Instead of storing the resolved PermissionsOptions we store the raw flags.

@dsherret dsherret requested a review from bartlomieju May 6, 2024 22:37
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

pub reload: bool,
pub seed: Option<u64>,
pub strace_ops: Option<Vec<String>>,
pub unstable_config: UnstableConfig,
pub unsafely_ignore_certificate_errors: Option<Vec<String>>,
pub v8_flags: Vec<String>,
pub code_cache_enabled: bool,
pub permissions: PermissionFlags,
Copy link
Member

Choose a reason for hiding this comment

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

That's a nice cleanup but I wish it was done in a separate PR, makes reviewing this one a lot harder.

Comment on lines +3 to +25
"steps": [{
"if": "unix",
"args": "compile --output=main --no-prompt --allow-read=a.txt main.ts",
"output": "[WILDCARD]"
}, {
"if": "unix",
"commandName": "./main",
"args": [],
"output": "No such file[WILDCARD]"
}, {
"if": "unix",
"args": [
"eval",
"Deno.mkdirSync('sub_dir');"
],
"output": "[WILDCARD]"
}, {
"if": "unix",
"commandName": "../main",
"cwd": "sub_dir",
"args": [],
"output": "No such file[WILDCARD]"
}]
Copy link
Member

Choose a reason for hiding this comment

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

Nice flex on what spec tests can do now :)

@dsherret dsherret merged commit 2dcbef2 into denoland:main May 6, 2024
17 checks passed
@dsherret dsherret deleted the fix_compile_permissions_relative branch May 6, 2024 23:22
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.

Permission regression with deno compile
2 participants