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

SourceryFramework #715

Merged
merged 5 commits into from
Feb 9, 2019
Merged

SourceryFramework #715

merged 5 commits into from
Feb 9, 2019

Conversation

ilyapuchka
Copy link
Collaborator

This PR introduces SourceryFramework that exposes parsing and generating functionality (generating part is really just two protocols then implemented by the tool). Motivation for that is that this framework can provide the foundation for other tools, especially parsing, which don't necessarily want to use templates and generate code, without the need to include such functionality in the tool. There were multiple requests in the past about such features which were shut down because they were considered out of the scope of Sourcery as a tool.
Mainly this change is about moving files around and changing minimum amount of internal types and properties to public to make the main tool compile. We may want to revisit public API later to expose more things publicly.

@SourceryBot
Copy link

1 Error
🚫 Any changes to library code need a summary in the Changelog.
1 Warning
⚠️ Big PR

Generated by 🚫 Danger

@Liquidsoul
Copy link
Collaborator

I've pushed a missing change to the SPM manifest with SourceryFramework.
However, we still have some dependency issues with some source files which belong to multiple targets in the Xcode project:

  • Sourcery/Utils/Path+Extensions.swift
  • Sourcery/Utils/Sha.swift
  • Sourcery/Version.swift

One solution I see would be to add a SourceryUtils target which would include these files. I'll try to work something out.

Note that the Sha.swift is also included in SwiftTemplate which prevents me to fix #713. So we need this PR to fix it.

@Liquidsoul
Copy link
Collaborator

I've extracted the files into SourceryUtils, tell we what you think about this @ilyapuchka and @krzysztofzablocki

@krzysztofzablocki
Copy link
Owner

@ilyapuchka anything left to do here?

@ilyapuchka
Copy link
Collaborator Author

@krzysztofzablocki I guess should be fine now with Utils framework

@krzysztofzablocki
Copy link
Owner

@ilyapuchka you can merge then if you are happy with it 👍

@ilyapuchka ilyapuchka merged commit 277c812 into master Feb 9, 2019
@ilyapuchka ilyapuchka deleted the sourcery-framework branch February 9, 2019 13:29
stephanecopin pushed a commit to stephanecopin/Sourcery that referenced this pull request Apr 30, 2019
* extract parsing and generating functionality into SourceryFramework

* removed unneeded AEXML dependency (have we ever used it directly at all???) and added Yams (how was it even working before???)

* removed rangeToAppendBody

* Configure SourceryFramework in SPM

* Extract Sha, Version and Path+Extensions into SourceryUtils
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.

4 participants