Skip to content

Remove vendoring of testify and difflib. - #996

Open
rweir wants to merge 1 commit into
expr-lang:masterfrom
rweir:master
Open

rweir wants to merge 1 commit into
expr-lang:masterfrom
rweir:master

Conversation

@rweir

@rweir rweir commented Nov 9, 2026

Copy link
Copy Markdown

Hi there,

I noticed that a couple of years ago you vendored difflib and testify because difflib was unmaintained and it was causing some security scanner to warn. I just noticed that testify also resolved this by vendoring difflib, so you it should be possible to drop your copy and just use their transitive difflib instead. I did also notice that you currently have zero dependencies, so maybe you'd rather keep things as they are, anyway. In case you would like to drop the vendoring, though, here's a mechanically produced PR. All tests run by .github/workflows/test.yml pass.

Produced by running:

  • rm -rf internal/testify
  • rm -rf internal/difflib
  • find -iname "*.go" -exec sed -i "s,github.com/expr-lang/expr/internal/testify,github.com/stretchr/testify," \{\} \;

then deleting the two packages from the coverage config in .github/scripts/coverage.mjs.

Produced by running:
- `rm -rf internal/testify`
- `rm -rf internal/difflib`
- `find -iname "*.go" -exec sed -i "s,github.com/expr-lang/expr/internal/testify,github.com/stretchr/testify," \{\} \;`

then deleting the two packages from the coverage config in
`.github/scripts/coverage.mjs`.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant