Skip to content

Resolved issues #1233 and #1218 #1234

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

Merged
merged 12 commits into from
Mar 11, 2025
Merged

Resolved issues #1233 and #1218 #1234

merged 12 commits into from
Mar 11, 2025

Conversation

xexyl
Copy link
Contributor

@xexyl xexyl commented Mar 10, 2025

Both mkiocccentry and txzchk (the only ones that use other tools) now
search $PATH for the tools first by way of the find_utils() function
(modified a fair bit) and a new util function in jparse called
resolve_path(). The jparse util functions shell_cmd() and pipe_open()
were also improved to resolve paths if no / is in the command name. As
for make: we now search for gmake first as the Makefiles we need are GNU
Makefiles.

xexyl added 6 commits March 10, 2025 03:47
Also fixed an error with -u uuidfile where it would not set the test boolean
to true if the UUID was "true".

The -u uuidfile and -U UUID options may not be used with -i answers, -d
or -s seed.

Updated man page for the above changes.

**IMPORTANT NOTE**: you do NOT need to use this update in order to participate
in the IOCCC28!
The -x option to force delete the submission directory and -r
rm option to set path to rm(1) were added to mkiocccentry as part of
issue ioccc-src#1208. The change in order of args is NOT done and will not be
done until AFTER IOCCC28.

Fixed bug where overwrite_answers was always true by default
(mkiocccentry).
A test was made for a future enhancement (post IOCCC28) and this was
accidentally committed.
Since the two options cannot be used together do not check for one if
the other failed.

Also tell the user they can use the -x option if the submission
directory already exists (this comes after the part of telling them to
move it, remove it or use a different directory).
Both mkiocccentry and txzchk (the only ones that use other tools) now
search $PATH for the tools first by way of the find_utils() function
(modified a fair bit) and a new util function in jparse called
resolve_path(). The jparse util functions shell_cmd() and pipe_open()
were also improved to resolve paths if no / is in the command name. As
for make: we now search for gmake first as the Makefiles we need are GNU
Makefiles.
@xexyl
Copy link
Contributor Author

xexyl commented Mar 10, 2025

Okay that's weird .. have an idea what might have gone wrong.

The way the fix of checking paths is it has to strdup() the tools found.
This means that they have to be allocated to free. But since the default
path of tar is set even when test mode is not used it was freed when not
allocated dynamically.
@xexyl
Copy link
Contributor Author

xexyl commented Mar 10, 2025

If nothing else this should fix an issue that I overlooked. We'll see if I missed something else.

@xexyl
Copy link
Contributor Author

xexyl commented Mar 10, 2025

Hmm .... okay looking further.

@xexyl
Copy link
Contributor Author

xexyl commented Mar 10, 2025

Ah. This should be simple to fix. Looking at why this happened.

xexyl added 3 commits March 10, 2025 12:30
This was introduced in the last commit when fixing the rm - for some
reason a / was after the variable name and it never should have been.
@xexyl
Copy link
Contributor Author

xexyl commented Mar 10, 2025

Each time something new is going wrong but make prep worked fine here. Hmm ....

@xexyl
Copy link
Contributor Author

xexyl commented Mar 10, 2025

I have this feeling it's to do with the $PATH change. I have a way to test it.

@xexyl
Copy link
Contributor Author

xexyl commented Mar 10, 2025

Fixing ... it is that.

@xexyl
Copy link
Contributor Author

xexyl commented Mar 10, 2025

There's something screwy going on. I know the problem I just have to figure out why it's happening.

@xexyl
Copy link
Contributor Author

xexyl commented Mar 10, 2025

It's actually quite amusing, the problem. Have to figure out how to fix it.

@xexyl
Copy link
Contributor Author

xexyl commented Mar 10, 2025

.. actually it's to me hilarious. I have a fix.

The problem with having 'txzchk' before './txzchk' is that if it's not
installed but one is in the mkiocccentry directory the functions
is_file() and is_exec() will happily report that it's an executable file
but when it comes time to executing it it won't work because '.' is not
in $PATH.
@xexyl
Copy link
Contributor Author

xexyl commented Mar 10, 2025

Fixed that problem:

The problem with having 'txzchk' before './txzchk' is that if it's not
installed but one is in the mkiocccentry directory the functions
is_file() and is_exec() will happily report that it's an executable file
but when it comes time to executing it it won't work because '.' is not
in $PATH.

@xexyl
Copy link
Contributor Author

xexyl commented Mar 10, 2025

There we go!

Lesson is probably something I won't end up doing but: if testing a problem one should uninstall the tools to really see what is going on in an environment that does not have the tools installed.

Copy link
Contributor

@lcn2 lcn2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 🙏 @xexyl

After processing this PR, we should be in a position to form a new formal release of this repo. However, we will review the status of this repo TOMORROW and perform more test, before forming the release.

Then after the new formal release of this repo has been made (tomorrow), we will process the related PRs in "the other repo" and then announce a summary of these changes in IOCCC news, Mastodon and Discord.

@lcn2 lcn2 merged commit ba3d146 into ioccc-src:master Mar 11, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants