Skip to content

Experiment for improved context control #246

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Pfeil
Copy link
Member

@Pfeil Pfeil commented Apr 15, 2025

Experimental, early WIP. This may contain breaking changes (we'll see) and then likely land in a v3.0.0, maybe.

Experiment to implement auto-control for the context without bringing it to invalid states.

Rough idea:

  • Adding things to context is allowed (Explicitly? Implicitly?)
  • Removing things is only possible under certain circumstances. One may ask for a cleanup of the context. There may exist cleanup requests for everything, or sub-elements like urls or key-value-pairs.
  • Fixing typos or http->https replacements (inline value change) can be done by explicit methods to do so.
  • All changes are only applied if validation after the change is successful (rollback otherwise). For example, values should be URIs/IRIs, and so on.
  • Implicit cleanup could happen when exporting a crate.

Drawbacks:

  • Likely will have performance impacts
  • In the end, the implementation is likely breaking and requires deprecating methods in beforehand
  • Editors that use ro-crate-java will also have less direct control over context (and need to adapt the pattern or we offer two implementations)

@Pfeil Pfeil self-assigned this Apr 15, 2025

This comment was marked as off-topic.

@Pfeil Pfeil changed the base branch from main to development April 15, 2025 14:55
@Pfeil Pfeil changed the title Experimental context auto control Experiment for improved context control Apr 16, 2025
Base automatically changed from development to main April 29, 2025 18:51
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.

1 participant