Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump pdfbox to 3.0.1 #79

Closed
wants to merge 7 commits into from
Closed

Conversation

raymcdermott
Copy link
Contributor

@raymcdermott raymcdermott commented Apr 16, 2024

Description of your pull request

Upgrade the code to align with the major changes in pdfbox v3

Why should it be considered?

This library should maintain pace with the library that it wraps.

Pull request checklist

Before submitting the PR make sure the following things have been done
(and denote this by checking the relevant checkboxes):

  • The code is consistent with Clojure style guide.
  • All code passes the linter (clj-kondo --lint src).
  • You've added tests (if possible) to cover your change(s).
  • All tests are passing.
  • The commits are consistent with the Git commit style guide.
  • You've updated the changelog (if adding/changing user-visible functionality).

Thanks!

Ray McDermott added 2 commits April 15, 2024 18:09
@raymcdermott raymcdermott mentioned this pull request Apr 16, 2024
@dotemacs
Copy link
Owner

Muchos gracias

Thanks for doing this, which is something I've been meaning to do, but never found the time.
So I really appreciate you doing this.

Overall, it's good, but there are some issues. Can you have a look at them? Thanks 🙏

Some issues to look at

Context sought

Looking at src/pdfboxing/common.clj and load-pdf, I guess that function is now not being used, since you've introduced load-pdf-from-media & load-pdf-from-bytes.

Because I don't work with this all the time and looking at the commit messages, I didn't see much of an explanation.
What was your reasoning there?

Failing tests

Also, some of the tests failed. It looks like I needed to approve them to run.
This is something that should happen automagically.

About the linting test failure, it's due to the GitHub Actions not running any actions that are Node 16 based. So if you update the checkout action to actions/checkout@v4, that should make it pass.

There is also a failing test pass.

project.clj Outdated Show resolved Hide resolved
deps.edn Show resolved Hide resolved
@dotemacs
Copy link
Owner

dotemacs commented Apr 16, 2024

I've updated the GitHub Actions for checking out a git repo, to v4, as mandated by GitHub.

EDIT: it didn't help with failing linting action. I can't figure out how to get clj-kondo to tolerate the issue it's flagging. Asked on Clojurians Slack: https://clojurians.slack.com/archives/CHY97NXE2/p1713286392965609

Which led to the creation of this issue: clj-kondo/clj-kondo#2316

So it's safe to ignore the linting failure on the CI.

@raymcdermott
Copy link
Contributor Author

Thanks for the feedback. I will make the necessary fixes

@raymcdermott
Copy link
Contributor Author

raymcdermott commented Apr 18, 2024

I introduced load-pdf-from-media & load-pdf-from-bytes since I could not find a method, in the new API, with the same overloads as before.

In the update I have dropped load-pdf-from-bytes and make the call directly in the protocol.

@raymcdermott
Copy link
Contributor Author

@raymcdermott
Copy link
Contributor Author

All the corrections are in. Please let me know if you have any further comments / requests

@dotemacs
Copy link
Owner

This is great, thanks for tackling this. :)

I'll probably just squash all the commits as PDFBox upgrade to v3, crediting you as the author and then I'll create another release.

@dotemacs
Copy link
Owner

Closing via 70771ab

@dotemacs dotemacs closed this Apr 18, 2024
@dotemacs
Copy link
Owner

I've pushed a new release to Clojars: https://clojars.org/pdfboxing/versions/0.1.15.4-SNAPSHOT

I'll wait until clj-kondo's linter gets fixed to cut another release.

Thanks again for doing this @raymcdermott 🙏

@dotemacs
Copy link
Owner

Just noticed that the latest version of PDFBox is 3.0.2! :)

See: https://github.com/dotemacs/pdfboxing/actions/runs/8736143174

Not a big deal. Like I said above, I'll wait for the clj-kondo to be fixed, then I'll bump the dependencies also.

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.

2 participants