Skip to content

Conversation

@fingolfin
Copy link
Member

The two new functions have similar but not identical signature; this change
means that we don't have to pass things to autobuild() which are not needed
for building, but rather just for the meta JSON; and vice versa.

I came up with this while trying to write a patch for issue #856, and trying to understand what data I need to pass where.

The big diff in test is mostly due to the removal of mktempdir() do ... end blocks; if one uses the "ignore whitespace" diff mode, one can see the actual (comparatively small) changes.

@staticfloat
Copy link
Member

I'm generally in favor of this change, but I'll let @giordano have final approval.

The two new functions have similar but not identical signature; this change
means that we don't have to pass things to autobuild() which are not needed
for building, but rather just for the meta JSON; and vice versa.
Copy link
Member

@giordano giordano left a comment

Choose a reason for hiding this comment

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

Looks good to me, only a minor comment about a test

Product[LibraryProduct("libfoo", :libfoo), FrameworkProduct("fooFramework", :libfooFramework)],
[Dependency("Zlib_jll")];
)
println(meta_json_buff, JSON.json(dict))
Copy link
Member

Choose a reason for hiding this comment

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

Isn't there anything interesting we can test on the dictionary?

Copy link
Member Author

Choose a reason for hiding this comment

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

I am sure one could. For example, by comparing it with the decoded JSON data in objs down below -- although that'd essentially test the JSON encoder/decoder; not sure if that's so useful?

However, I deliberately tried to restrict the changes in this PR to refactoring, not adding new stuff.

Copy link
Member

Choose a reason for hiding this comment

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

Sure, but there was a minimal test before 😉

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, I must have missed that, what test was there that I accidentally removed? It still serializes and deserializes the dict to JSON and back as before.

@giordano giordano merged commit 2d68c43 into JuliaPackaging:master Aug 5, 2020
@fingolfin fingolfin deleted the mh/meta_json branch October 21, 2021 18:38
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