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

Add documentation on how the client can include Nain4 in their project #10

Merged
merged 6 commits into from
Jul 12, 2023

Conversation

gonzaponte
Copy link
Collaborator

Describes how to include nain4 in client projects using CMake.

@gonzaponte gonzaponte changed the title Add enable-nain4-in-cmake Add documentation on how the client can include Nain4 in their project Jul 7, 2023
@jacg
Copy link
Owner

jacg commented Jul 10, 2023

Does this depend on #11?

@gonzaponte
Copy link
Collaborator Author

It does. In the meantime, option 1 can be used if the user replaces the URL with one that points to my repo and the tag to my branch. Similarly, the other two options can be used if the client's clone of nain4 points to my branch.

@jacg
Copy link
Owner

jacg commented Jul 11, 2023

In that case, let's just merge, so that people can try it out without having to change anything else later on, besides the tag.

Can you prepare this for use with tag 0.0.0 in the main repo, please?

@gonzaponte
Copy link
Collaborator Author

Just to be clear, as it stands it will work as soon as we merge #11. Is up to the client to decide whether to use a tag, a commit hash or origin/master. Do you want to set GIT_TAG v0.0.0 in the documentation and clarify later that this can be replaced by a commit hash or origin/master?

@jacg
Copy link
Owner

jacg commented Jul 11, 2023

Ah, sorry, I got confused again about which of #10/#11 we're in.

I'll merge #11, and tag it with v0.0.0. Please adapt the docs PR (that'll be this one) so that the default instructions use that tag, and mention that this can be replaced with a commit etc.

We don't need to merge the #10 in any hurry, because I can publish the docs without merging, so we can iterate on the docs more freely.

@jacg
Copy link
Owner

jacg commented Jul 12, 2023

With #13 merged, we should include the source code from the tests in these docs, and merge the docs source. Remember, the docs at https://jacg.github.io/nain4/ are published independently of master. Nevertheless, we do want the docs source to be on master, even if it is sometimes out of sync with the published version.

There is also the question of how to mitigate the need to bump tags manually in #13's tests and these docs.

@jacg
Copy link
Owner

jacg commented Jul 12, 2023

Tag v0.0.1 is still valid, isn't it?

I don't really understand the origin business in the unresolved conversation.

@gonzaponte
Copy link
Collaborator Author

Tag v0.0.1 is still valid, isn't it?

I don't understand the question. v0.0.1 is valid, but I don't know what you are referring to.

I don't really understand the origin business in the unresolved conversation.

IIUC, if you don't write origin/ then FetchContent will only check GIT_TAG against the local clone. If something in the remote changes, the fetched content will not be affected. I guess that applies to tags as well, not only branch names...

@jacg
Copy link
Owner

jacg commented Jul 12, 2023

I don't understand the question. v0.0.1 is valid, but I don't know what you are referring to.

We haven't merged anything that would require adding a new tag, and using it in the tests and docs.

IIUC, if you don't write origin/ then FetchContent will only check GIT_TAG against the local clone.

OK, but I would discourage using branch names: people should stick to immutable things like commit hashes (very immutable, very inconvenient, more fine-grained) and tags (not guaranteed to be immutable, but almost; convenient; less fine-grained control).

Then there's no guarantee that the remote will be called origin. OTOH, this clone is created by FetchContent? In which case the user would have to try really hard to make it be anything else.

In summary, we're happy for the origin/ to be there in the docs?

@gonzaponte
Copy link
Collaborator Author

We haven't merged anything that would require adding a new tag, and using it in the tests and docs.

Nothing too relevant, I would say.

but I would discourage using branch names

The documentation suggests using a tag. The option of using a branch is mentioned but discouraged for the same reasons you lay down here.

this clone is created by FetchContent?

This is how I understand it.

In summary, we're happy for the origin/ to be there in the docs?

I don't have a strong feeling about this. The main reason that is there is because it was suggested by the cmake documentation, which favored being up to date with the remote tags. We are free to choose our own path.

@jacg
Copy link
Owner

jacg commented Jul 12, 2023

After stepping back to read it in context, I think it's spot on.

@jacg
Copy link
Owner

jacg commented Jul 12, 2023

I literally had my fingers on the keyboard to push the merge, when these last commits arrived? Is it ready now, or do you want to do any more?

@gonzaponte
Copy link
Collaborator Author

I'm done

@jacg jacg merged commit 9dadba4 into jacg:master Jul 12, 2023
@gonzaponte gonzaponte deleted the mdbook branch July 12, 2023 14:31
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.

2 participants