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

YSI communication missing breaks builds #2

Closed
Y-Less opened this issue Apr 25, 2017 · 6 comments
Closed

YSI communication missing breaks builds #2

Y-Less opened this issue Apr 25, 2017 · 6 comments

Comments

@Y-Less
Copy link

Y-Less commented Apr 25, 2017

I've had multiple reports of problems, which people attributed to both the new compiler and YSI:

pawn-lang/compiler#164
https://github.com/Misiur/YSI-Includes/issues/166

After investigation, I found out it was this:

http://forum.sa-mp.com/showpost.php?p=3768059

Can you please put the headers back in, people are used to just having both working fine, with whichever is newer being used. Or at least some reduced headers so YSI can query that file, but your version won't query YSI if you really don't want YSI being used. Maybe just:

#define _FOREACH_LOCAL_VERSION 19

// Foreach is testing us.
#if defined _FOREACH_INC_TEST
	#define _FOREACH_CUR_VERSION _FOREACH_LOCAL_VERSION
	#endinput
#endif
#define _FOREACH_INC_TEST

#if !defined _samp_included
	#error "Please include a_samp or a_npc before foreach"
#endif
@Y-Less
Copy link
Author

Y-Less commented Apr 25, 2017

That will also cover the reinclusion case, so the _foreach_included check isn't needed any more (which is good, because I might have to add something to detect and complain about that symbol to YSI).

@ziggi
Copy link
Member

ziggi commented Apr 25, 2017

I don't understand why people uses foreach and YSI together but ok, I will add some checks.

And I want to save ability to include foreach twice, so I think that something like that is better:

#if defined _FOREACH_LOCAL_VERSION
	#endinput
#endif
#define _FOREACH_LOCAL_VERSION 19

// Foreach is testing us.
#if defined _FOREACH_INC_TEST
	#endinput
#endif

#if !defined _samp_included
	#error Please include a_samp or a_npc before foreach
#endif

What do you think?

@Y-Less
Copy link
Author

Y-Less commented Apr 25, 2017

People don't really use them together, but a lot of people tend to have both downloaded from various sources and modes. The code I posted already has an include guard in it so you can't include it twice.

@ziggi
Copy link
Member

ziggi commented Apr 25, 2017

The code I posted already has an include guard in it so you can't include it twice.

But if I will include twice (with your code), I will get _FOREACH_LOCAL_VERSION already defined error.

@Y-Less
Copy link
Author

Y-Less commented Apr 25, 2017

You shouldn't do - that only happens if the two definitions are different. Two identical defines are ignored.

@ziggi
Copy link
Member

ziggi commented Apr 25, 2017

I didn't know about this, thanks.

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

No branches or pull requests

2 participants