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

2.x.x Template struct #22

Merged
merged 11 commits into from
Jan 31, 2024
Merged

2.x.x Template struct #22

merged 11 commits into from
Jan 31, 2024

Conversation

adam-fowler
Copy link
Member

To make HBMustacheTemplate Sendable I have had to change the structure of things slightly. These are breaking changes.

  • HBMustacheTemplate is now a struct
  • HBMustacheLibrary is a now a struct
  • Instead of setting the library inside the template when it is added to a library, we pass it into the HBMustacheContext when rendering the template. For partials to work the template needs to be rendered via HBMustacheLibrary.render.

I didn't think we'd need a v2.0 of hummingbird-mustache but it looks like we will

Comment on lines 43 to 44
- 'swift:5.7'
- 'swift:5.8'
Copy link
Member

Choose a reason for hiding this comment

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

Still planning on supporting these?

Copy link
Member Author

Choose a reason for hiding this comment

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

No harm, doing that here. I've use this outside of server development so its minimum supported swift version isn't linked to the minimum version for HB

Copy link
Member

@Joannis Joannis left a comment

Choose a reason for hiding this comment

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

Small question, but looks good so far in general. I'll await your reply on that

Sources/HummingbirdMustache/Library+FileSystem.swift Outdated Show resolved Hide resolved
Tests/HummingbirdMustacheTests/SpecTests.swift Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (2.x.x@52663ae). Click here to learn what that means.

Additional details and impacted files
@@           Coverage Diff            @@
##             2.x.x      #22   +/-   ##
========================================
  Coverage         ?   91.27%           
========================================
  Files            ?       16           
  Lines            ?     1032           
  Branches         ?        0           
========================================
  Hits             ?      942           
  Misses           ?       90           
  Partials         ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adam-fowler adam-fowler requested a review from Joannis January 31, 2024 15:26
@adam-fowler adam-fowler merged commit 071b182 into 2.x.x Jan 31, 2024
8 checks passed
@adam-fowler adam-fowler deleted the template-struct branch January 31, 2024 15:43
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.

2 participants