Move to bcryptjs

There is a pure js version of bcrypt that we might want to try out because compiling bcrypt is causing a lot of issues (see https://github.com/feathersjs/feathers-chat/issues/1 and https://github.com/feathersjs/feathers/issues/273 for example).

Yeah.  It can really be a huge pain to get bcrypt to build.  I ran into that with Travis.  Let's just be sure to call it out in the readme of the modules that use it.  If bcrypt being 2.7x slower means they have to use 3x more machines for scaling then they might want to know about other options.

Ah yes, that's another specific problem for bcrypt, it only runs on newer versions of GCC that many Linux distributions don't have.
I can't see a huge performance hit here. It's not that you usually create thousands of new users that need their passwords hashed per second.

Yeah. Seems like now It will only be a few weeks before somebody shows us.  :)

I'm less concerned with the performance but more the memory overhead. The bcrypt algorithm is fixed to a certain amount of time to compare passwords in order to prevent timing attacks and you don't compare passwords enough for performance to really have an impact. We should check to see if switching to the JS one doesn't raise memory a bunch.
Sorry I'm being a stickler but IMHO this a pretty low priority given everything else we have on the go. I don't want to monkey with a bunch of the auth stuff until we have good test coverage in place.
I also think, as a general rule, that just because a couple people have issues doesn't mean we should change something for everyone. We've only had 2 issues created and both were from people that are new to node and on windows.

I think it is. Besides those two issues it came up in other conversations before and it does make things much harder to use in Windows.
I already spent at least hour myself trying to figure out why my Travis CI tests didn't pass (it didn't come with the right version of GCC to compile bcrypt) and anybody who is using Travis (or more conservative Linux distributions) for their projects will also run into the same problem.

We ought to add a section to the FAQ docs on Working with Travis

@marshallswain probably not our concern there really. We only use Travis for plugins and I think the generator generally does a good job of scaffolding out stuff. We can always help people if they want to transfer repos to us.
@daffl alright, feel free to add it after I get https://github.com/feathersjs/feathers-authentication/pull/109 merged later today. Personally, I'd like to have at least a rough idea of what the CPU/Memory effects of switching are going to be given how core this module is turning out to be, but if you think it's top priority then shrug.
Like I said, it is not a very high priority for me.

I would say that as a windows user it is reeeeeally painful to install the whole bunch of visual studio thing (around 9G) just for get a convenient c++ compiler to build feathers-authentication. Would be nice if this got solved.
来自 魅族 MX5
-------- 原始邮件 --------
发件人：Eric Kryski<EMAIL_ADDRESS>时间：周三 3月23日 00:19
收件人：feathersjs/feathers-authentication<EMAIL_ADDRESS>主题：Re: [feathers-authentication] Move to bcryptjs (#112)

@marshallswain probably not our concern there really. We only use Travis for plugins and I think the generator generally does a good job of scaffolding out stuff. We can always help people if they want to transfer repos to us. @daffl alright, feel free to add it after I get #109 merged later today. Personally, I'd like to have at least a rough idea of what the CPU/Memory effects of switching are going to be given how core this module is turning out to be, but if you think it's top priority then shrug. Like I said, it is not a very high priority for me. —You are receiving this because you are subscribed to this thread.Reply to this email directly or view it on GitHub

Closed by https://github.com/feathersjs/feathers-authentication/pull/137.


[SPARK-7478][SQL] Added SQLContext.getOrCreate

Having a SQLContext singleton would make it easier for applications to use a lazily instantiated single shared instance of SQLContext when needed. It would avoid problems like

In REPL/notebook environment, rerunning the line {{val sqlContext = new SQLContext}} multiple times created different contexts while overriding the reference to previous context, leading to issues like registered temp tables going missing.

In Streaming, creating SQLContext directly leads to serialization/deserialization issues when attempting to recover from DStream checkpoints. See [SPARK-6770]. Also to get around this problem I had to suggest creating a singleton instance - https://github.com/apache/spark/blob/master/examples/src/main/scala/org/apache/spark/examples/streaming/SqlNetworkWordCount.scala

This can be solved by {{SQLContext.getOrCreate}} which get or creates a new singleton instance of SQLContext using either a given SparkContext or a given SparkConf.
@rxin @marmbrus

Merged build triggered.

Merged build started.

Test build #32220 has started for   PR 6006 at commit bc72868.

Test build #32220 has finished for   PR 6006 at commit bc72868.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/32220/
Test FAILed.

Merged build triggered.

Merged build started.

Test build #32224 has started for   PR 6006 at commit f82ae81.

Test build #32224 has finished for   PR 6006 at commit f82ae81.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/32224/
Test FAILed.

Merged build finished. Test FAILed.

What about HiveContext?

@marmbrus Good you raised the question. @rxin and I had half-a-discussion offline about it. Correct me if I am wrong but HiveContext is a superset of the SQLContext in terms of functionality. So the last HiveContext created should also be accessible through this interface. Since the SQLContext constructor register itself with singleton, the HiveContext will also do the same. This part made sense to me.
Going beyond that if you think there should also be a HiveContext.getOrCreate, which would return the last instantiated HiveContext (not SQLContext), I can add that too in this PR.

Yeah the first part seems reasonable.  But I think you also need a way to force the getOrCreate command to create a hive context.

test this please.

So HiveContext.getOrCreate sounds good?

Merged build triggered.

Merged build started.

Test build #32264 has started for   PR 6006 at commit f82ae81.

Test build #32264 has finished for   PR 6006 at commit f82ae81.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/32264/
Test FAILed.

Merged build triggered.

Merged build started.

Test build #32880 has started for   PR 6006 at commit 83bc950.

Test build #32880 has finished for   PR 6006 at commit 83bc950.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/32880/
Test PASSed.

Merged build finished. Test PASSed.

Build triggered.

Build started.

Test build #32891 has started for   PR 6006 at commit d3ea8e4.

Merged build triggered.

Merged build started.

Merged build triggered.

Merged build started.

Test build #32894 has started for   PR 6006 at commit b4e9721.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/32893/
Test FAILed.

Test build #32894 has finished for   PR 6006 at commit b4e9721.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/32894/
Test FAILed.

Test build #32891 has finished for   PR 6006 at commit d3ea8e4.

This patch fails Spark unit tests.
This patch does not merge cleanly.
This patch adds no public classes.

Build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/32891/
Test FAILed.

Merged build triggered.

Merged build started.

Test build #32903 has started for   PR 6006 at commit dec5594.

Merged build triggered.

Merged build started.

Test build #32904 has started for   PR 6006 at commit bf8cf50.

Test build #32903 has finished for   PR 6006 at commit dec5594.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/32903/
Test FAILed.

Merged build finished. Test FAILed.

Test build #32904 has finished for   PR 6006 at commit bf8cf50.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/32904/
Test FAILed.

@marmbrus Can you help me debug this?

HiveContext use derby as the metastore database defaultly which only support single instance for one metastore path.
I think you need config the javax.jdo.option.ConnectionURL before creating the HiveContext
you can change getorcreate like this:
  def getOrCreate(sparkContext: SparkContext, config: Map[String, String] = Map.empty): HiveContext   = {
    INSTANTIATION_LOCK.synchronized {
      if (lastInstantiatedContext.get() == null) {
        new HiveContext(sparkContext) {
          override def configure(): Map[String, String] = config
        }
      }
    }
    lastInstantiatedContext.get()
  }

then when you create hivecontext in HiveContextSuite, you can configure it like this
    val hiveContext = HiveContext.getOrCreate(testSparkContext, HiveContext.newTemporaryConfiguration)

Build triggered.

Build started.

Test build #33199 has started for   PR 6006 at commit 48adb14.

Build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/33199/
Test FAILed.

Merged build triggered.

Merged build started.

Test build #33201 has started for   PR 6006 at commit c66ca76.

Merged build triggered.

Merged build started.

Test build #33207 has started for   PR 6006 at commit 79fe069.

@marmbrus Could you take a look?

Test build #33201 has finished for   PR 6006 at commit c66ca76.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/33201/
Test PASSed.

Merged build finished. Test PASSed.

Test build #33207 has finished for   PR 6006 at commit 79fe069.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/33207/
Test PASSed.

Minor comments, otherwise LGTM.

Merged build triggered.

Merged build started.

Test build #33264 has started for   PR 6006 at commit 25f4da9.

Test build #33264 has finished for   PR 6006 at commit 25f4da9.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
public class TaskMemoryManager

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/33264/
Test PASSed.

I merging this! Thanks @marmbrus for reviewing.

Can you guys point me what is the proper way to use getOrCreate with HiveContext?

@jelez you can create an HiveContextSingleton to workaround it. Refer to example "SqlNetWorkWordCount"
@tdas Why you removed HiveContext.getOrCreate? I can't find obvious reasons from the conversation.


[iOS] Media Feature Impl

Issue

close #ISSUE_NUMBER

Overview (Required)

make sure repository connected to media screen

Links

related PR: https://github.com/DroidKaigi/conference-app-2021/pull/526

Screenshot

Before
After

There is a layout off like below (spacing). But it's okey. if it is not good, fix it with another issue.

This problem seems to happen by using GeometryReader in SmallCard.
As you know, we are using GeometryReader to resize the image for NukeUI.LazyImage
I will take a look about this with other opportunity.


Integration tests

@feross @mathiasvr

$ time npm run integration-test

><EMAIL_ADDRESS>integration-test /Users/dc/code/webtorrent-desktop
> npm run build && node ./test

><EMAIL_ADDRESS>build /Users/dc/code/webtorrent-desktop
> babel --quiet src --out-dir build

TAP version 13
# app runs
ok 1 html title
ok 2 screenshot comparison app-basic
# torrent-list: start, stop, and delete torrents
ok 3 html title
ok 4 screenshot comparison torrent-list-hover
ok 5 screenshot comparison torrent-list-start-download
ok 6 screenshot comparison torrent-list-hover-download
ok 7 screenshot comparison torrent-list-delete-prompt
ok 8 screenshot comparison torrent-list-hover
ok 9 screenshot comparison torrent-list-delete-prompt
ok 10 screenshot comparison torrent-list-deleted
# torrent-list: expand torrent, unselect file
ok 11 html title
ok 12 screenshot comparison torrent-list-cosmos-hover
ok 13 screenshot comparison torrent-list-cosmos-expand
ok 14 screenshot comparison torrent-list-cosmos-expand-deselect
ok 15 screenshot comparison torrent-list-cosmos-expand-start
ok 16 download folder contents: CosmosLaundromatFirstCycle
ok 17 screenshot comparison torrent-list-cosmos-delete-data
ok 18 screenshot comparison torrent-list-cosmos-deleted
ok 19 download folder missing: CosmosLaundromatFirstCycle
# add-torrent
ok 20 html title
ok 21 screenshot comparison add-torrent-0-percent
ok 22 screenshot comparison add-torrent-100-percent
# create-torrent
ok 23 html title
ok 24 screenshot comparison create-torrent-simple
ok 25 screenshot comparison create-torrent-advanced
ok 26 screenshot comparison create-torrent-100-percent
ok 27 torrent contents: /Users/dc/code/webtorrent-desktop/test/tempTestData/Desktop/saved.torrent
# video-streaming
ok 28 html title
ok 29 screenshot comparison play-torrent-bbb
ok 30 screenshot comparison play-torrent-return
# audio-streaming
ok 31 html title
ok 32 screenshot comparison play-torrent-wired
ok 33 screenshot comparison play-torrent-wired-2
ok 34 screenshot comparison play-torrent-wired-3
ok 35 screenshot comparison play-torrent-wired-fullscreen
ok 36 screenshot comparison play-torrent-wired-4
ok 37 screenshot comparison play-torrent-wired-list
ok 38 screenshot comparison play-torrent-wired-5

1..38
# tests 38
# pass  38

# ok

real	2m40.345s
user	1m49.353s
sys	0m32.132s

@dcposch I noticed that the play-torrent* images aren't checked into this PR. Can you add them?

@feross yeah, added them back. Ran the integration tests a bunch of times in a row to find and fix flaky parts.


process: bumping Antonion to emeritus

:-(

Thanks for all  your work and contributions to the project.


F.1. address _router verification - MADFactory1155

Will not fix;
there is a circular dependency between MADFactory and MADRouter

MadFactory provides the FactoryVerifier for MADRouter, and it is provided as an argument to MADRouter constructor
MADRouter provides routing functionality to MadFactory.

During script deployment, we first create the factory with an empty (0x0) address, create the router with the factory address, then set the router in the factory.
Once set this is not expected to change; all this is done during deployment of the smart contracts themselves.


[react, wallets] Add imToken Wallet

Problem solved
This PR adds support for the imToken wallet, including wallet IDs, connectors, locales.
Changes made

Added imToken wallet support
Updated locales for imToken Wallet
Implemented ImTokenConnector class for connecting to imToken Wallet
Created ImTokenWallet class for imToken wallet integration
The following files were skipped due to too many changes: packages/wallets/src/evm/wallets/imtoken-wallet.ts, - packages/react/src/wallet/wallets/imtoken/imtokenWallet.tsx

How to test

[ ] Automated tests: link to unit test file
[ ] Manual tests: step by step instructions on how to test

Contributor NFT
Paste in your wallet address below and we will airdrop you a special NFT when your pull request is merged.
Address:

PR-Codex overview
This PR adds support for the imToken wallet in the project.
Detailed summary

Added ImTokenWallet to wallets
Updated locales to include imtokenWallet
Implemented ImTokenConnector class
Added imtoken to walletIds constants
Added imTokenWallet to useInstalledWallets
Updated package.json for imToken wallet
Created ImTokenWallet class in wallets
Updated useInstalledWallets to check for imToken
Added imTokenWallet to locales in multiple languages

The following files were skipped due to too many changes: packages/react/src/wallet/wallets/imtoken/imTokenWallet.tsx

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

thanks for the contribution @makoshan - we'll review!

thanks! we'll get a release out today!


How to write the command line to generate music of different styles?

the genres and stylesc I set are like this:
genre = [
'jazz',
'classical',
'hip_hop'
]
styles = [
[
'data/jazz/CharlieParker',
'data/jazz/DavidLiebman',
'data/jazz/JJJohnson'
],
[
'data/classical/beethoven',
'data/classical/holst',
'data/classical/stravinsky'
'data/classical/sullivan'
],
[
'data/hip_hop/50_cent',
'data/hip_hop/ja_rule',
'data/hip_hop/pitbull',
'data/hip_hop/will_smith',
]
]
How to write the command line to generate music of different styles.
I use " python generate.py -h" to get the optional arguments,it says:
--styles STYLES [STYLES ...]  Styles to mix together
but i can't figure out the specific usage of the style control:
i have tried  " python generate.py --styles classical"and " python generate.py --styles classical[beethoven holst],
both showing "error: argument --styles: invalid int value: 'beethoven'"

@calclavia I have been reading the paper "DeepJ: Style-Speciﬁc Music Generation",
i can't find the access to the generated music.
Is there  an access to show how the effect of the music you generated.?
And I look through all issuses but can't find the CL problom above ... I have tried much but it still can't work.

The style argument takes in an int. If you wanted to generate classical music, the command to do so would be python generate.py --style 1 assuming you have the styles [jazz, classical, hiphop].

@taylorshin12 Thanks a lot!!~


[THREAD] PowerShell Generator - Quick Questions

If you have some quick questions about the PowerShell Generator, ask 'em here.
If you have an actual bug to report, go ahead and file an issue.

@fearthecowboy has the updates been released? I am facing issue while compiling the generated module.
PS D:\workspace\powershell\graph> .\generated\build-module.ps1
Creating isolated process...
Cleaning build folders...
Compiling module...
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphDriveAllof1.json.cs(56,217): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphDriveAllof1.json.cs(56,248): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphDriveAllof1.json.cs(59,225): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphDriveAllof1.json.cs(59,256): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphListAllof1.json.cs(54,232): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphListAllof1.json.cs(54,263): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphListAllof1.json.cs(55,247): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphListAllof1.json.cs(55,278): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphListAllof1.json.cs(58,216): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphListAllof1.json.cs(58,247): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
D:\workspace\powershell\graph\generated\build-module.ps1 : Compilation failed.
At D:\workspace\powershell\graph\generated\build-module.ps1:70 char:3
+   Write-Error 'Compilation failed.'
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,build-module.ps1

@fearthecowboy  I am also facing this issue while compiling. Any update on its fix ?
PS D:\workspace\powershell\graph> .\generated\build-module.ps1
Creating isolated process...
Cleaning build folders...
Compiling module...
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphDriveAllof1.json.cs(56,217): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphDriveAllof1.json.cs(56,248): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphDriveAllof1.json.cs(59,225): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphDriveAllof1.json.cs(59,256): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphListAllof1.json.cs(54,232): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphListAllof1.json.cs(54,263): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphListAllof1.json.cs(55,247): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphListAllof1.json.cs(55,278): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphListAllof1.json.cs(58,216): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
generated\api\Sample\API\Models\ComponentsSchemasMicrosoftGraphListAllof1.json.cs(58,247): error CS1061: 'IMicrosoftGraphSystemFacet' does not contain a definition for 'Linq' and no accessible extension method 'Linq' accepting a first argument of type 'IMicrosoftGraphSystemFacet' could be found (are you missing a using directive or an assembly reference?) [D:\workspace\powershell\graph\generated\Partial Graph API.csproj]
D:\workspace\powershell\graph\generated\build-module.ps1 : Compilation failed.
At D:\workspace\powershell\graph\generated\build-module.ps1:70 char:3
+   Write-Error 'Compilation failed.'
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,build-module.ps1

This may seem like a rudimentary question, but where should Directives be placed for generation of PowerShell Modules ?
I built a simple API and AutoRest successfully builds the PowerShell Module, but names it Invoke-Cmdletname when I'd like it to be Get-Cmdletname
Parameter Rename as detailed here https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#Tweak-The-Way-It-Generates-Cmdlets has likely syntax however when using AutoRest to generate the Module the following error is thrown
ERROR: Schema violation: Additional properties not allowed: directive
Thinking I'm missing something quite basic and just need to be pointed in the right direction.

@darrenjrobinson  - Are you using a configuration file?
AutoRest allows extensive configuration thru it's configuration file, in which you stop putting stuff on the cmdline, and stick it in a file.
You can use .json, .yaml or .md (markdown literate configuration) for your file.
Simplest  make a yaml file :
save as configuration.yaml
# your swagger file
input-file: foo.json

powershell:
  namespace: MyCompany.API
  output-folder: out

directive:
  - where:
      subject: VirtualMachine
      verb: Get
    set:
      subject: VM

Then from the command line: autorest configuration.yaml

We use the markdown literate configuration file format, which is a markdown file.
This has the virtue of being both docs and configuration, and when you're navigating in github, the readme.md is rendered automatically, and autorest will look for readme.md in the current folder, so you don't even have to specify it on the cmdline
The only difference is that configuration is in YAML code blocks in the markdown file.
# Sample Configuration

_the following line is required!_
> see https://aka.ms/autorest

``` yaml
# your swagger file
input-file: foo.json

powershell:
  namespace: MyCompany.API
  output-folder: out

directive:
  - where:
      subject: VirtualMachine
      verb: Get
    set:
      subject: VM
```

Hey @fearthecowboy yes I'm using a Config file.
Even using a module wide directive (at the top of the config file) such as the following fails. Also tried RegEx versions.
directive:

where:
verb: invoke
set:
verb: get

the output is
Process() cancelled due to exception : path.match is not a function / TypeError: path.match is not a function
at isAbsolute (/node_modules/@microsoft.azure/uri/dist/main.js:71:19)
at Object.ResolveUri (/node_modules/@microsoft.azure/uri/dist/main.js:149:9)
at ConfigurationView.ResolveAsPath (C:\Users\Darren Robinson.autorest@microsoft.azure_autorest-core@3.0.5402\node_modules@microsoft.azure\autorest-core\dist\lib\configuration.js:236:22)
at linq_es2015_1.From.Select.each (C:\Users\Darren Robinson.autorest@microsoft.azure_autorest-core@3.0.5402\node_modules@microsoft.azure\autorest-core\dist\lib\configuration.js:305:34)
at EnumerableImpl.Select [as _factory] (/node_modules/linq-es2015/lib/generators.js:29:15)
at Select.next ()
at EnumerableImpl.ToArray (/node_modules/linq-es2015/lib/linq.js:372:18)
at ConfigurationView.get InputFileUris [as InputFileUris] (C:\Users\Darren Robinson.autorest@microsoft.azure_autorest-core@3.0.5402\node_modules@microsoft.azure\autorest-core\dist\lib\configuration.js:306:14)
at Object.get (C:\Users\Darren Robinson.autorest@microsoft.azure_autorest-core@3.0.5402\node_modules@microsoft.azure\autorest-core\dist\lib\configuration.js:223:82)
at processInternal (C:\Users\Darren Robinson.autorest@microsoft.azure_autorest-core@3.0.5402\node_modules@microsoft.azure\autorest-core\dist\lib\autorest-core.js:103:26)
at process._tickCallback (internal/process/next_tick.js:68:7)
TypeError: path.match is not a function

Can you give us a concrete repro? I'll have to have @NelsonDaniel  take a look at it.

@NelsonDaniel @fearthecowboy
It a very simple API that I quickly built to help me get up to speed with AutoRest.
A very simple Get.
Here is the OpenAPI Definition that AutoRest successfully generates the module for but with the Verb Invoke, that I'm trying to change the verb to Get through the Config file.
swagger: '2.0'
info:
title: BOFH
version: 1.0.0
host: my.webhost.com.au
basePath: /
schemes:

https
http
paths:
/api/excuse:
get:
operationId: /api/excuse/get
produces:
- application/json
consumes: []
parameters: []
description: Get a BOFH Excuse
responses:
'200':
description: Success operation
schema:
$ref: "#/definitions/GetExcuseResponseModel"
security:
- apikeyQuery: []
definitions:
GetExcuseResponseModel:
type: object
properties:
excuse:
type: string
excuseGenerated:
type: string
securityDefinitions:
apikeyQuery:
type: apiKey
name: code
in: query

Great work on this. I'm stepping through getting it to work for the LogicMonitor API since it has a swagger specification. One thing is that they have a convoluted authentication system requiring a complicated signature. I noticed that your example shows how to add custom functionality via C#, but sadly I'm a powershell guy :)
I did manage to use HttpPipelinePrepend to get what I want using your Gist example, but is there a better way to add this authorization to the commands?
Get-Alertlist -HttpPipelinePrepend { param($req, $callback, $next )
    <# Use TLS 1.2 #>
    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

    <# account info #>
    $accessId = 'oiajweoriajweorijafake'
    $accessKey = 'L+C-9Sp2w2R)wA4Ufakefakefake'
    $company = 'fakecompany'

    $httpVerb = [string]$req.Method
    $resourcePath = $req.RequestUri.PathAndQuery

    <# Get current time in milliseconds #>
    $epoch = [Math]::Round((New-TimeSpan -start (Get-Date -Date "1/1/1970") -end (Get-Date).ToUniversalTime()).TotalMilliseconds)

    <# Concatenate Request Details #>
    $requestVars = $httpVerb + $epoch + $resourcePath
    write-verbose "Request Variables: $requestVars"

    <# Construct Signature #>
    $hmac = New-Object System.Security.Cryptography.HMACSHA256
    $hmac.Key = [Text.Encoding]::UTF8.GetBytes($accessKey)
    $signatureBytes = $hmac.ComputeHash([Text.Encoding]::UTF8.GetBytes($requestVars))
    $signatureHex = [System.BitConverter]::ToString($signatureBytes) -replace '-'
    $signature = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($signatureHex.ToLower()))

    <# Construct Headers #>
    $auth = 'LMv1 ' + $accessId + ':' + $signature + ':' + $epoch
    $req.headers.Authorization = $auth

    # call the next step in the Pipeline
    $responseTask = $next.SendAsync($req, $callback)

    # wait on the responseTask
    $response = $responseTask.Result

    # let the cmdlet finish it's job
    return $responseTask
 }

