Skip to content

Update to ProtoBuf 1.0.11 #124

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

Merged
merged 9 commits into from
Jun 29, 2023
Merged

Update to ProtoBuf 1.0.11 #124

merged 9 commits into from
Jun 29, 2023

Conversation

nomadbl
Copy link
Contributor

@nomadbl nomadbl commented Jun 20, 2023

This project is great, which is why I wanted to use it.
The problem was I was getting version conflicts with other libraries due to using a very old version of ProtoBuf
So, this PR does the following:

This update may break older Julia builds, so please help me test it as you see fit. I tested with Julia1.9 including running the tests and verifying the examples. Exceptions:

  • Audio Example seems to not work (I don't hear the tone, maybe my speakers..)
  • Graph feature needs some more editing. I marked with the line which breaks with @test_broken. I don't know what the internal graph functions do so please fix that in a following separate PR.
  • A few examples are broken due to old code (i.e. MNIST code was updated since this was written, etc)

All in all, this update will make sure the project does not die when more libraries update.

@nomadbl nomadbl changed the title Updating versions so project does not go stale Update to ProtoBuf 1.0.11 Jun 20, 2023
@PhilipVinc
Copy link
Member

PhilipVinc commented Jun 23, 2023

I don't have the time to maintain the package anymore, you should ping some other maintainers in the org...

@nomadbl
Copy link
Contributor Author

nomadbl commented Jun 23, 2023

@c42f @tanmaykm @quinnj @pfitzseb @fredrikekre
Hi guys.
I would welcome a review by any of you that is willing.
I would also be willing to help maintaining this package if I get write permissions. I probably got a good overview of the package by working on this PR.

@PhilipVinc
Copy link
Member

(BTW while you are at it, you should clean up the unit test runners to stop testing this on Julia 1.3, and probably bump the minimum required version to the 1.6 LTS..)

@oxinabox
Copy link
Member

This looks good to me. I believe I have admin on the org and have been included in this package from the beginning.

I will try and give this a proper review early next week.

Copy link
Member

@oxinabox oxinabox left a comment

Choose a reason for hiding this comment

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

Thanks, looks mostly good, can you take a look at my comments and we should be able to get this merged in short order

src_dir = cur_path/"proto"
out_dir = cur_path/"protojl"
# src_dir = cur_path/"proto"
src_dir = PosixPath(".")/"proto"
Copy link
Member

Choose a reason for hiding this comment

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

Why was this changed?
Doesn't this break things in windows?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since this only runs once when building the package (specifically, when updating ProtoBuf) I don't think this should pose a problem. In particular there is nothing windows specific here (the generated files are commited and this has no reason to run under windows).

However if any Unit test fails under windows, then we can see about this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In principle it should work either way but ProtoBuf 1.0.0 code generation is annoying, so if at all possible I would like to avoid repeating this.


# Input files
infiles = glob("*.proto", src_dir/input_path)
infiles = split.(string.(glob("*.proto", src_dir/input_path)), '/') .|> (a -> a[3:end]) .|> a -> joinpath(a...)
Copy link
Member

Choose a reason for hiding this comment

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

For readability can we avoid using |> ?

This inparticular I think is the same as:

Suggested change
infiles = split.(string.(glob("*.proto", src_dir/input_path)), '/') .|> (a -> a[3:end]) .|> a -> joinpath(a...)
infiles = glob("proto/$(input_path)/*.proto", src_dir/input_path)), '/')

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In all honesty, this code should probably avoid the use of PosixPath altogether, which I used here in the first place because it was already in use and I tried to change as little as possible.
As it is now, it's hard for me to say if this change will work or not. It worked when run, but fails in the REPL. In the interest of my sanity lets do this in a separate PR (which I'll be happy to help with).
Since this whole gen code only needs to run once, lets leave it for now 🙏

@@ -11,8 +11,10 @@ ENV["GKSwstype"] = "100"
ENV["DATADEPS_ALWAYS_ACCEPT"] = true

LOG_DIRS = Any["test_logs/"]
test_s3 = false # Minio breaks on my system
Copy link
Member

Choose a reason for hiding this comment

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

should this be turned on on CI?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As the comment suggests, this throws Minio errors on my machine which I was unable to fix, so I disabled it.
If you can run the tests with true here it would be a big help 👍
If it works for you, then sure lets turn that on for CI

nomadbl and others added 2 commits June 26, 2023 23:48
Co-authored-by: Frames White <oxinabox@ucc.asn.au>
Co-authored-by: Frames White <oxinabox@ucc.asn.au>
@nomadbl nomadbl requested a review from oxinabox June 26, 2023 21:09
@oxinabox oxinabox merged commit ab514be into JuliaLogging:master Jun 29, 2023
@nomadbl nomadbl mentioned this pull request Jul 22, 2023
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.

3 participants