Azure-functions-core-tools: Azure Functions for Rust broken with latest core tools (2.7.1468)

Created on 18 Jul 2019  路  9Comments  路  Source: Azure/azure-functions-core-tools

Apparently the core tools now prevent any "unknown" language worker from working.

In 2.7.1373 this was an unnecessary warning.

In 2.7.1468 it is now a fatal error:

Can't determin [sic] project langauge from files. Please use one of [--csharp, --javascript, --typescript, --java, --python, --powershell]

Note the spelling error in determine.

Questions:

  • Why do the core tools need to know the language? The host can handle having FUNCTIONS_WORKER_RUNTIME in local.settings.json and should be able to run without issue, so why is this check acting as a gatekeeper to starting the host?
  • Is there a way to support third-party language workers with this design?

Steps to reproduce:

  1. Install Azure Functions Core Tools 2.7.1.373. If on Windows, add %ProgramFiles%\nodejs\node_modules\azure-functions-core-tools\bin to the PATH.
  2. Install rustup.
  3. rustup install stable.
  4. cargo install azure-functions-sdk.
  5. cargo func new-app repro && cd repro.
  6. cargo func new http -n hello
  7. cargo func run.

Expected results:

The application starts successfully and the HTTP function can be invoked.

Actual results:

C:\Users\Peter\tmp\repro>cargo func run
-> spawning 'cargo' to initialize script root: cargo run -- init --script-root C:\Users\Peter\AppData\Local\Temp\script-root.xktiVGQrKt7U --sync-extensions OK                                                                                      Finished dev [unoptimized + debuginfo] target(s) in 0.16s
     Running `target\debug\repro.exe init --script-root C:\Users\Peter\AppData\Local\Temp\script-root.xktiVGQrKt7U --sync-extensions`                                                                                                          
-> spawning 'func' to start the Azure Functions Host: func host start --port 8080 OK
Can't determin project langauge from files. Please use one of [--csharp, --javascript, --typescript, --java, --python, --powershell]                                                                                                            error: func failed with exit code 1.
bug

Most helpful comment

yes, I made the change to error out if we can't figure out the language... I wasn't aware of any scenarios that would require that and didn't consider #1024, my bad. I'll prepare a fix

All 9 comments

Aside: Also note the misspelling of language in the error message.

Good eyes, harder one to spot 馃槃

@ankitkumarr / @ahmelsayed - Are you aware of this change? We should not restrict languages in the CLI

yes, I made the change to error out if we can't figure out the language... I wasn't aware of any scenarios that would require that and didn't consider #1024, my bad. I'll prepare a fix

also spelling is hard apparently.

@ahamad-MS thanks for looking into this!

This is fixed and released in version 2.7.1480
https://github.com/Azure/azure-functions-core-tools/releases/tag/2.7.1480

I've confirmed the fix. Thank you very much for the seriously fast turnaround!

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings