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

add: Add VoidLocker and unittest #1096

Merged

Conversation

lina1101
Copy link
Contributor

📁 Related issues

Closes: #1093 (comment)

✍️ Description

This is an implementation of VoidLocker.

src/util/locking/VoidLocker.ts Outdated Show resolved Hide resolved
Comment on lines 20 to 22
return whileLocked((): void => {
// eslint:disable-next-line:no-empty
});
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return whileLocked((): void => {
// eslint:disable-next-line:no-empty
});
return whileLocked(noop);

with noop a constant defined on top.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your suggestions.

Copy link
Member

@joachimvh joachimvh left a comment

Choose a reason for hiding this comment

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

One thing that is still missing is a config option. We would need a config/util/resource-locker/debug-void.json that sets the urn:solid-server:default:ResourceLocker to this specific locker, and an extra line in config/util/README.md explaining it. It should have a similar warning as for example config/ldp/authentication/debug-test-agent.json.

The release notes can then mention that this is how this locking mechanism can be enabled.

src/util/locking/VoidLocker.ts Outdated Show resolved Hide resolved
lina1101 and others added 4 commits December 14, 2021 16:22
Co-authored-by: Ruben Verborgh <ruben@verborgh.org>
Co-authored-by: Joachim Van Herwegen <joachimvh@gmail.com>
@joachimvh joachimvh added the semver.minor Requires a minor version bump label Dec 16, 2021
Copy link
Member

@joachimvh joachimvh left a comment

Choose a reason for hiding this comment

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

Minor nitpicks, will merge after these.

RELEASE_NOTES.md Outdated Show resolved Hide resolved
config/util/README.md Outdated Show resolved Hide resolved
config/util/resource-locker/debug-void.json Outdated Show resolved Hide resolved
lina1101 and others added 2 commits December 16, 2021 09:05
Co-authored-by: Joachim Van Herwegen <joachimvh@gmail.com>
Co-authored-by: Joachim Van Herwegen <joachimvh@gmail.com>
}
]
}

Copy link
Member

Choose a reason for hiding this comment

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

@lina1101 for some reason git does not agree with your newline, could you have a look what's going on here? Perhaps a non-unix newline?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

Copy link
Member

@joachimvh joachimvh left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@joachimvh joachimvh merged commit 9a1f324 into CommunitySolidServer:versions/3.0.0 Dec 16, 2021
@ixuz ixuz deleted the feat/void-locker branch December 16, 2021 22:13
@ixuz
Copy link
Member

ixuz commented Dec 16, 2021

Great, well done all 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver.minor Requires a minor version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants