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

Write to the generated README the actual list of products #626

Merged
merged 1 commit into from
Jan 30, 2020

Conversation

giordano
Copy link
Member

Suggested by @aminya on Slack. See an example of README generated with this PR: https://github.com/giordano/Fontconfig/blob/9c04ac01ef658dbb778ff74281427fd2fd3964cb/README.md

]
```

With such products defined, `Example_jll` would contain `data_txt`, `libdataproc` and `mungify_exe` symbols exported. For `FileProduct` variables, the exported value is a string pointing to the location of the file on-disk. For `LibraryProduct` variables, it is a string corresponding to the `SONAME` of the desired library (it will have already been `dlopen()`'ed, so typical `ccall()` usage applies), and for `ExecutableProduct` variables, the exported value is a function that can be called to set appropriate environment variables. Example:
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you make the example use the library in question? i.e. base the ccall on the first LibraryProduct (or drop it if it doesn't exist), etc.

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 thought so initially, but the call would be completely made up, potentially confusing a user reading the example and trying it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you allow it to be set in the build_tarballs.jl? I think the benefit of having runnable examples would be worth the additional complexity.

Copy link
Member

Choose a reason for hiding this comment

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

Some recipes build dozens of libraries; I don't think it's going to be easy to get people to give examples for all of them. On the other hand, it would be neat to have people be able to specify them. We could have a "example ccall()" parser where in the wizard we can ask you "just paste in an exemplary ccall() if one exists", and you can provide that ccall in the build_tarballs.jl as well.

Hmmm, I'm not sold, but it's an interesting idea.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think a single ccall would be fine.

Copy link
Member

Choose a reason for hiding this comment

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

Could also just link to proper docs about how to use executable products, library products and file products.

@aminya
Copy link

aminya commented Jan 21, 2020

I added a PR to make it possible to give a custom example.
giordano#2

@staticfloat staticfloat merged commit 7b3f073 into JuliaPackaging:master Jan 30, 2020
@giordano giordano deleted the readme branch January 30, 2020 23:46
@staticfloat
Copy link
Member

@aminya we're going to go ahead without your PR for now because we want to break the API for providing customized usage examples down a bit more. Feel free to open future PRs directly against BinaryBuilder instead of Mosè's fork.

I'm opening an issue first to discuss how best to implement this: #647

@aminya
Copy link

aminya commented Jan 31, 2020

@aminya we're going to go ahead without your PR for now because we want to break the API for providing customized usage examples down a bit more. Feel free to open future PRs directly against BinaryBuilder instead of Mosè's fork.

I'm opening an issue first to discuss how best to implement this: #647

Oh I see. I created a PR here for now:
#645

Let me know when you changed the API. You may apply my change to the new API too.

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.

5 participants