flosch / pongo2-addons

Official filter and tag addons for pongo2
MIT License
39 stars 17 forks source link

make version compatible #11

Open idc77 opened 2 years ago

idc77 commented 2 years ago

pongo2 has versions ["master", "v4", "v5"] pongo2-addons does not

this results in weird behavior because go modules. For instance v4 does not work with master because of the v4 version tag. But now v5 is tagged however this repo isn't v5 tag compatible.

suggestion: create subdirectories for at least v4 v5 even if the code is the same, go modules make life hell complaining about incorrect signatures

idc77 commented 2 years ago

To be more clear:

this repo right now imports v4 making it only v4 compatible In filters.go you import "github.com/flosch/pongo2/v4" Now if you want to use this with master or v5 you can't because it will complain about incompatible signatures.

The solution is to have filters.go importing "github.com/flosch/pongo2" v4/filters.go importing "github.com/flosch/pongo2/v4" v5/filters.go importing "github.com/flosch/pongo2/v5"

and filters_test.go probably also