v icon indicating copy to clipboard operation
v copied to clipboard

Missing `popd` path in `make.bat`

Open flysand7 opened this issue 4 years ago • 3 comments

V version: V full version: V 0.2.2 44e78a6 OS: windows, Microsoft Windows 10 Home Single Language v19042 64-bit

Additional potentially-useful details:

This system has MSVC and GCC compilers installed and the command is ran under Visual Studio Developers command prompt, meaning MSVC environment is on. GCC is in PATH.

What did you do?

  1. Run make.bat
  2. Notice how the script leaves a directory in the pushd stack.

Note:

In order to see pushd stack set the windows cmd prompt to a one that displays directory stack ($+ format specifier). An example of such prompt:

prompt $+$p$g 

(copy together with the space at the end)

This will print the number of plus signs corresponding to the height of the directory stack. Running popd decreases the number of pluses, and running pushd increases the number of pluses.

If you want to reset the prompt either restart the shell or type the following command (if you used default prompt):

prompt $p$g 

Note 2:

Alternative way to see this effect is to run the script from some subdirectory of the project root:

..\make.bat

And noticing that the directory after running the script is not restored.

What did you expect to see?

The height of the directory stack should be the same before and after running the make.bat script.

What did you see instead?

The script leaves the compiler root directory in the stack without popping:

c:\programs\v> ./make.bat
+c:\programs\v>

flysand7 avatar Jul 10 '21 10:07 flysand7

Do you want to make a PR for this if you know the solution?

danieldaeschle avatar Jul 19 '21 09:07 danieldaeschle

I have looked through the code, unfortunately I could not figure out why that happens. I'm not interested in contributing to V that much

flysand7 avatar Jul 20 '21 01:07 flysand7

I think that has been already fixed. Confirm @JalonSolov @spytheman ?

felipensp avatar Oct 17 '24 12:10 felipensp