Skip to content
This repository has been archived by the owner on Mar 16, 2020. It is now read-only.

Use swift-syntax to parse the slides manifest file #32

Open
eyeplum opened this issue Apr 11, 2019 · 0 comments
Open

Use swift-syntax to parse the slides manifest file #32

eyeplum opened this issue Apr 11, 2019 · 0 comments
Assignees

Comments

@eyeplum
Copy link
Member

eyeplum commented Apr 11, 2019

The current manifest parser is using Swift compiler's --driver-mode=swift to execute the manifest file (written in Swift) then dump the initialised TruffautSupport.Presentation as JSON in stdout.

This method was initially inspired by Swift Package Manager's ManifestLoader.

While Swift Package Manager's ManifestLoader was improved by making it sandboxed, Truffaut's manifest parser wasn't. This makes our current way of parsing both inefficient and insecure.

What's worse is that the way we distribute Truffaut.app and the TruffautSupport framework requires the framework and the running machine having the same version of the Swift compiler. This make it even harder to use.

Since now swift-syntax is available, we should move away from using the Swift compiler to execute the manifest file to parsing the manifest file literally.

@eyeplum eyeplum changed the title Move to swift-syntax Use swift-syntax to parse the slides manifest file Apr 11, 2019
@eyeplum eyeplum self-assigned this Apr 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant