-
Notifications
You must be signed in to change notification settings - Fork 29
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
Rewrite registry resource to support delete operation #379
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
What was causing #283 ?
@@ -117,7 +117,7 @@ if (!$SkipBuild) { | |||
New-Item -ItemType Directory $target > $null | |||
|
|||
# make sure dependencies are built first so clippy runs correctly | |||
$windows_projects = @("pal", "ntreg", "ntstatuserror", "ntuserinfo", "registry", "reboot_pending", "wmi-adapter") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why "ntstatuserror" and "ntuserinfo" are removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those libs were used by the old registry resource for handling NT API errors (translating to human readable errors) and for getting the current user for HKCU (it's not a real hive). None of these are needed as the new crate uses win32 apis that abstract all of this.
#283 was probably due to the old resource using libraries that called the NT APIs using lots of unsafe code that wasn't written correctly. |
This change adds the `delete` method-defining property to the resource manifest schema and updates the `capabilities` enumeration to include `SetHandlesExist` and `Delete`, as implemented in PowerShell#379. It updates both the source and composed schemas.
This change adds the `delete` method-defining property to the resource manifest schema and updates the `capabilities` enumeration to include `SetHandlesExist` and `Delete`, as implemented in PowerShell#379. It updates both the source and composed schemas.
This change adds the `delete` method-defining property to the resource manifest schema and updates the `capabilities` enumeration to include `SetHandlesExist` and `Delete`, as implemented in PowerShell#379. It updates both the source and composed schemas.
This change adds the `delete` method-defining property to the resource manifest schema and updates the `capabilities` enumeration to include `SetHandlesExist` and `Delete`, as implemented in PowerShell#379. It updates both the source and composed schemas.
This change adds the `delete` method-defining property to the resource manifest schema and updates the `capabilities` enumeration to include `SetHandlesExist` and `Delete`, as implemented in PowerShell#379. It updates both the source and composed schemas.
PR Summary
registry
resource to archive folder and excluded from build (no need to review, files moved without changes)registry
resource using Registry crate simplifying the code, important behaviors to doc for resources:get
to a resource that doesn't exist, don't error. Instead return keys and_exist = false
delete
to a resource that already doesn't exist, don't error. Instead return keys and_exist = false
delete
as validdsc resource
operationset
methodhandlesExist
indicating that the resource will handle_exist
directly sodsc
will pass it as-is to the resource with test resource to validate. The engine work to change_exist
todelete
will come later after this is merged.dsc resource list
to showSetHandlesExist
andDelete
capabilitiesregistry
resource as it takes JSON via argument instead of stdinPR Context
Fix #283
Partially address #290