davidbyttow / govips

A lightning fast image processing and resizing library for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Resource images with timestamps in the name cause invalid file path errors

AttilaTheFun opened this issue · comments

I was just trying to update my govips dependency and when pulling in the current master commit with go get I received all of these invalid file path errors:

resources/png-24bit+alpha.ModulateHSV_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit+alpha.ModulateHSV_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit+alpha.Modulate_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit+alpha.Modulate_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit+alpha.Modulate_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit+alpha.Modulate_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit+alpha.Sharpen_24bit_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit+alpha.Sharpen_24bit_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit+alpha.Sharpen_24bit_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit+alpha.Sharpen_24bit_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit+alpha.TestImageRef_Linear_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit+alpha.TestImageRef_Linear_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit+alpha.TestImageRef_Linear_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit+alpha.TestImageRef_Linear_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.AutoRotate_0-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit.AutoRotate_0-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.AutoRotate_0-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit.AutoRotate_0-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.GetPointWhite-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit.GetPointWhite-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.GetPointWhite-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit.GetPointWhite-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.GetPointWhiteR-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit.GetPointWhiteR-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.GetPointWhiteR-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit.GetPointWhiteR-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.GetPointYellow-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit.GetPointYellow-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.GetPointYellow-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit.GetPointYellow-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.Rank-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit.Rank-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.Rank-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit.Rank-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.TestImageRef_Linear1-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit.TestImageRef_Linear1-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.TestImageRef_Linear1-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit.TestImageRef_Linear1-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.TestThumbnail_PNG_CropCentered-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-24bit.TestThumbnail_PNG_CropCentered-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-24bit.TestThumbnail_PNG_CropCentered-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-24bit.TestThumbnail_PNG_CropCentered-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.EmbedBackgroundRGBA_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.EmbedBackgroundRGBA_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.EmbedBackgroundRGBA_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.EmbedBackgroundRGBA_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.EmbedBackground_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.EmbedBackground_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.EmbedBackground_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.EmbedBackground_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.Embed_ExtendWhite_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.Embed_ExtendWhite_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.Embed_ExtendWhite_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.Embed_ExtendWhite_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.Resize_Downscale_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.Resize_Downscale_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.Resize_Downscale_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.Resize_Downscale_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.Resize_Upscale_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.Resize_Upscale_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.Resize_Upscale_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.Resize_Upscale_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.Sharpen_8bit_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.Sharpen_8bit_Alpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-8bit+alpha.Sharpen_8bit_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-8bit+alpha.Sharpen_8bit_Alpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-8bit.Decode_PNG-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-8bit.Decode_PNG-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-8bit.Decode_PNG-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-8bit.Decode_PNG-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/png-alpha-64bit.PNG_64bit_OptimizeICCProfile-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/png-alpha-64bit.PNG_64bit_OptimizeICCProfile-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/png-alpha-64bit.PNG_64bit_OptimizeICCProfile-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/png-alpha-64bit.PNG_64bit_OptimizeICCProfile-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/tif-16bit.TIF_16_Bit_To_AVIF_12_Bit-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.avif: malformed file path "resources/tif-16bit.TIF_16_Bit_To_AVIF_12_Bit-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.avif": invalid char ':'
resources/tif-16bit.TIF_16_Bit_To_AVIF_12_Bit-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.avif: malformed file path "resources/tif-16bit.TIF_16_Bit_To_AVIF_12_Bit-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.avif": invalid char ':'
resources/tif.Tiff-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.tiff: malformed file path "resources/tif.Tiff-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.tiff": invalid char ':'
resources/tif.Tiff-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.tiff: malformed file path "resources/tif.Tiff-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.tiff": invalid char ':'
resources/with_alpha.ExtractBand-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/with_alpha.ExtractBand-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/with_alpha.ExtractBand-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/with_alpha.ExtractBand-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/with_alpha.Flatten-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/with_alpha.Flatten-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/with_alpha.Flatten-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/with_alpha.Flatten-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/with_alpha.GetPoint_WithAlpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/with_alpha.GetPoint_WithAlpha-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/with_alpha.GetPoint_WithAlpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/with_alpha.GetPoint_WithAlpha-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'
resources/with_alpha.GetPoint_WithAlpha2-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png: malformed file path "resources/with_alpha.GetPoint_WithAlpha2-linux-jammy_amd64_libvips-8.12.1-Wed Feb  2 14:43:28 UTC 2022.golden.png": invalid char ':'
resources/with_alpha.GetPoint_WithAlpha2-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png: malformed file path "resources/with_alpha.GetPoint_WithAlpha2-linux-kinetic_amd64_libvips-8.13.0-Tue Aug 23 04:05:08 UTC 2022.golden.png": invalid char ':'

I think someone changed the golden image name format to include a timestamp when it was generated but it's using a formatting with colons.
golang/go#28001

Can we use a formatting that works with go get?

@tonimelisma I think this was broken by your commit here:
820907b
The libvips version contains the date it was built.
We should sanitize this, replacing colons with hyphens or something like that.

@tonimelisma @davidbyttow I created a PR to sanitize them here:
#354

Hmm @davidbyttow I thought CI would regenerate the golden images. @tonimelisma what command did you run to regenerate them? The images in the repo still have colons in their names.

The CI does not change the repository contents. go test runs the test suite and if the reference images are missing, generates them. You would need to create a PR after running go test with the new reference images (and deleting the old ones)

Will this be fixed soon? I prevents pulling down the latest version

@tonimelisma @davidbyttow I'm trying to regenerate the images but I can't build / test govips currently because it's trying to link the wrong libvips version 😢
#355
Have you seen this issue before / do you know how to resolve it?

Hey @AttilaTheFun I haven't seen it. I don't think that's a govips issue, it's probably something with other tooling.

Hmm @tonimelisma do you know how govips / cgo locates the installed vips version? I have no idea how / why it's looking for this version that doesn't exist.

Oh! @tonimelisma I think it's an issue with the shell integrated with vscode. When I tried the same command from a regular terminal it found the correct libvips version. I'm not sure how it got messed up but I can use the regular terminal for now.

Hmm I'm getting some CGO crashes while running tests against libvips 8.14.2_1:
#356

Need a new tag. Pulling in the latest commit works now

@sonu27 @AttilaTheFun apologies. I've released a new version, v2.13.0 with the latest commits.