Is anyone able to generate a powershell API from https://github.com/MicrosoftDocs/vsts-rest-api-specs?
I have tried removing any "x-ms-*" attributes, but still get the "anyOf" error.
ERROR: Schema violation: Data does not match any schemas from 'anyOf'
    - file:///C:/Users/rmustard/Documents/GitHub/vsts-rest-api-specs/specification/account/4.1/accounts.json ($)

Full output included here.
PS ~\GitHub\vsts-rest-api-specs\specification\account\4.1> autorest --powershell --input-file:accounts.json
AutoRest code generation utility [version: 3.0.5195; node: v10.15.1, max-memory: 8192 gb]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
   Loading AutoRest core      'C:\Users\rmustard\.autorest\@microsoft.azure_autorest-core<EMAIL_ADDRESS>(3.0.5445)
   Installing AutoRest extension<EMAIL_ADDRESS>(beta)
   Installed AutoRest extension<EMAIL_ADDRESS>(beta->2.0.423)
   Installing AutoRest extension<EMAIL_ADDRESS>(beta)
   Installed AutoRest extension<EMAIL_ADDRESS>(beta->2.0.254)
   Installing AutoRest extension<EMAIL_ADDRESS>(beta)
   Installed AutoRest extension<EMAIL_ADDRESS>(beta->2.0.276)
ERROR: Schema violation: Additional properties not allowed: x-ms-vss-area
    - file:///C:/Users/rmustard/Documents/GitHub/vsts-rest-api-specs/specification/account/4.1/accounts.json ($)
ERROR: Schema violation: Additional properties not allowed: x-ms-vss-resource-area-id
    - file:///C:/Users/rmustard/Documents/GitHub/vsts-rest-api-specs/specification/account/4.1/accounts.json ($)
ERROR: Schema violation: Data does not match any schemas from 'anyOf'
    - file:///C:/Users/rmustard/Documents/GitHub/vsts-rest-api-specs/specification/account/4.1/accounts.json ($)
ERROR: Schema violation: Additional properties not allowed: x-ms-docs-override-version
    - file:///C:/Users/rmustard/Documents/GitHub/vsts-rest-api-specs/specification/account/4.1/accounts.json ($)
ERROR: Schema violation: Additional properties not allowed: x-ms-vss-resource
    - file:///C:/Users/rmustard/Documents/GitHub/vsts-rest-api-specs/specification/account/4.1/accounts.json ($)
ERROR: Schema violation: Additional properties not allowed: x-ms-vss-method
    - file:///C:/Users/rmustard/Documents/GitHub/vsts-rest-api-specs/specification/account/4.1/accounts.json ($)
