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

Fix for GitHub's language detection #793

Merged
merged 1 commit into from Feb 6, 2015

Conversation

Projects
None yet
4 participants
@binary1248
Member

binary1248 commented Feb 5, 2015

GitHub uses its linguist library to analyse repositories for the languages used in their source files. Based on what language occurs the most, the repository is marked as such. This leads to SFML being marked as a C library instead of a C++ library. The reason behind this is because the headers in the extlibs directory contribute a huge percentage of the overall lines of code in the repository, and they are... in C...

Not too long ago, linguist added a way for repositories to mark directories that aren't already part of their exclusion list to be ignored.

This change will make SFML show up as a C++ library on GitHub.

@binary1248 binary1248 self-assigned this Feb 5, 2015

@mantognini

This comment has been minimized.

Member

mantognini commented Feb 5, 2015

👍

@eXpl0it3r

This comment has been minimized.

Member

eXpl0it3r commented Feb 5, 2015

This PR has been added to my merge list, meaning it will be merged soon, unless someone raises any concerns.

@eXpl0it3r eXpl0it3r added this to the 2.3 milestone Feb 5, 2015

Add linguist-vendored attribute to the extlibs directory to prevent G…
…itHub from factoring in dependencies when determining the primary language of the repository.

@eXpl0it3r eXpl0it3r merged commit 5139a7a into master Feb 6, 2015

@eXpl0it3r eXpl0it3r deleted the bugfix/language branch Feb 6, 2015

@binary1248

This comment has been minimized.

Member

binary1248 commented Feb 6, 2015

Now the question is: Do we want to go the extra step and move stb_image into extlibs as well?

@LaurentGomila: Why is stb_image in the source directory anyway?

@LaurentGomila

This comment has been minimized.

Member

LaurentGomila commented Feb 6, 2015

Since it's a single file in public domain, I thought it would be much easier to put it in the sources, rather than compiling it for every targeted OS and architecture every time it is updated.

@eXpl0it3r

This comment has been minimized.

Member

eXpl0it3r commented Feb 6, 2015

We could still compile it into SFML itself, but just move it into the extlib/src/ or something, but I guess it could be a bit confusing for some.

@binary1248

This comment has been minimized.

Member

binary1248 commented Feb 6, 2015

But.... it's just a pair of headers? So... no compilation needed? Not to mention that if it is put into extlibs, the newline normalization won't get applied to it as well, just like the other extlibs headers.

And about easy: I don't think it is much easier the way it is now. All that has to be changed is the location of the files and the CMakeLists.txt inside Graphics.

If you agree, I can submit another PR to get it moved into extlibs alongside all the other headers. No extra compilation required.

@LaurentGomila

This comment has been minimized.

Member

LaurentGomila commented Feb 6, 2015

But.... it's just a pair of headers? So... no compilation needed?

The way he does it is weird: it's a single header that contains both functions declarations and definitions. And you can define a macro if you just want one or the other. So it is compiled, but since it's only used in a single file (ImageLoader.cpp) we don't have to play with these macros, it is just included and compiled there.

But yes, I guess it could be moved to the extlib headers anyway.

@binary1248

This comment has been minimized.

Member

binary1248 commented Feb 6, 2015

Done in #795.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment