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

Deprecate Version and Switches directives? #147

Closed
erkyrath opened this issue Dec 26, 2021 · 4 comments
Closed

Deprecate Version and Switches directives? #147

erkyrath opened this issue Dec 26, 2021 · 4 comments

Comments

@erkyrath
Copy link
Contributor

These cause headaches by changing compilation mode in mid-compile. Some switches are marked "...can't be set with 'Switches'" but we've never reviewed them to see which ones are really safe to use that way.

(This came up because of #146 . Switching Z-machine version in mid-compile now causes problems because the DICT_ENTRY_BYTES constant has to be redefined. There are probably other long-standing corner cases.)

Most of the use cases for these directives are now covered by the header-comment feature. (Put !% -v3 or a similar switch option at the top of the source file.) There's the possibility of switching various trace/debug options on and off in mid-compile, but I don't think that's very important. It will also get nerfed anyway when #103 goes in.

I don't propose removing these directives, but I would like to mark them "permanently deprecated" and say that bugs resulting from them may be DONOTFIXed.

@erkyrath
Copy link
Contributor Author

Version is already described in the DM4 as "obsolete or for compiler maintenance only".

@curiousdannii
Copy link

Switches can be useful in I7 to, for example, output the memory map at the end. But if it's just depreciated that will still work. Changing version in the middle is madness though.

@erkyrath
Copy link
Contributor Author

erkyrath commented Dec 27, 2021

This is cheesy, but it works:

Include (-!% -z
-) before "Output.i6t";

(The spacing and line breaks have to be exact, though.)

@erkyrath
Copy link
Contributor Author

The above hack doesn't work in I7 10.x. I am going to propose a more general header-directive-pragma for I7, once #189 is solidified.

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

3 participants