C:\Users\rmustard\.autorest\@microsoft.azure_autorest-core<EMAIL_ADDRESS>- FAILURE {"exitCode":1}
Process() cancelled due to exception : [OperationAbortedException] Error occurred. Exiting. / Error: [OperationAbortedException] Error occurred. Exiting.
    at C:\Users\rmustard\.autorest\@microsoft.azure_autorest-core@3.0.5445\node_modules\@microsoft.azure\autorest-core\dist\lib\pipeline\schema-validation.js:30:19
    at process._tickCallback (internal/process/next_tick.js:68:7)

Referencing issue: https://github.com/Azure/autorest.powershell/issues/385
ERROR (UnknownJsonType/LLCS2000): Schema 'BasicAuthApplicationName' is declared with invalid type 'undefined'

Our API requires an api key in the request header in order to authenticate. Is this supported? If so could you provide an example of how you would populate the api key?
"securityDefinitions": {
        "x-api-key": {
            "name": "x-api-key",
            "type": "apiKey",
            "in": "header"
        }
    },

@epanipinto-jc  -- we currently don't handle adding auth data automatically. An example how to add it manually https://github.com/Azure/autorest/tree/master/docs/powershell/samples/timeswire

@fearthecowboy
Not being too familiar with C# it took a bit to figure out but changing the namespace and updating this section to append to the header vs query string appears to have worked. Thanks for the tip and quick response!
protected async Task<HttpResponseMessage> AddApiKey(HttpRequestMessage request, IEventListener callback, ISendAsync next) {     // add on the apikey we'll cheat and pull it from the environment :D     request.Headers.Add("x-api-key",System.Environment.GetEnvironmentVariable("xApiKey"));     // let it go on.     return await next.SendAsync(request, callback); }

It appears the generator only create cmdlets from items under the paths property within the OAS spec. Is there a way to create cmdlets for items that exist under definitions property that would essentially be New-* that would assist in the creation of objects?
An example of what I would like to do is I have a path that is used for the creation of new users, lets call that cmdlet Invoke-UserPost. That endpoint takes in specific properties that define a user which is defined within the definitions section of the OAS spec. Ideally the generator would create a function called New-User based upon that definition that would return the user as an object so that I can pipe it to the first command. New-User -FirstName:('Bruce') -LastName:('Wayne') | Invoke-UserPost

We originally were going to make something like that, but it ended up being less-than-awesome.
The fallback at this point is that all the objects have typeconverters that allow you to pass in a PSObject  or HashTable that looks like the object
ie,

$user = @{ FirstName="Bruce"; LastName="Wayne" } | Invoke-UserPost

Ah bummer... I see how that could be complex. I was hoping to leverage the parameter validation and structure already in the OAS spec to remove redundant work. I stumbled on another way to kinda accomplish this, that is pretty manual, but i'm still trying to get it to work. I'm curious if you have any thoughts on this.
Import-Module ('TestApi.psd1') -Force
$NewUser = [TestApi.Models.UserPost]::new()
$NewUser.Firstname = 'Bruce'
$NewUser.Lastname = 'Wayne'
$NewUser.Email =<EMAIL_ADDRESS>$NewPhoneNumber = [TestApi.Models.UserPostPhoneNumbersItem]::new()
$NewPhoneNumber.Number = 'Work'
$NewPhoneNumber.Type = '123456789'
$NewUser.PhoneNumbers = $NewPhoneNumber
$NewUser | Invoke-UserPost

What's the difference between that and
Import-Module ('TestApi.psd1') -Force
$NewUser =  @{
  Firstname = 'Bruce'
  Lastname = 'Wayne'
  Email =<EMAIL_ADDRESS>  PhoneNumbers = @( @{
    Number = 'Work'
    Type = '123456789'
   })
}

$NewUser | Invoke-UserPost

# you can also cast it to force the typeconverter to run and give a typed obecjt
$TypedNewUser = [TestApi.Models.UserPost] $NewUser

Validation is currently only leveraged on _expanded  parameter variants (which explode out all the body properties into powershell parameters)

FWIW, You can also call the Validate method on an object an have it give the validation errors for it (which are derived from the original OAI doc)
We didn't end up using that in the model objects, but it should be usable.
$NewUser = [TestApi.Models.UserPost] @{
  Firstname = 'Bruce'
  Lastname = 'Wayne'
  Email =<EMAIL_ADDRESS>  PhoneNumbers = @( @{
    Number = 'Work'
    Type = '123456789'
   })
}

$NewUser.Validate( $listener)

the $listener needs to implement the IEventListener interface ... I don't have a sample for that, but you could spelunk the code and find it.

@fearthecowboy, thanks for the help im still learning and figuring this out. Also maybe I am going about this the wrong way but in the end what I'm trying to achieve is to be able to transform our spec into cmdlets that enable our end users to quickly and easily write scripts to call our API in PowerShell. One aspect of this is to be able to create the objects that get sent to the cmdlets without having to worry about incorrectly building the objects.
After playing around some more this morning I am starting to realize maybe the class does not have all of the data that I thought it would. When I am talking about validation I want to leverage the bits in the spec that put requirements around things like type, maxLength, enum values, etc... What the difference is between our two examples, at least what I thought the difference was but I think I might be wrong, is that by creating the new object that the class would retain the requirements set in the spec and that when I populated the values of the new object that I would be prevented from adding invalid values or an invalid structure. I've included part of the specific definition from our spec as an example.
Spec Definition
  "definitions": {
    "systemuserputpost": {
      "title": "SystemUserPost",
      "type": "object",
      "properties": {
        "username": {
          "type": "string"
        },
        "firstname": {
          "type": "string"
        },
        "lastname": {
          "type": "string"
        },
        "email": {
          "type": "string",
          "maxLength": 1024
        },
        "phoneNumbers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "home",
                  "work",
                  "mobile"
                ]
              },
              "number": {
                "type": "string",
                "maxLength": 10
              }
            }
          }
        }
      },
      "required": [
        "email",
        "username"
      ]
    }
  }

Example 1
$NewPhoneNumber = [TestApi.Models.SystemuserputpostPhoneNumbersItem]::new()
$NewPhoneNumber.Type = 'home' # Should work because "home" exists in the enum array
$NewPhoneNumber.Type = 'NotHome' # Should not work because "NotHome" does not exists in the enum array, but it does which is not the desired result.

Example 2
$NewPhoneNumber = [TestApi.Models.SystemuserputpostPhoneNumbersItem]::new()
$NewPhoneNumber.InvalidProperty = 'InvalidValue' # Will not work because "NewPhoneNumber" does not have a property called "InvalidProperty" which is the desired result.

VS
$NewUser = [TestApi.Models.SystemuserputpostPhoneNumbersItem]@{
    InvalidProperty = 'InvalidValue'  # Should not work because "NewPhoneNumber" does not have a property called "InvalidProperty" , but it does which is not the desired result.
    Username        = 'NotBatman'
    Firstname       = 'Bruce'
    Lastname        = 'Wayne'
    Email           =<EMAIL_ADDRESS>    PhoneNumbers    = @( @{
            Type   = 'home'
            Number = '123456789'
        })
}

Additionally is there a way to see the body or headers of the request being made or any info about the response? I only see the request url when I add the -Debug parameter.

Is there a clear guide that shows how to use profiles in conjunction with tag:all-api-versions to generate a modules that targets two different API versions?
My overall goal is to generate single PowerShell module that can support two API versions. I'm generating my cmdlets using an OpenAPI v3 document, and my API has two versions, beta and v1.0 - https://graph.microsoft.com/{API-VERSION}/.

@fearthecowboy Do you have any docs/examples available for this?  We would like to use this for Microsoft Graph to switch between V1.0 and beta.

I don't have a doc for that at this point.
API version is a PATH parameter? .... hmm.  I gotta go check how that would impact it.
We should probably talk about how the different API versions work; it may be possible to craft something you can use as a profile; but it may require some tweaking to get it there.
Can we meet on teams (sometime early tomorrow?).

Sure, happy to meet and discuss.

I'm trying out autorest generator for PowerShell on a swagger file for the company I work for...but getting an error that seems to point to the way the parameters are defined, but the way I read the specifications for OpenAPI it is correct:
The message I'm getting as errors all have the common:

"Schema violation: Data does not match any schemas from 'oneOf'

But if I look at the highlighted one in the image (see below) it all looks fine. Am I missing something obvious?
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "User ID",
            "required": true,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "filter",
            "in": "query",
            "description": "Additional query options",
            "required": false
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of records to skip before taking results",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "take",
            "in": "query",
            "description": "Maximum number of records to include in results",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "sortBy[n].name",
            "in": "query",
            "description": "Sort field name",
            "required": true,
            "type": "string"
          },
          {
            "name": "sortBy[n].direction",
            "in": "query",
            "description": "Sort direction",
            "required": true,
            "type": "string"
          },
          {
            "name": "sortBy[n].priority",
            "in": "query",
            "description": "Priority index. Sorts with lower values are executed earlier",
            "required": false,
            "type": "integer",
            "format": "int32"
          }
        ],

Is there a way to implement a specified user agent with each API call? Would that be in the module.cs file?

