Skip to content

Conversation

cderv
Copy link
Collaborator

@cderv cderv commented Oct 4, 2024

Follow up on

we deactivated a failing test, and this solves it.

quarto run with dev version needs to not set --cached-only as we don't vendor anymore in dev version.

BTW, I used what we consider to be the mark of dev mode which is QUARTO_DEBUG. See comments

// On dev mode only (QUARTO_DEBUG='true'), we load the .env file in root quarto-cli project
envPath: quartoConfig.isDebug()
? join(quartoConfig.sharePath(), "..", "..", ".env")
: null,

// dev mode only
if (quartoConfig.isDebug()) {

We do set QUARTO_DEBUG in

  • quarto.cmd for windows
  • quarto for UNIX
  • our run-tests scripts

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am using quartoConfig from ../quarto.ts

If this is not ok to import from this file in deno.ts, then we could directly read the env var

getenv("QUARTO_DEBUG", "false") === "true"

@cderv cderv requested a review from cscheid October 4, 2024 15:19
@cderv
Copy link
Collaborator Author

cderv commented Oct 4, 2024

And that is why I deactivated the test on windows initially - because the way our tests is calling quarto run is not correct for windows.

[unit] > stdlib-run-version
         run-tests.ps1 smoke\run\stdlib-run-version.test.ts

[verify] > stdlib-run-version

Error executing 'quarto': program not found
Error: Error: Error executing 'quarto': program not found
    at execProcess (file:///D:/a/quarto-cli/quarto-cli/src/core/process.ts:184:11)
    at file:///D:/a/quarto-cli/quarto-cli/tests/smoke/run/stdlib-run-version.test.ts:13:24
    at Object.verify (file:///D:/a/quarto-cli/quarto-cli/tests/test.ts:116:17)
    at fn (file:///D:/a/quarto-cli/quarto-cli/tests/test.ts:196:25)
    at async innerWrapped (ext:cli/40_test.js:191:5)
    at async outerWrapped (ext:cli/40_test.js:134:14)

    throw new AssertionError(msg);
          ^
    at assert (https://jsr.io/@std/assert/0.224.0/assert.ts:18:11)
    at Module.fail (https://jsr.io/@std/assert/0.224.0/fail.ts:17:3)
    at fail (https://jsr.io/@std/testing/0.224.0/asserts.ts:663:11)
    at fn (file:///D:/a/quarto-cli/quarto-cli/tests/test.ts:[259](https://github.com/quarto-dev/quarto-cli/actions/runs/11182363132/job/31088505430?pr=10972#step:27:260):11)

I'll see if I can fix. Or just ignore again

@cderv
Copy link
Collaborator Author

cderv commented Oct 4, 2024

I can't even run it on windows locally

running 1 test from ./smoke/run/stdlib-run-version.test.ts
[unit] > stdlib-run-version ...
------- output -------
[verify] > stdlib-run-version
{
  result: {
    success: false,
    code: 1,
    stdout: "",
    stderr: "ERROR: Quarto requires reconfiguration to install Deno version v1.46.3. Please run `./configure.cmd` command.\n" +
      "\n"
  }
}
----- output end -----
[unit] > stdlib-run-version ... FAILED (356ms)

Some windows thing regarding re-configuration detection in dev more. quarto run works on the file, but running it from deno test is not working well.

I'll just ignore again

So I'll just ignore.

@cscheid
Copy link
Collaborator

cscheid commented Oct 4, 2024

@cderv But you can do quarto run docs/run/test-stdlib.ts locally?

@cderv
Copy link
Collaborator Author

cderv commented Oct 4, 2024

But you can do quarto run docs/run/test-stdlib.ts locally?

Yes exactly. No error when calling quarto run docs/run/test-stdlib.ts on Windows.

The problem only is with ./run-tests.ps1 smoke\run\stdlib-run-version.test.ts

@cscheid cscheid merged commit 85f2378 into main Oct 4, 2024
47 checks passed
@cscheid cscheid deleted the fix/deno-update-test branch October 4, 2024 20:10
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