pietroppeter / nimib

nimib 🐳 - nim 👑 driven ⛵ publishing ✍
https://pietroppeter.github.io/nimib/
MIT License
181 stars 10 forks source link

make nimibPreviewCodeAsInSource the default and add nimibCodeFromAst #94

Closed pietroppeter closed 2 years ago

pietroppeter commented 2 years ago

The official release of 0.3 seems very close now. It make sense it will include the great work by @HugoGranstrom on finally bringing js backend based interactivity to nimib (one of the big milestone in the roadmap). I think it might be a good moment also to make default the CodeAsInSource (until now available through flag nimibPreviewCodeAsInSource, also excellent work by @HugoGranstrom btw).

We know it has edge cases where it will fail but it does not seem to be an issue for code as it is usually formatted (and the alternative CodeFromAst also has some issue - which did raise bugs directly in nim). The current default option would then be made available behind switch nimibCodeFromAst.

My idea would be to make it the default, testing if issues arises in nimibook and scinim/getting-started, and if no issues arise keep it for 0.3.

Thoughts?

HugoGranstrom commented 2 years ago

I definitely think we should test it on a wider corpus to be able to iron out the bugs that exist. And if there aren't any major ones that are really hard to solve I'd say we do the switch.

pietroppeter commented 2 years ago

you mean wider than nimibook and scinim/getting-started? my blogposts for advent of nim 2021 were all using the flag and I did not see issues.

HugoGranstrom commented 2 years ago

Ah, no I just meant that I agree that we should test it out on those 😅 if we have more I would of course want to try it out there as well though. If we want we could try and ping everyone we know uses nimib 🤣 This change will affect them either way, so either they test and notice bugs before we release 0.3 or it will happen afterwards.

Good to know it worked fine for adventofnim though, that's one more datapoint! 🚀