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

Auto update for include file #126

Open
richardFK opened this issue Feb 7, 2021 · 6 comments
Open

Auto update for include file #126

richardFK opened this issue Feb 7, 2021 · 6 comments

Comments

@richardFK
Copy link

Auto update for compiling when include file changed.

When editing an include file for use with the current QB64 program being edited in the IDE - the .exe file generated does not use the latest include file version (unless the programmer remembers to also "edit" the line (and immediately restores the line) where the include file is mentioned).

Feature request - option to auto update to latest versions of any include files referenced when compiling.

@FellippeHeitor
Copy link
Contributor

FellippeHeitor commented Feb 11, 2021

Hello, @richardFK - We've added that feature to the IDE, so that when you double-click an $INCLUDE line, another instance of QB64 will be launched so you can make edits. When you come back to the first instance, the include file will be checked for differences and the program will be recompiled.

image

image

@richardFK
Copy link
Author

Sorry - forgot to mention when using an EXTERNAL application (eg NotePad) to edit an include file.

YES, when using QB64 IDE to edit $include files - the latest (saved) version of the $include file is used in compiling.

HOWEVER, if a $include file is edited (and saved) in say NotePad OR by some means is obtained (eg from internet or a program generates it) then unless one uses the "double-click action", or manually edits the QB64 IDE $include program line itself - the latest version is not used in compiling.

ALSO, if have a DECLARE CUSTOMTYPE LIBRARY ".\cinclude" the "double-click action" is not applicable here (QB64 IDE unfortunately cannot be "all things") - and here an external application, eg NotePad, has to be used to edit the include file.

Because QB64 IDE automatically checks things on every key-stroke before compilation is performed - it would make sense (to me) that it is quite possible that anything referenced (such as include files) could change independently of the IDE process - so therefore the IDE should reload all includes before compilation.

In either case, one should not have to worry about say "double-clicking action" or manually forcing the IDE to update itself (re include files) and although it is easy enough to do - total automation update by the IDE could result in one-less step by the programmer.

@FellippeHeitor
Copy link
Contributor

We're trying to reduce wear to hard drive, I believe that would cause more actually. It is kept for consideration though.

@richardFK
Copy link
Author

So to have as an "User selectable Option" if possible please.

@dkearns
Copy link
Contributor

dkearns commented Feb 12, 2021

I've also noticed this as an issue, being primarily a Vim user, but jumping between the two.

@aouwt
Copy link
Contributor

aouwt commented Mar 21, 2021

In Linux there is inotify that sets a flag when a file is modified, without having to constantly re-read the file, according to this SO article.

This could also be used, for example, to warn the user if an executable/opened file (not just $INCLUDE files) was modified while it still is opened in the IDE, much like what gedit does.

I don't 100% understand it, so please correct me if I am wrong. I also don't think there is an equivalent function for Windows or MacOS.

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

No branches or pull requests

4 participants