Skip to content

Conversation

@additiverich
Copy link
Contributor

This is more of a proof of concept than anything else but given jet 2.1.1 is coming up 5 years old and there are some features we might like to take advantage of in later versions (some improvements to trim whitespace for example) I thought I'd see what would be involved in a/ making the tests run and b/ getting templates (specifically Curzon) to render.

a/ is definitely easier than b/ - the main difficulty is that templates are slurped in using NewSet() which can't be altered afterwards to insert strings masquerading as templates for testing, so the strings which were used as templates previously have been exported as files and are read in as part of this process.

Getting the templates to play ball is a harder proposition. It tends to be very unforgiving. You can see the changes required to get it working here https://github.com/indiereign/shift72-curzon/compare/master..e6ef680b2af7362bc7c2a87d810fca57c66c21d3. The main gotchas are

  • ranges return the index first so anything which refers to range item := items will be an array of indices without any items
  • relative paths to templates need to be exact
  • you'd better instantiate every variable with := otherwise that's a paddlin'

I know these are probably best practice anyway but it's quite confronting to see a wall of red error text on render.

I don't know whether the fact that all sites use the latest builder version by design or accident but if there was a reason to ensure sites are build with specific versions rather than whatever the latest one is, updating jet to this version might be it.

Jibin is looking into whether we can benchmark Kibble performance as a whole rather than individual packages and I wonder if we'll see many improvements with an update to jet.

@additiverich additiverich requested review from gscragg and sarge April 4, 2022 07:07
@matthewthomsonnz
Copy link
Contributor

Looks good from what I can tell. Nice. It could be cool to do like a pre-release/dev-release of this for npm? https://gist.github.com/schmich/d04acc4b02b45e489f329cfdf3280a3f

That way we could make a branch for core-template etc using this jet update.

@stajs
Copy link
Contributor

stajs commented Apr 28, 2022

I'm going to convert this to draft and block on AB#6773 - we need to get a clear picture of moving from v0 to v1, v2, etc.

@stajs stajs added the blocked label Apr 28, 2022
@stajs stajs marked this pull request as draft April 28, 2022 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants