grammarkdown
grammarkdown copied to clipboard
Investigate dropping synchronous API
To simplify the internals of grammarkdown
, I'm considering dropping the synchronous APIs such as SyncHost
, parseSync
, bindSync
, checkSync
, etc. However, doing so would have a significant impact on tools such as ecmarkup
.
@bakkot: If I were to make this change, ecmarkup
would need to make the walk
and lint
functions asynchronous. If necessary, I can create a PR against ecmarkup
that does this in advance of this change. The walk
function shouldn't be too much trouble because its only called by itself and Spec.prototype.build
(which is already async
), though I haven't investigated the impact it would have on lint
.
If there are scenarios that you believe would be a blocker for me removing the synchronous APIs, please let me know. If there are no blockers, I would plan to ship this change with a semver-major bump to 3.0.0
.
I think the change to ecmarkup would be straightforward, and I don't have other use-cases in mind which would require it to be synchronous. Go for it.
I've shipped 3.0.0-beta.0
which has the async-only API, plus cleans up a number of other obsolete methods.
This seems to be done now, though I note that the docs still talk exclusively about bindSync
and friends.
I have a few outstanding things to clean up before I close this, but yes its mostly done.