fix(gnomon-export): add missing JSCalendar property mappings and warnings API#85
Closed
fix(gnomon-export): add missing JSCalendar property mappings and warnings API#85
Conversation
…ings API Fixes #50 and #54 together. The JSCalendar exporter now maps all standardised properties (created, updated, sequence, method, recurrenceId, recurrenceRules, excludedRecurrenceRules, locations, virtualLocations, links, relatedTo, participants, replyTo, requestStatus) to proper JSCalendar model types instead of falling through to vendor properties. Also adds a `warnings: &mut Vec<String>` parameter to `emit_jscalendar` (matching `emit_icalendar`) and warns about unrecognised non-vendor fields. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1d8ade6 to
f8c302b
Compare
Owner
Author
|
The JSCalendar export (from a source containing iCalendar data) currently fails for several reasons, most notably because the DTSTART property on events is not being converted properly and because the root VCALENDAR objects do not contain UIDs. The draft RFC for converting between iCalendar and JSCalendar describes a scheme to be used for generating stable UUIDs for such cases, and in general we should give this document more weight in our implementation. |
Owner
Author
|
We're abandoning this in favour of a more principled approach (see #90). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
warnings: &mut Vec<String>parameter toemit_jscalendar(matchingemit_icalendar's existing API) and emits warnings for unrecognised non-vendor fields.spec/gnomon.md) with expanded JSCalendar import/export mapping tables and a newr[model.export.jscalendar.unknown]requirement.Changes
crates/gnomon-export/src/jscal.rsemit_jscalendarand internal builders now threadwarnings: &mut Vec<String>record_to_rrule,build_locations,build_virtual_locations,build_links,build_related_to,build_event_participants,build_task_participants,build_reply_to,build_request_status,parse_status_codecollect_vendor_propertiesnow warns about non-vendor fields (those not containing:)crates/gnomon-export/Cargo.tomlrfc5545-types = "0.1"dependency (forDateTimeOrDateused in rrule termination)spec/gnomon.mdr[model.import.jscalendar.event]andr[model.import.jscalendar.task]to+2with 15 new property rows eachr[model.export.jscalendar.event]andr[model.export.jscalendar.task]to+2with expanded descriptionsr[model.export.jscalendar.unknown]requiring warnings for unrecognised non-vendor fieldsTest plan
cargo test --workspacepasses (all 37 gnomon-export tests pass, including 12 new ones)cargo check --workspacepasses with no warningsgnomon export --format jscalendaron a file with iCal-imported records containing locations, rrules, participants, etc.🤖 Generated with Claude Code