Hi,
I'm completely new to autorest and have tried it for the first time but when running the following command:
autorest --powershell --input-file=vecta.json
I get the Error:
FATAL: Error: Operation http-operation:0 : /api/Activities/{activityId} has no servers entry (Are you missing 'host' or 'servers' information in your source file?)
Error: Plugin remodeler reported failure.
The Swagger JSON  in the vecta.json file is from: https://api.vecta.net/swagger/V0/swagger.json
I don't get this error when running
autorest --csharp --input-file=vecta.json
autorest --python --input-file=vecta.json
They both generate without errors, which make me think it's something specific to the powershell generator but i just wanted to check if anyone could see something i'm missing?
Thank you for any suggestions.

I am trying to set this up in a CI scenario using Azure Pipelines to generate, test, and pack the module to then get published to the PowerShell Gallery. Do yall have any examples or recommended suggestions for this?

I need a quick sanity check for my attempt to generate a powershell module for the VMWare Workstation Rest API.
Swagger file
Autorest command:
autorest --powershell --input-file:.\vmware.json --output-folder:.\OutDir --namespace:My.Example.Namespace
The VMWare swagger file has a misspelling (can you believe it?), and besides that, everything is working for the most part. I have attempted to generate a CSharp client, but a fatal error occurs due to the 'produces' value. PowerShell module generation and build completes successfully, however, there is no way to pass a URI to the command. Notice, there is no host field in the swagger file, and I think, that may be the issue. The only flags in my generated cmdlets are the proxy, pipeline related.
Every command fails with :
Invalid URI: The format of the URI could not be determined
Looking for a sanity check to confirm that I am not doing anything stupid.

Is there a way to leverage the values within the enum property of the swagger spec to populate a parameters ValidateSet options?

@James-Allerton I'm also seeing this with the swagger v2 JSON exposed by TeamCity and I've tried to modify the JSON and cannot figure out what it doesn't like.  Did you ever find a resolution to this?

@fearthecowboy may be time to enable Github Discussions to replace this issue thread?
https://docs.github.com/en/discussions

Hey folks,
Getting some schema violation errors, is there any method to ignore these?
kjacobsen@Orbiting-Dragon temp % autorest --input-file=https://api.stoplight.io/v1/versions/BG4PXY5ZvdxL5AmYX/export/oas.yaml --powershell
AutoRest code generation utility [cli version: 3.2.1; node: v12.22.1, max-memory: 2048 MB]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
   Loading AutoRest core      '/Users/kjacobsen/.autorest/@autorest_core@3.4.3/node_modules/@autorest/core/dist' (3.4.3)
INFORMATION:
The default version of @autorest/powershell has been bumped from 2.1+ to 3.0+.
 > If you still want to use 2.1+ version, please specify it with --use<EMAIL_ADDRESS>e.g 2.1.401.

INFORMATION: > Loading AutoRest extension '@autorest/powershell' (~3.0.0->3.0.430)
INFORMATION: > Loading AutoRest extension '@autorest/modelerfour' (4.15.414->4.15.414)
Process() cancelled due to failure
ERROR: Schema violation: should be array (paths > /companies/info > get > responses > 200 > schema > properties > authentications > items > properties > init_url > required)
    - https://api.stoplight.io/v1/versions/BG4PXY5ZvdxL5AmYX/export/oas.yaml:317:12 ($)
ERROR: Schema violation: should be array (paths > /companies/info > get > responses > 200 > schema > properties > authentications > items)
    - https://api.stoplight.io/v1/versions/BG4PXY5ZvdxL5AmYX/export/oas.yaml:304:9 ($)
ERROR: Schema violation: should match some schema in anyOf (paths > /companies/info > get > responses > 200 > schema > properties > authentications > items)
    - https://api.stoplight.io/v1/versions/BG4PXY5ZvdxL5AmYX/export/oas.yaml:304:9 ($)
ERROR: Schema violation: should NOT have additional properties (paths > /companies/info > get > responses > 200 > schema)
  additionalProperty: properties
    - https://api.stoplight.io/v1/versions/BG4PXY5ZvdxL5AmYX/export/oas.yaml:283:6 ($)
ERROR: Schema violation: should match exactly one schema in oneOf (paths > /companies/info > get > responses > 200 > schema)
  passingSchemas: null
    - https://api.stoplight.io/v1/versions/BG4PXY5ZvdxL5AmYX/export/oas.yaml:283:6 ($)
ERROR: Schema violation: should be equal to one of the allowed values (paths > /companies/info > get > responses > 200 > schema > type)
  allowedValues: file
    - https://api.stoplight.io/v1/versions/BG4PXY5ZvdxL5AmYX/export/oas.yaml:284:7 ($)
ERROR: Schema violation: should be array (paths > /companies/info > get > responses > 200 > schema > properties > authentications > items > properties > init_url > required)
    - https://api.stoplight.io/v1/versions/BG4PXY5ZvdxL5AmYX/export/oas.yaml:317:12 ($)
ERROR: Schema violation: should be array (paths > /companies/info > get > responses > 200 > schema > properties > authentications > items)
    - https://api.stoplight.io/v1/versions/BG4PXY5ZvdxL5AmYX/export/oas.yaml:304:9 ($)
ERROR: Schema violation: should match some schema in anyOf (paths > /companies/info > get > responses > 200 > schema > properties > authentications > items)
    - https://api.stoplight.io/v1/versions/BG4PXY5ZvdxL5AmYX/export/oas.yaml:304:9 ($)
ERROR: Schema violation: should NOT have additional properties (paths > /companies/info > get > responses > 200 > schema)
  additionalProperty: properties
    - https://api.stoplight.io/v1/versions/BG4PXY5ZvdxL5AmYX/export/oas.yaml:283:6 ($)
ERROR: Schema violation: should match exactly one schema in oneOf (paths > /companies/info > get > responses > 200 > schema)
  passingSchemas: null
    - https://api.stoplight.io/v1/versions/BG4PXY5ZvdxL5AmYX/export/oas.yaml:283:6 ($)
ERROR: Schema violation: should be equal to one of the allowed values (paths > /companies/info > get > responses > 200 > schema > type)
  allowedValues: file
    - https://api.stoplight.io/v1/versions/BG4PXY5ZvdxL5AmYX/export/oas.yaml:284:7 ($)

Hi guys,
I'm using autorest to generate powershell cmdlets from two (2) swagger definitions which share the same host name, but different base paths and some of the endpoints in both API specs are identitical
example:
host: mypage.com
file1 base path: my/api
file2 base path: my/saas/api
endpoint from file1 and file2: users/{userId}/tasks/{taskId}
endpoint from file1 and file2: users/{userId}/tasks/
I'm facing the following issues - generated c# cmdlets have the following names
with endpoint for file 1 -Get-Task_Get / Get-Task_List
with endpoint for file 2 - Get-Task_Get1 / Get-Task_List1
I had to go through the generated code and write down which .cs file correlates to which base path, however this isn't my biggest concern.
The generated script has name of Get-Task.ps1, below are some of the possible input parameters. Now if I want to execute lets say users/{userId}/tasks/ for base path my/saas/api I have comment out Get, Get1 and List1 from first parameter so it calls the desired endpoint. Whole point is I have to play around to comment and uncomment parameters based on what I want.
I would like to ask if there is a configuration I can write in my readme.md config file before running the autorest command or the only solution is to manually create separate ps1 with whats neccessary and give it a correct naming?
Thanks

Code
# [Parameter(ParameterSetName='Get', Mandatory)]
# [Parameter(ParameterSetName='Get1', Mandatory)]
[Parameter(ParameterSetName = 'List', Mandatory)]
#  [Parameter(ParameterSetName='List1', Mandatory)]
[Sample.API.Category('Path')]
[System.String]
${userId},
# [Parameter(ParameterSetName = 'Get', Mandatory)]
# [Parameter(ParameterSetName = 'Get1', Mandatory)]
[Sample.API.Category('Path')]
[System.String]
${taskId},

Hi,
When running the build-module.ps1 script, I get several errors:

CS1073: Unexpected token '$'
CS1525: Invalid expression term ''

Checking the lines its complaining about, they all contain this:
var _url = new global::System.Uri($"{$host}{pathAndQuery}");
Which makes sense, **$**host is invalid C# syntax. Why would the generator write '$host' instead of just 'host'?
Thanks!
Type       Extension Name                           Version      Location
core       @autorest/core                           3.0.6375     C:\Users\Chris.autorest<EMAIL_ADDRESS>core       @autorest/core                           3.8.4        C:\Users\Chris.autorest<EMAIL_ADDRESS>extension  @autorest/modelerfour                    4.15.414     C:\Users\Chris.autorest<EMAIL_ADDRESS>extension  @autorest/powershell                     3.0.481      C:\Users\Chris.autorest<EMAIL_ADDRESS>

Is there any steps to publish the generated modules to gallery? Please share

Hi
Does anyone have a sample for handling response?
eg we want to change some fields that are returned from a int enum to a string or change a timestamp from epoch to something human readable.

