nginx-adapter icon indicating copy to clipboard operation
nginx-adapter copied to clipboard

Consider forking go-crossplane as base for custom lexer

Open emansom opened this issue 3 years ago • 2 comments

NGIИX Inc. ™️ developed crossplane a while back to programmatically parse and build up NGIИX configuration files. @aluttik then ported this to Golang.

Consider adopting this library and/or forking it if necessary, as an effort to reduce duplication and allow adoption of the lexer across multiple projects.

emansom avatar Jul 18 '22 14:07 emansom

I don't mind outsourcing the lexing/parsing to a well-tested library, especially that crossplane was their answer to programmable config. Making crossplane part of the adapter could make migration easier for NGINX users who rely on crossplane. However, is it commonly used? The NGINX crossplane repo hasn't been updated since August 2020, and the aluttik/go-crossplane hasn't been updated since May 2021, both of which have open issues and PRs.

For reference, I found this document while googling crossplane: https://www.nginx.com/wp-content/uploads/2018/12/NGINX-Conf-2018-slides_Hulegaard-config-analysis.pdf

mohammed90 avatar Jul 19 '22 19:07 mohammed90