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

More documentation on library paths and names #2140

Merged
merged 1 commit into from Jul 4, 2018
Merged

Conversation

Kaiepi
Copy link
Collaborator

@Kaiepi Kaiepi commented Jul 3, 2018

The problem

Library paths and names needed more documentation. See #1513

Solution provided

More was written

@Skarsnik
Copy link
Contributor

Skarsnik commented Jul 3, 2018

This example is misleading. the function does what specify the ABI version to the native trait is supposed to do, and people SHOULD always specify an ABI version (very few execption like libmysqlclient ><)

@Kaiepi
Copy link
Collaborator Author

Kaiepi commented Jul 3, 2018

Updated

@Skarsnik
Copy link
Contributor

Skarsnik commented Jul 3, 2018

No, I mean the content of the function itself. The example was correct previously, it's just we should not encourage users to do what the ABI version does already :)

@Kaiepi
Copy link
Collaborator Author

Kaiepi commented Jul 3, 2018

You mean like returning /usr/local/lib/ebar/bar?

@Skarsnik
Copy link
Contributor

Skarsnik commented Jul 3, 2018

Just read the https://docs.perl6.org/language/nativecall#ABI/API_Version
If I write
is native('bar', 'v1) it should give you /usr/lib/libbar.so.1 on openbsd (/usr/lib/ will be the default system library path, (I think NC/moar query ld config).) If it's not the case it should be patched in NC or Moar to follow the proper OpenBSD intended behavior.

But what I mean is users should be encouraged to use the ABI version argument. Giving the user an example of the use of the Routine argument type witch does what the API feature does is probably a bad idea/misleading. Maybe a better example could be just a function that call pkg-config to get the path (or something similar)

@JJ JJ merged commit 8994f4f into Raku:master Jul 4, 2018
@Skarsnik
Copy link
Contributor

Skarsnik commented Jul 4, 2018

Thank :)

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.

None yet

3 participants