Skip to content

Prepare code for Elixir 1.18#15

Merged
nozalr merged 21 commits intomasterfrom
ex-1.18-warnings
Mar 6, 2025
Merged

Prepare code for Elixir 1.18#15
nozalr merged 21 commits intomasterfrom
ex-1.18-warnings

Conversation

@rNoz
Copy link
Collaborator

@rNoz rNoz commented Jan 19, 2025

As mentioned in PR opened by @camelpunch, this PR solves that issue while keeping the same spec as the original intention provided by the code base.

I have been reviewing the specification and other libraries (go, zig and javascript), and keeping the 0x2F (magic byte) is the best way to go, than removing it (approach taken by the mentioned PR).

Then, I have added Elixir 1.18 to the CI Test and Lint jobs (version matrix) and added --warnings-as-errors in mix compile.

Correcting badges (README) and incorporating 3 new github action workflows as a replacement for Travis.

Finally, bumping versions of all dependencies.

58 Tests and 91.5% Code Coverage

.........................................................
Finished in 0.1 seconds (0.1s async, 0.00s sync)
6 doctests, 52 tests, 0 failures
----------------
COV    FILE                                        LINES RELEVANT   MISSED
 93.8% lib/ex_image_info.ex                          341       49        3
  0.0% lib/ex_image_info/detector.ex                  10        0        0
100.0% lib/ex_image_info/types/bmp.ex                 26        6        0
100.0% lib/ex_image_info/types/gif.ex                 34        9        0
 88.8% lib/ex_image_info/types/ico.ex                 53       18        2
100.0% lib/ex_image_info/types/jp2.ex                 29        6        0
 78.9% lib/ex_image_info/types/jpeg.ex                63       19        4
100.0% lib/ex_image_info/types/png.ex                 29        6        0
 95.8% lib/ex_image_info/types/pnm.ex                 94       24        1
100.0% lib/ex_image_info/types/psd.ex                 26        6        0
 89.1% lib/ex_image_info/types/tiff.ex               123       37        4
 85.7% lib/ex_image_info/types/webp.ex                90       21        3
[TOTAL]  91.5%

@rNoz rNoz force-pushed the ex-1.18-warnings branch from 91013b4 to 0ffa372 Compare January 19, 2025 20:41
@nozalr nozalr requested a review from camelpunch January 20, 2025 08:49
@rNoz rNoz force-pushed the ex-1.18-warnings branch 5 times, most recently from 9a36d0d to 7ae5037 Compare January 20, 2025 20:17
@rNoz rNoz force-pushed the ex-1.18-warnings branch 5 times, most recently from aea3a84 to 1394fca Compare January 21, 2025 05:34
@rNoz rNoz force-pushed the ex-1.18-warnings branch from 1394fca to dac268f Compare January 21, 2025 05:35
@nozalr nozalr requested a review from warmwaffles January 21, 2025 05:40
@warmwaffles
Copy link
Collaborator

Hah, I was looking at resolving the type errors yesterday. Got sucked into another issue on a different library.

@warmwaffles
Copy link
Collaborator

Side note, is committing the generated docs useful anymore? 8 years ago it made sense, but now hexdocs is not going anywhere and regenerating them is fairly simple.

@camelpunch
Copy link
Collaborator

Looks good. I haven't pored over every detail in this change, but it passes the tests in my PDF generator that uses this as a dependency and eliminates the warnings.

Copy link
Collaborator

@camelpunch camelpunch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above!

"ExImageInfo is an Elixir library to parse images (binaries) and get the dimensions (size), detected mime-type and overall validity for a set of image formats. It is the fastest and supports multiple formats.",
version: "VERSION" |> File.read!() |> String.trim(),
elixir: "~> 1.3",
elixir: "~> 1.13",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure about this bump, but I considered also this comment and the CI changes of this PR.

[
{:excoveralls, "~> 0.18", only: :test},
{:ex_doc, "~> 0.30", only: :dev},
{:ex_doc, "~> 0.37", only: :dev},
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really required these 2 version updates, as mix.lock is committed, but well, since all is for dev/test, updating it here as well.

{:excoveralls, "~> 0.18", only: :test},
{:ex_doc, "~> 0.30", only: :dev},
{:ex_doc, "~> 0.37", only: :dev},
{:inch_ex, "~> 2.0", only: [:dev, :test]},
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No repo updates in last 3 years, CI service is down (although badges work), has some warnings when compiling. I would consider if removing this along this year.

@rNoz rNoz requested a review from warmwaffles March 5, 2025 18:48
@rNoz
Copy link
Collaborator Author

rNoz commented Mar 5, 2025

Did a bunch of changes, pinging again, and as any of you confirm it, I'll merge to have a new 0.2.7 version. Then, I'll rename master branch as main.

@rNoz rNoz requested a review from camelpunch March 5, 2025 18:49
@rNoz
Copy link
Collaborator Author

rNoz commented Mar 5, 2025

Moreover, fixing all the badges for ex_doc, as it does not have raw html support in markdown (while GitHub does).

mix docs: image

GitHub's rendered html.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decided to remove this file as that service was ok for open source projects back then, but I have just quickly checked and it seems they only offer priced plans.

@rNoz rNoz mentioned this pull request Mar 5, 2025
@nozalr nozalr merged commit 9672deb into master Mar 6, 2025
30 checks passed
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.

4 participants