Does anyone have any tips on addressing this error:
error   | Modeler | Boolean schema 'schemas:657' with unknown format: 'bool' is not valid
error   | Modeler/UnknownSchemaType | The model schemas:657 does not have a recognized schema type 'boolean'

New to autorest, and am running into issues regarding circular references, and am completely lost on how I setup the directive no-inline thing. Is it in the swagger.json, if so, where, or is it in another file, and if so, where and what name should it have?
Been searching through issues both here and swagger, but unable to find any clear documentation for it.

~New to autorest, and am running into issues regarding circular references, and am completely lost on how I setup the directive no-inline thing. Is it in the swagger.json, if so, where, or is it in another file, and if so, where and what name should it have? Been searching through issues both here and swagger, but unable to find any clear documentation for it.~
Stumbled upon it when just skimming through the docs, for the nth time. https://github.com/Azure/autorest/blob/main/docs/generate/readme.md#keeping-your-options-in-one-place-the-preferred-option
Another issue has showed up thou, generated variable name starts with a number, and is therefore invalid C#. It is in generated/cmdlets directory, and it seems to have only happened in the only file that ends with ViaIdentity and a double-digit number. Any other generated cmdlets that have a double-digit number but without ViaIdentity does not suffer from this issue. None of the generated files with ViaIdentity and a single-digit number have this issue.
The generated code is below:
/// Identity Parameter
[global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)]
[global::OurModule.Category(global::OurModule.ParameterCategory.Path)]
public OurModule.Models.IOurModuleIdentity 0InputObject { get => this._0InputObject; set => this._0InputObject = value; }
Edit: Also noticed now that the onCreated and onOk parameters is duplicated in almost every method in generated/api/OurModule.cs. Probably due to a lot of the generated/cmdlets/ files contain duplicate overrideOnCreated, onCreated, overrideOnOk and onOk with the same parameter types.
Edit2: Think I've figured out why there are duplicates of onCreated and onOk. Our API, build with Entity Framework, returns an object with error details (I'm unfamiliar with EF, this might be OOB or not) and in the swagger it correctly specifies that it is returned on a bunch of non 20* codes, but autorest generates a handler for those error objects for both 200 and 201, even if that isn't specified in the swagger.
Example endpoint that generates duplicate onCreated and onOk methods:
"/api/Function": {
  "get": {
    "tags": [
      "Function"
    ],
    "summary": "Gets all functions asynchronous.",
    "parameters": [
      {
        "name": "ShowRemoved",
        "in": "query",
        "schema": {
          "type": "boolean",
          "default": false
        }
      }
    ],
    "responses": {
      "200": {
        "description": "Success",
        "content": {
          "application/json": {
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/FunctionViewListModel"
              }
            }
          }
        }
      },
      "204": {
        "description": "No Content"
      },
      "400": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "401": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "403": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "404": {
        "description": "Not Found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "422": {
        "description": "Client Error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      }
    }
  },
  "post": {
    "tags": [
      "Function"
    ],
    "summary": "Creates a function asynchronous.",
    "requestBody": {
      "description": "The create function model.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/FunctionCreateModel"
          }
        }
      }
    },
    "responses": {
      "201": {
        "description": "Created",
        "content": {
          "text/plain": {
            "schema": {
              "type": "string"
            }
          },
          "application/json": {
            "schema": {
              "type": "string"
            }
          },
          "text/json": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "400": {
        "description": "Bad Request",
        "content": {
          "text/plain": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          },
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          },
          "text/json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "401": {
        "description": "Unauthorized",
        "content": {
          "text/plain": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          },
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          },
          "text/json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "403": {
        "description": "Forbidden",
        "content": {
          "text/plain": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          },
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          },
          "text/json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "404": {
        "description": "Not Found",
        "content": {
          "text/plain": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          },
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          },
          "text/json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      },
      "422": {
        "description": "Client Error",
        "content": {
          "text/plain": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          },
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          },
          "text/json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        }
      }
    }
  }
},

Did you get any further with the duplicate 'onOK' etc issue? We are experiencing the exact same problem.


Corrupted data during search (POST)

v0.16.0
Steps:

add documents (creating index at the same time) with id, author, title and genre (all are strings).
add a field as facets (genre)
search (POST) with this parameter:

{
    "facetsDistribution": ["genre"]
}

-> OK

delete all documents
redo the same search than before -> get a 500

{
    "message": "Impossible to retrieve the document; Corrupted data",
    "errorCode": "internal",
    "errorType": "internal_error",
    "errorLink": "https://docs.meilisearch.com/errors#internal"
}

I tried to reproduce it and had:
{
  "hits": [],
  "offset": 0,
  "limit": 20,
  "nbHits": 0,
  "exhaustiveNbHits": false,
  "processingTimeMs": 1,
  "query": "he",
  "facetsDistribution": {
    "gender": {
      "male": 0,
      "female": 0
    }
  },
  "exhaustiveFacetsCount": true
}

I tried with postman (curl) and a ruby script, and I got the same issue as I described.
Here is the script:
require 'meilisearch'
client = MeiliSearch::Client.new('http://<IP_ADDRESS>:7700', 'masterKey')
index = client.index('indexUID')
documents = [
  { "id": 2,    "title": "Pride and Prejudice",                    "author": "Jane Austin",              "genre": "romance" },
  { "id": 456,  "title": "Le Petit Prince",                        "author": "Antoine de Saint-Exupéry", "genre": "adventure" },
  { "id": 1,    "title": "Alice In Wonderland",                    "author": "Lewis Carroll",            "genre": "fantasy" },
  { "id": 1344, "title": "The Hobbit",                             "author": "J. R. R. Tolkien",         "genre": "fantasy" },
  { "id": 4,    "title": "Harry Potter and the Half-Blood Prince", "author": "J. K. Rowling",            "genre": "fantasy" },
  { "id": 42,   "title": "The Hitchhiker's Guide to the Galaxy",   "author": "Douglas Adams" }
]
index.add_documents(documents)
index.update_attributes_for_faceting(['genre'])
sleep(1)
index.search('', "facetsDistribution": ["genre"])
index.delete_all_documents
sleep(2)
index.search('', "facetsDistribution": ["genre"])

Here are the logs:
$ docker run -it --rm  -p 7700:7700 getmeili/meilisearch:v0.16.0 ./meilisearch --no-analytics=true --master-key=masterKey

888b     d888          d8b 888 d8b  .d8888b.                                    888
8888b   d8888          Y8P 888 Y8P d88P  Y88b                                   888
88888b.d88888              888     Y88b.                                        888
888Y88888P888  .d88b.  888 888 888  "Y888b.    .d88b.   8888b.  888d888 .d8888b 88888b.
888 Y888P 888 d8P  Y8b 888 888 888     "Y88b. d8P  Y8b     "88b 888P"  d88P"    888 "88b
888  Y8P<PHONE_NUMBER>8 888 888 888       "888 88888888 .d888888 888    888      888  888
888   "   888 Y8b.     888 888 888 Y88b  d88P Y8b.     888  888 888    Y88b.    888  888
888       888  "Y8888  888 888 888  "Y8888P"   "Y8888  "Y888888 888     "Y8888P 888  888

Database path:		"./data.ms"
Server listening on:	"<IP_ADDRESS>:7700"
Environment:		"development"
Commit SHA:		"UNKNOWN"
Build date:		"2020-11-04T10:33:03.094149336+00:00"
Package version:	"0.16.0"
Sentry DSN<EMAIL_ADDRESS>Amplitude Analytics:	"Disabled"

A Master Key has been set. Requests to MeiliSearch won't be authorized unless you provide an authentication key.

Documentation:		https://docs.meilisearch.com
Source code:		https://github.com/meilisearch/meilisearch
Contact:		https://docs.meilisearch.com/resources/contact.html or<EMAIL_ADDRESS>
[2020-11-19T09:32:51Z INFO  actix_server::builder] Starting 6 workers
[2020-11-19T09:32:51Z INFO  actix_server::builder] Starting "actix-web-service-<IP_ADDRESS>:7700" service on <IP_ADDRESS>:7700
[2020-11-19T09:33:40Z INFO  actix_web::middleware::logger] <IP_ADDRESS>:48294 "POST /indexes/indexUID/documents HTTP/1.1" 202 14 "-" "Ruby" 0.023282
[2020-11-19T09:33:40Z INFO  actix_web::middleware::logger] <IP_ADDRESS>:48298 "POST /indexes/indexUID/settings/attributes-for-faceting HTTP/1.1" 202 14 "-" "Ruby" 0.003218
[2020-11-19T09:33:41Z INFO  actix_web::middleware::logger] <IP_ADDRESS>:48302 "POST /indexes/indexUID/search HTTP/1.1" 200 718 "-" "Ruby" 0.001300
[2020-11-19T09:33:41Z INFO  actix_web::middleware::logger] <IP_ADDRESS>:48306 "DELETE /indexes/indexUID/documents HTTP/1.1" 202 14 "-" "Ruby" 0.002840
[2020-11-19T09:33:43Z ERROR actix_http::response] Internal Server Error: ResponseError { inner: Internal("Impossible to retrieve the document; Corrupted data") }
[2020-11-19T09:33:43Z INFO  actix_web::middleware::logger] <IP_ADDRESS>:48310 "POST /indexes/indexUID/search HTTP/1.1" 500 176 "-" "Ruby" 0.001546

You have a master key set, I will try with it

@LegendreM, I don't do a "he" query, but you do

that's it @curquiza, placeholder search + facetDistribution on no more existing documents containing the selected facet.

I found the big, working on it now


Copy to clipboard?

Is there an option to copy the link to clipboard? If not - would be good and useful to implement it :)

Could use something like https://github.com/ryangjchandler/alpine-clipboard but seems overkill to add something like this to this package.

I agree with @faustbrian. Closing the issue.


Materials are difficult to navigate

All materials are imported with uninspiring names.
This issue is to discuss how we could approach this, giving unique, meaningful names to imported materials.

Materials, and objects as well...
About objects.
As-is:

we are creating a "collection" for each imported .vox file linking each voxel/cube to it
collection name = the filename
object names = "Cube.###" using a sequence number (it is automatically handled by Blender)
when join_voxels is True, we could set the name of the single object as the collection itself

It could be (I mean implementing scene-graph i.e. a set of "models"):

collection name as-is
use the "model" name read in nSHP chunk (for example "model name" + "Cube.###", or just "model name" without "Cube") BUT in MagicaVoxels names are not unique (we could add the node-ID read in the chunk)
when joining voxels to single object, we could just use the "model name" in nSHP

About materials.

explain the material type (emit, metal, glass...)?
"link" material name to object names?


useradd not accepting password

When i'm manually install ghost and switch user and type ghost install i can not paste or type my root password for the adduser command. I like to paste the password because it's very long and random. But i tried typing it 3 times as well.
Running sudo command: useradd --system --user-group ghost
? Password [hidden]
? Password [hidden]
? Password [hidden]
✖ Setting up "ghost" system user
An error occurred.
Message: 'Command failed: /bin/sh -c sudo -S -p '#node-sudo-passwd#'  useradd --system --user-group ghost
#node-sudo-passwd#Sorry, try again.
#node-sudo-passwd#Sorry, try again.
#node-sudo-passwd#sudo: 3 incorrect password attempts

'

Debug Information:
    OS: Ubuntu, v16.04
    Node Version: v8.11.1
    Ghost-CLI Version: 1.7.3
    Environment: production
    Command: 'ghost install'

Additional log info available in: /home/ghostserver/.ghost/logs/ghost-cli-debug-2018-05-13T20_41_38_966Z.log

Maybe try to reproduce it with the same shell.
Host: ubuntu 16.04, zsh, oh-my-zsh
Client (ssh): ubuntu 16.04, zsh, oh-my-zsh, terminator (not gnome terminal)
I think reproducing on macOS is not sufficient

It still don't think it's an issue with the Ghost-CLI 😉. Why do you think it should be? Can you copy into other CLIs?

When i have the same host and client system with the same software i can copy/paste the root SSH password when i login with SSH. This is how i know the password is good and my terminal and clipboard is good too. After i am logged in i switch user to ghostserver and run ghost install during the installer my password does not work (i tried typing 3 times and pasting several times).
After i'm logged with ssh i can copy and paste my password into the shell prompt. That doesn't explain why it doesn't work when i type my password though. It's possible i made a mistake with typing, but i tried to do it carefully 3 times so i don't think i made a mistake.


(must have) Modify progress bar so it reflects the length of the quiz questions

Currently, you have 15 quiz questions but the progress bar still says 10. It also now extends past the screen after the 11th question, which should be fixed

Who it is fixed?

Yep! All fixed now


SciView.requestPropEditorRefresh() ain't working

		//grab a sciview from somewhere...
		SciView sv = sciView;

		//show node inspector (why it does not have a param to tell the desired state?)
		sv.mainWindow.toggleSidebar();

		Node n1 = new Node("level 1");
		sv.addNode(n1); //NB: sciview API, not avail for Node, shows up in the inspector

		Node n2 = new Node("level 2");
		n1.addChild(n2); //NB: scenery API, avail for every Node, also shows up in the inspector

		n2.addChild(new Node("level 3")); //shows up...
		// Nodes have no problem to appear

		//add leaves, esp. anything but pure Node instances...
		sv.addNode(new Box(new Vector3f(1),false));  //shows up, sciview API
		final Box box = new Box(new Vector3f(1),false);
		n1.addChild(box);                                              //nope... (scenery API)
		n2.addChild(new Box(new Vector3f(1),false));  //nope...

		//NB: requestPropEditorRefresh(...); triggers NodeChangedEvent(...) event
		//sv.requestPropEditorRefresh(n1); //does NOT show the leaves in the inspector
		sv.requestPropEditorRefresh(box);  //does NOT show the leaves in the inspector
		//events.publish(new NodeAddedEvent(box));  //does show all
		//events.publish(new NodeAddedEvent(n1));   //does NOT show all
		//events.publish(new NodeChangedEvent(n1)); //does NOT show all, same as sv.requestPropEditorRefresh(n1);
		//sv.mainWindow.rebuildSceneTree(); //does show all

		//Events seems to be effective only they match their contract:, that is, as follows:
		//  NodeChangedEvent works on node that has changed where adding children does not count as "changed"
		//  NodeChangedEvent does not enforce adding new node into the Inspector
		//  NodeAddedEvent works on a node that was indeed added recently, shows it in the Inspector
		//  NodeAddedEvent does nothing on previously shown node

I propose to modify requestPropEditorRefresh() to just call the rebuildSceneTree() unless we have something less brutal (like locally updating the tree rather than rebuilding it (from scratch?); or it could trigger two events (Add & Changed)...
Events work but need to be used exactly (must match the purpose and the correct object). Intention why a user calls requestPropEditorRefresh() is not clear because of its name, this excludes Events to be under the hood.

One concern about using rebuildSceneTree() is that it would cause something like https://github.com/scenerygraphics/sciview/issues/480 (which already happens, heh).


Add support for HTTPAuth::BasicAuth in prometheus_exporter

Adds support for basic authentication in the prometheus_exporter CLI application.

When given a htpasswd filename via the --auth command line argument, the server will use this file to authenticate any requests to the /metrics endpoint.
Optionally, a custom REALM may be provided via the --realm argument. The default REALM is "Prometheus Exporter"

Note: the htpasswd file must be created beforehand and, due to limitations in WEBrick, only crypt is supported.

A very nice PR! thank you. I love that you cleaned up stuff as you went.
I think the only big missing thing here is documentation in the README, can you add that?

Thanks! failure looks unrelated, change looks good to me! thanks heaps.


Allow for more type checking in the for-in statement

If the definition of the for-in statement were re-written to be

T n0 = e.iterator;
while (n0.moveNext()) {
   finalConstVarOrType? id = n0.current;
   s
}
where 'T' is the static type of 'e.iterator'.

We would be able to detect when the type of 'n0.current' is not assignable to 'id'. See issue #18534 for background.

Any news on this?
Is the spec not allowed to be changed in a way that gives more warnings, but same unchecked behavior?
I think many people stumble on this, and think this has to do with the unsoundness of dart's type system (and not just a problem in the specification).

We do this now: https://github.com/dart-lang/sdk/issues/18534


IRQL_requires_max missing

_IRQL_requires_max_ is missing from a few methods. IRQL requirements for these functions are documented in the MSDN though.
WdfObjectAllocateContext should have _IRQL_requires_max_(DISPATCH_LEVEL) MSDN (and possibly _Must_inspect_result_)
WdfObjectReferenceActual should have _IRQL_requires_max_(DISPATCH_LEVEL) MSDN
WdfObjectDereferenceActual should have _IRQL_requires_max_(DISPATCH_LEVEL) MSDN
This list is non-exhaustive. If desired I can keep adding functions with missing declarations.

Thanks for bringing this to our attention. We are looking at this.
Note that the NTSTATUS does already has an implicit Must_inspect_result annotation.
Thanks

@pankajbharti I have not been able to find documentation or annotation about that NTSTATUS does already has an implicit Must_inspect_result annotation. Can you please let me where I can find this?

All API should have been properly annotated for IRQL requirement in latest header WDF version. If you fine anything missing, please report again.
Note the fix is not back ported to older version of WDF headers. That is, if you check v15 headers, they are still missing the IRQL annotation.


Needs an example

Please add a simple example of using send and receive or at least link to the samples, such as https://github.com/microsoft/BotBuilder-Samples/blob/master/samples/csharp_dotnetcore/01.console-echo/EchoBot.cs and https://github.com/microsoft/BotBuilder-Samples/blob/master/samples/csharp_dotnetcore/02.echo-bot/Bots/EchoBot.cs.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 055d8380-e33c-c31f-2ae0-7d4509472d1d
Version Independent ID: ce913ebc-0575-180b-a6f5-850b69e86723
Content: Send and receive text message - Bot Service
Content Source: articles/v4sdk/bot-builder-howto-send-messages.md
Service: bot-service
Sub-service: sdk
GitHub Login: @ivorb
Microsoft Alias: v-ivorb

The samples that you linked to are available through the templates for each language, so users can see them there or while checking out our samples.
I'm confused though, the simple example of send and receive messages is all the linked article is about. Could you elaborate on what you'd like to see?

The bot documentation is some of MS's worst. It assumes too much and explains to little. If you started on this page, which is super basic for a bot, there are no links to the samples. I didn't know they existed at the time. So I was looking at these two single lines of code and wondering, where are they supposed to go? What's the context? After much frustration, it seems quite obvious now, but I shouldn't need to jump from docs to samples to random blogs to understand how to write a simple bot.

My Javascript example for this tutorial:
const { ActivityHandler } = require('botbuilder');

class MyBot extends ActivityHandler {
    constructor(configuration) {
        super();

        this.onMembersAdded(async (context, next) => {
            const membersAdded = context.activity.membersAdded;
            for (let cnt = 0; cnt < membersAdded.length; ++cnt) {
                if (membersAdded[cnt].id !== context.activity.recipient.id) {
                    await context.sendActivity('Hello and welcome!');
                }
            }
            // By calling next() you ensure that the next BotHandler is run.
            await next();
        });

        this.onMessage(async (context, next) => {
            //Continue to normal text response
            var text = context.activity.text; //received text

            if (text === "Foo"){
                    await context.sendActivity('Bar');
            }
            else{
                await next();
            }
        });
    }
}

module.exports.MyBot = MyBot;

Added mention of the samples, where to find information on a basic bot, etc. Most users read through the first concept which provides this information, but for those who don't, this will serve as a worthwhile pointer to that content.
Update will be pushed live next week.


Occasional cron daemon email failed logrotate

docker-mailver: tvial/docker-mailserver:release-v6.1.0
I seem to be occasionally getting the follow email:
From<EMAIL_ADDRESS>subject: Cron <root@mail> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
Body:
/etc/cron.daily/logrotate:
pkill: pidfile not valid
Try `pkill --help' for more information.

Is there a logrotate inside the container? Isn't that redundant running in Docker?
Thanks

I‘ve got the same issue

Seems like a race condition on a process and its pid file...

Same problem here:
docker-mailver: tvial/docker-mailserver:latest (but we build our container a year ago.

This issue was closed due to one or more of the following reasons:

Age
Contributor inactivity
The issue seems to be resolved

If you think this happened by accident, or feel like this issue was not actually resolved, please feel free to re-open it. If there is an issue you could resolve in the meantime, please open a PR based on the current master branch so we can review it.


wrong TIs?

Hi,
I am aware this code might change but I wanted to point out that TIs might be wrong. Just if you want to double-check. I already downloaded the pipeline, so I am not sure if I can change this while running it (I'm not an advanced coder)
https://github.com/physimals/hcp-asl/blob/1ad5d2a3e986df2e4f042aba84158cfa189e802a/hcpasl/asl_correction.py#L52
Best,
-Cindy

oh, I think it makes sense if TIs are labelling time plus each PLD.
Nevermind,
Best,
-Cindy


rusty-psn-gui: fix build, cleanup

Description of changes
Failing Hydra build: https://hydra.nixos.org/build/218305203
Fix building of the GUI variant of rusty-psn as pointed out via https://github.com/NixOS/nixpkgs/issues/230712 : Missing dependencies.
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 230854 run on x86_64-linux 1

2 packages built:

rusty-psn
rusty-psn-gui

@RaitoBezarius would you also mind merging? :rocket:


stargazer compatibility for nice model output

Add stargazer support for pyfixest. Likely quite a bit of work, but potentially a quick win.

Super cool! I am almost having a hard time to keep up with you! 🚀😄 Pinging @asquidy here as he had asked for this feature =)


working with multi-cursor

Atom: 1.26.1
docblockr: 0.13.7
when using the multi-cursor and hitting the enter key the multi-cursor will be lost.

I have the same issue too. It's really annoying.


Improvement: Dragging a component

Hello, it would be interesting to have the opportunity to move an item (drag). The item would have the position of 'touch-end' which would allow me to move the item.

Hi,
This library is simple for some basic touch events only. It has no necessary to add too much functions on it. If you want to drag, maybe you need a professional drag-and-drop library for your use.


7 hnz clientserver reconnection issues

Closes #7

All commented prints may be uncommented for advanced debugging in case random connection issues are encountered again in the future.


fix: bump BCH fee multiplier to 2

Description
This may or may not have been working previously, but our current 1.5
fee multiplier for the 1000 sats per kb for BCH doesn't cut it
currently, and ends up with "send max", as well as amounts close to
"send max" in current develop/prod being wrong, thus the Tx building
failing at UTXO selection time.
This fixes it by using a 2* multiplier instead of 1.5 currently.
Pull Request Type

[x] :bug: Bug fix (Non-breaking Change: Fixes an issue)
[ ] :hammer_and_wrench: Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
[ ] :nail_care: New Feature (Breaking/Non-breaking Change)

Issue (if applicable)

closes #4872
Risk

This may be working currently, but this isn't a guaranteed long-term
solution - fees should be correctly estimated in unchained side.
Testing

It is possible to preview a max. BCH trade
When testing this diff against current prod, take prod's current's
(wrong) send max, and ensure prod's max amount properly triggers a
"Not enough BCH to cover gas" error

Engineering

^

Operations

^

Screenshots (if applicable)

Current dependencies on/for this PR:

develop

PR #4876   👈

This comment was auto-generated by Graphite.


Don't run CI pipeline on pull requests that change documentation only

Since the master branch is now protected, updates of the README and documentation have to be performed via pull requests, too. In order to avoid wasting resources, I suggest that the CI pipeline no longer runs on pull requests that modify only the README or other Markdown files only. I've modified the GitHub actions workflow configuration file such that the same rules that applied to pushes before now apply to pull requests as well.

Another interesting observation: Even if the CI pipeline ran for a commit on a push event already, it apparently runs on a pull request again (see above :sweat_smile:). @ichistmeinname do you think, that I should disable the CI pipeline on push events entirely?

Since all checks (i.e. the pipeline) were running for this pull request already, I guess that we can then disable to rerun them when the request merged. @nbun Do you agree?


How to improve the ranking rate?

Hi All,
I trained the network using blow data,
11032	4153892,65002142:3462821,63988456:2213877,64982398:2213877,65009021:2213877,65272075:4040029,65002223:...
Note: 11032 is user_id, 4153892 is sku_no, 65002142 is order_no
but got very low ranking rate, could you have any suggestions?
11032	4431085,0.014:3970704,0.014:4231712,0.013:3941914,0.013:4093510,0.012:4074152,0.012:4431424,0.012:4258254,0.012:3968476,0.011:3968475,0.011:
Thanks

More details?

About the Layer:
"Layers" : [         { "Name" : "Input", "Kind" : "Input", "N" : "auto", "DataSet" : "gl_input", "Sparse" : true },          { "Name" : "Hidden", "Kind" : "Hidden", "Type" : "FullyConnected", "N" : 128, "Activation" : "Sigmoid", "Sparse" : true },         { "Name" : "Output", "Kind" : "Output", "Type" : "FullyConnected", "DataSet" : "gl_output", "N" : "auto", "Activation" : "Sigmoid", "Sparse" : true }     ],
Abount commands:
generateNetCDF -d gl_input -i dss_cpo_sku -o gl_input.nc -f features_input -s samples_input -c generateNetCDF -d gl_output -i dss_cpo_sku -o gl_output.nc -f features_output -s samples_input -c train -c config.json -i gl_input.nc -o gl_output.nc -n gl.nc -b 128 -e 10 predict -b 128 -d gl -i features_input -o features_output -k 10 -n gl.nc -f dss_cpo_sku -s recs -r dss_cpo_sku
About data: Number of samples is more than 16000.

Have you tried any other sorts of classifiers with it?  What's the # of classes?  And what's the average # of data points per sample?

Also take a look at the two networks I posted to issue 24.  They both seem to get better than state of the art perf on MovieLens 20M.

Thanks for your suggestions!
Use the below configuration works fine.
`"Denoising" : {
"p" : 0.4
},
"ScaledMarginalCrossEntropy" : {
	"oneTarget" : 1.0,
	"zeroTarget" : 0.0,
	"oneScale" : 30.0,
	"zeroScale" : 1.0
},
"Layers" : [
	{ "Name" : "Input0", "Kind" : "Input", "N" : "auto", "DataSet" : "gl_input", "Sparse" : true },
	{ "Name" : "Hidden", "Kind" : "Hidden", "Type" : "FullyConnected", "Source" : [ "Input0" ], "N" : 256, "Activation" : "Sigmoid", "Sparse" : true },
	{ "Name" : "Output", "Kind" : "Output", "Type" : "FullyConnected", "Source" : [ "Hidden" ], "DataSet" : "gl_output", "N" : "auto", "Activation" : "Sigmoid", "Sparse" : true }
],

"ErrorFunction" : "ScaledMarginalCrossEntropy"`