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

Remove -Z #707

Open
Y-Less opened this issue Apr 1, 2022 · 1 comment
Open

Remove -Z #707

Y-Less opened this issue Apr 1, 2022 · 1 comment

Comments

@Y-Less
Copy link
Member

Y-Less commented Apr 1, 2022

Issue description:

-Z was added to fix one single breaking change, namely that of _inc_ auto-generated include guards. However, the need for this is long past; includes have been updated and can deal without those guards. Now the flag just causes more confusion as people seem to think it reverts all non-breaking changes as well, which was never the intention, then get surprised when it doesn't.

Minimal complete verifiable example (MCVE):

Workspace Information:

  • Compiler version:
  • Command line arguments provided (or sampctl version):
  • Operating System:
@ghost
Copy link

ghost commented Jun 16, 2022

I deleted a comment I posted earlier because I thought I made a mistake. This was not a mistake after all (shouldn't have looked at it after getting up at 4:15 am 😛 )
Anyway...

Paths must use backslashes, right? YSI-Includes even forces this (Fatal error 111: user error: Did you use 'YSI/y_hooks' instead of 'YSI\y_hooks'?).
On Windows backslashes work fine.
Currently running ArchLinux, backslashes do not work so fine.

I can't include my own source files using backslashes in path (err 100).
YSI does get included but than nags about that forward slash.

However,
When compiling with -Z+ everything possible way works fine (mixing forward and backslashes for my own files, including YSI with either too). Didn't create a seperate issue since I didn't find it really an issue yet (since there's still -Z at the moment). Any idea on this and if not, could this be addressed before -Z is dropped?

In case more information is needed...

Workspace Information:

  • Compiler version: 3.10.10
    (built on current OS, cmake ../source/compiler/ -DCMAKE_C_FLAGS=-m32 -DCMAKE_BUILD_TYPE=Release -Wno-dev && make -j7)
  • Command line arguments provided (or sampctl version):
    .bashrc alias pawncc='pawncc -\;+ -\(+ -i/home/kevin/.pawncc/includes_samp/
    cli usage pawncc kgm.pwn -Z+
  • Operating System: ArchLinux

MCVE

Imagine the following files (relative to gamemodes):

./kgm-src/assembly.inc
./kgm-src/core.inc
./kgm.pwn

kgm.pwn

//Definitions, not relevant

#include "src/core.inc"

src/core.inc

//Definition checks, set options according to env, etc
//Not relevant even though some compiler options may be altered; issue persists without them)


#define KGM_ENV
#include "src/assembly.inc"

src/assembly.inc (less imaginary, this is the file as-is (without header comment) (yes, I'm aware I didn't change to slashes back to backslashes yet)

#include <a_samp>
#undef MAX_PLAYERS
#define MAX_PLAYERS MAX_SLOTS
//#undef MAX_SLOTS

//samp, plugins (non YSI includes)
#include <a_mysql>
#include <crashdetect>
#include <filemanager>
#include <samp_bcrypt>
#include <sscanf2>

//YSI includes
#if KGM_ENV < ENV_DEBUG_EXTRA
    #define YSI_NO_HEAP_MALLOC
#else
    #define YSI_YES_HEAP_MALLOC
#endif

#include <YSI_Coding/y_hooks>
#include <YSI_Coding/y_inline>
#include <YSI_Coding/y_timers>
#include <YSI_Coding/y_va>
#include <YSI_Data/y_foreach>
#include <YSI_Players/y_android>
//#include <YSI_Players/y_languages>
//#include <YSI_Players/y_text>
#include <YSI_Visual/y_commands>
#include <YSI_Visual/y_dialog>

//KGM: Utilities
#include "kgm-src/util/colors.inc"
#include "kgm-src/util/debug/entry.inc"

//KGM: Base init
#include "kgm-src/run/init/early.inc"

#if !defined KGM_CORE
    #error Don't compile the .inc files - Compile the .pwn file under (PROJECT_ROOT)/gamemodes/ instead!
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant