[Wrapped Error] "codeceptjs is not defined"

What are you trying to achieve?
Trying to test login feature in my application.
What do you get instead?
Getting error "codeceptjs is not defined" on any step after form submitting and redirect.

Provide console output if related. Use --verbose mode for more details.

Landing --
 Login
 * I am on page "/"
 * I click "Login"
 * I fill field "Email"<EMAIL_ADDRESS> * I fill field "Password", "testpassword"
 * I click "Login"
 * I see "Logout"
 ? FAILED in 14200ms

-- FAILURES:

  1) Landing: Login:
     [Wrapped Error] "codeceptjs is not defined"

Click on "Login" submits form and then redirect to another page occurs.

Provide test source code if related

Scenario('Login', (I) => {
    I.amOnPage('/');
    I.click('Login');
    I.fillField('Email', 'test@email.com');
    I.fillField('Password', 'testpassword');
    I.click('Login');
    I.see('Logout');
});

Details

CodeceptJS version: 0.4.16
NodeJS Version: 6.9.1
Operating System: Windows 7 x64 Professional
Nightmare version: 2.9.1
Configuration file:

{
  "tests": "./*_test.js",
  "timeout": 10000,
  "output": "./output",
  "helpers": {
    "Nightmare": {
      "url": "https://testwebsite",
      "windowSize":  "1920x1080"
    }
  },
  "include": {
    "I": "./steps_file.js"
  },
  "bootstrap": false,
  "mocha": {},
  "name": "Tests.Acceptance"
}

Important fact is that form submitted asynchronously.

Thanks, to work on this issue I need to see detailed output. Please could you run tests with --verbose flag (as it is asked in issue description template)

--verbose not very informative except maybe this stacktrace:
  Error: [Wrapped Error] "codeceptjs is not defined"
      at promise.catch (C:\Users\UserName\AppData\Roaming\npm\node_modules\codeceptjs\lib\recorder.js:82:15)
      at process._tickCallback (internal/process/next_tick.js:103:7)

I'm getting the same issue using the NightmareJS helper.
What seems to be happening is when you;
I.click('Login');
I.see('Logout');
There's a navigation step that is happening between the click and the logout.
On line 192 of codeceptjs/lib/helper/Nightmare.js, we have the line:
this.browser.on('dom-ready', () => this._injectClientScripts());
Which injects the contents of codeceptjs/lib/helper/clientscripts/nightmare.js into the browser.
That clientscript is where codeceptjs is being defined when you use functions like:
I.see(x);
I.waitForText(x);
Unfortunately, when the browser navigates from one page to another, this clientscript needs to be re-injected before any other code that tries to access codeceptjs. When codecept executes the next "I.see()", it will usually execute before the "on(dom-ready)" inject method gets fired.
See badly formatted debug log below where I've added a 		this.debug("Injecting clientscripts/nightmare.js"); in the _injectClientScripts() function of Nightmare.js
=====================================
`
• I fill field "username", "user"
Emitted | step.start (I fill field "password", "12345")
• I fill field "password", "12345"
Emitted | step.start (I click "//button[@type="submit"]")
• I click "//button[@type="submit"]"
Emitted | step.start (I wait for text "Logged in")
• I wait for text "Logged in"

Injecting clientscripts/nightmare.js
[2] Error | codeceptjs is not defined
[2] Starting  session
Emitted | test.failed ([object Object])
[2]  Queued | hook Nightmare._failed()
[2]  Queued | () => done(err)
[2]  Stopping recording promises
Screenshot is saving to /home/vagrant/displaysweet/Projects/testproj/test/output/Attempt_to_log_in.failed.png
[2]  Starting  session
✖ FAILED in 8571ms

Emitted | test.after
[2]  Queued | hook Nightmare._after()
[3] Starting recording promises
Emitted | suite.after
[3] Queued | hook Nightmare._afterSuite()
-- FAILURES:

Basic functionality works:
[Wrapped Error] "codeceptjs is not defined"
`

Yes, using I.wait(x) is a workaround. But I need to insert it after all async form submit. Not very elegant.
It seems like in my case scripts reinjected after ASP.NET async postback in UpdatePanel control.

The I.wait(x) workaround is really is nearly as bad as the original issue.  You're just introducing the very strong possibility that your test fails every nth run unless you use some obscenely long wait time, which then of course unnecessarily lengthens the run time of every test that uses this particular wait step.
After looking at this for a bit, I discovered a much more elegant workaround.  This is working as of 0.5.1 (unknown, not tested on earlier versions).  The solution is to create a custom helper with a _beforeStep hook.
waitfix_helper.js
'use strict';

class Waitfix extends Helper {

  _beforeStep(step) {
    let browser = this.helpers['Nightmare'].browser;
    if ( step.name === 'waitForElement' ){
      return browser.wait(step.args[0]);
    }
  }

}

module.exports = Waitfix;

The if ( step.name === 'waitForElement' ){ condition can be jigged to meet your needs / be more sophisticated and targeted.  This example simply determines if the step is the one affected by looking at it's name.
browser accesses the NightmareJS instance, with access to it's native commands.  Passing in the step data _beforeStep(step) allows us to access the current step's arguments, which in the case of waitForElement should be a selector.  This value is then passed into the native Nightmare wait command.  Replacing the native command as a handler for this exception seems to work without introducing arbitrary bugs or unnecessary testing overhead.  Warning: However, a potential issue here is that Nightmare does not allow the use of Xpath's, so a more complete solution would somehow convert xpath's into CSS selectors.

Hello @bryanmc,
I just ran into the same issue when I saw your comment here.
Unfortunately, this:
Feature('Basket');

Scenario('Add item and go to basket', (I) => {
  // ...
  I.click('#toBasket')
  I.waitForElement('#popup')
  I.seeElement('#popup')
});

still results in  [Wrapped Error] "codeceptjs is not defined".
Is there anything else to do than register the helper using codeceptjs gh that I am missing here?

Hi. I am also seeing the same issue and @bryanmc 's fix isn't working consistently for me (it does improve things but there is then an unreliability in the tests, which fail about 20% of the time). I end up having to introduce a wait, which is not something I want to take forward. For the time being I have gone back to using the WebDriverIO helper which is reliable in all cases.
Given the fact that this seems to be a NIghtmare only issue, would it be worth directing our attention at a fix for Nightmare itself rather than a change to Codecept? Does anyone have any ideas where to look in the Nightmare codebase?

+1

Can anybody provide reproducible code and page, so we can test this on our side?

@APshenkin Hi. In my case it is a redirect after form submit. I'm temporary using I.wait(x) but assume that it is not right way of doing things.

@m1x0n Can you please provide more details? Also logs in verbose mode will be helpful

@APshenkin This is what I have so far:
Admin Login Test --
   [1] Starting recording promises
   Emitted | suite.before ([object Object])
   [1] Queued | hook Nightmare._beforeSuite()
 As an admin I can login to Admin UI and logout back
   Emitted | test.before
   [1] Queued | hook Nightmare._before()
   Emitted | test.start ([object Object])
   Emitted | step.before (I am on page "/")
   [1] Queued | amOnPage: "/"
   Emitted | step.after (I am on page "/")
   [1] Queued | step passed
   [1] Queued | return result
   Emitted | step.before (I see "Login")
   [1] Queued | see: "Login"
   Emitted | step.after (I see "Login")
   [1] Queued | step passed
   [1] Queued | return result
   Emitted | step.before (I fill field "[name="admin[email]"]"<EMAIL_ADDRESS>   [1] Queued | fillField: "[name="admin[email]"]"<EMAIL_ADDRESS>   Emitted | step.after (I fill field "[name="admin[email]"]"<EMAIL_ADDRESS>   [1] Queued | step passed
   [1] Queued | return result
   Emitted | step.before (I fill field "[name="admin[password]"]", "123456")
   [1] Queued | fillField: "[name="admin[password]"]", "123456"
   Emitted | step.after (I fill field "[name="admin[password]"]", "123456")
   [1] Queued | step passed
   [1] Queued | return result
   Emitted | step.before (I click "button[type=submit]")
   [1] Queued | click: "button[type=submit]"
   Emitted | step.after (I click "button[type=submit]")
   [1] Queued | step passed
   [1] Queued | return result
   Emitted | step.before (I wait for element "a[href="/admin/logout"]", 5)
   [1] Queued | waitForElement: "a[href="/admin/logout"]", 5
   Emitted | step.after (I wait for element "a[href="/admin/logout"]", 5)
   [1] Queued | step passed
   [1] Queued | return result
   Emitted | step.before (I click "a[href="/admin/logout"]")
   [1] Queued | click: "a[href="/admin/logout"]"
   Emitted | step.after (I click "a[href="/admin/logout"]")
   [1] Queued | step passed
   [1] Queued | return result
   Emitted | step.before (I wait 5)
   [1] Queued | wait: 5
   Emitted | step.after (I wait 5)
   [1] Queued | step passed
   [1] Queued | return result
   Emitted | step.before (I see element "form[action="/admin/login"]")
   [1] Queued | seeElement: "form[action="/admin/login"]"
   Emitted | step.after (I see element "form[action="/admin/login"]")
   [1] Queued | step passed
   [1] Queued | return result
   [1] Queued | fire test.passed
   [1] Queued | finish test
   Emitted | step.start (I am on page "/")
 • I am on page "/"
 > [URL] http://localhost:3000/
 > [Code] 200
 > [Headers] {"cache-control":["no-store, no-cache, must-revalidate","no-cache"],"connection":["close"],"content-type":["text/html; charset=UTF-8"],"date":["Tue, 25 Jul 2017 13:28:08 GMT"],"expires":["Thu, 19 Nov 1981 08:52:00 GMT"],"host":["localhost:3000"],"pragma":["no-cache"],"set-cookie":["PHPSESSID=djp3g03rd1hv18mubf6llss076; path=/"],"x-powered-by":["PHP/7.0.8-2+deb.sury.org~xenial+1"]}
   Emitted | step.passed (I am on page "/")
   Step finished in 1.239 sec
   Emitted | step.start (I see "Login")
 • I see "Login"
   Emitted | step.passed (I see "Login")
   Step finished in 0.012 sec
   Emitted | step.start (I fill field "[name="admin[email]"]"<EMAIL_ADDRESS> • I fill field "[name="admin[email]"]"<EMAIL_ADDRESS>   Emitted | step.passed (I fill field "[name="admin[email]"]"<EMAIL_ADDRESS>   Step finished in 0.829 sec
   Emitted | step.start (I fill field "[name="admin[password]"]", "123456")
 • I fill field "[name="admin[password]"]", "123456"
   Emitted | step.passed (I fill field "[name="admin[password]"]", "123456")
   Step finished in 0.322 sec
   Emitted | step.start (I click "button[type=submit]")
 • I click "button[type=submit]"
   Emitted | step.passed (I click "button[type=submit]")
   Step finished in 0.524 sec
   Emitted | step.start (I wait for element "a[href="/admin/logout"]", 5)
 • I wait for element "a[href="/admin/logout"]", 5
   [1] Error | codeceptjs is not defined
   Emitted | step.failed (I wait for element "a[href="/admin/logout"]", 5)
   Step finished in 1.374 sec
   [1] Error | Error: [Wrapped Error] "codeceptjs is not defined"
   Emitted | step.failed (I click "a[href="/admin/logout"]")
   Step finished in NaN sec
   [1] Error | Error: [Wrapped Error] "codeceptjs is not defined"
   Emitted | step.failed (I wait 5)
   Step finished in NaN sec
   [1] Error | Error: [Wrapped Error] "codeceptjs is not defined"
   Emitted | step.failed (I see element "form[action="/admin/login"]")
   Step finished in NaN sec
   [1] Error | Error: [Wrapped Error] "codeceptjs is not defined"
   [1] Starting <teardown> session
   Emitted | test.failed ([object Object])
   [1] <teardown> Queued | hook Nightmare._failed()
   [1] <teardown> Queued | () => done(err)
   [1] <teardown> Stopping recording promises
 > Screenshot is saving to /home/vagrant/dynamicres/admin-ui/tests/e2e/output/As_an_admin_I_can_login_to_Admin_UI_and_logout_back.failed.png
 ✖ FAILED in 5130ms

   [2] Starting recording promises
   Emitted | test.after
   [2] Queued | hook Nightmare._after()
   Emitted | suite.after ([object Object])
   [2] Queued | hook Nightmare._afterSuite()

-- FAILURES:

  1) Admin Login Test: As an admin I can login to Admin UI and logout back:
     [Wrapped Error] "codeceptjs is not defined"

  Scenario Steps:

  - I.seeElement("form[action="/admin/login"]") at Object.logout (tests/e2e/pages/DashboardPage.js:17:11)
  - I.wait(5) at Object.logout (tests/e2e/pages/DashboardPage.js:16:11)
  - I.click("a[href="/admin/logout"]") at Object.logout (tests/e2e/pages/DashboardPage.js:15:11)
  - I.waitForElement("a[href="/admin/logout"]", 5) at Object.loginWithDefaultCredentials (tests/e2e/pages/LoginPage.js:34:11)
  - I.click("button[type=submit]") at Object.login (tests/e2e/pages/LoginPage.js:28:11)
  - I.fillField("[name="admin[password]"]", "123456") at Object.login (tests/e2e/pages/LoginPage.js:27:11)
  - I.fillField("[name="admin[email]"]"<EMAIL_ADDRESS>at Object.login (tests/e2e/pages/LoginPage.js:26:11)
  - I.see("Login") at Object.visit (tests/e2e/pages/LoginPage.js:22:11)
  - I.amOnPage("/") at Object.visit (tests/e2e/pages/LoginPage.js:21:11)

  Error: [Wrapped Error] "codeceptjs is not defined"
      at promise.catch (node_modules/codeceptjs/lib/recorder.js:134:15)
      at process._tickCallback (internal/process/next_tick.js:109:7)

  FAIL  | 0 passed, 1 failed   // 5s
   Emitted | global.result ([object Object])
   [2] Queued | hook Nightmare._finishTest()

I haven't investigate it properly but it might be somehow related to: http://codecept.io/helpers/Nightmare/#executeasyncscript.

+1

@m1x0n Could you please provide test code also?

Found the reason of issue, will try to fix it

@APshenkin Glad to know you sorted it out.

@m1x0n @lexds1591
Let's test a fix in branch nightmare-reinject to be sure that problem was solved. Can you please install codeceptjs from the branch and check if your issues were solved?

@APshenkin I managed to test with nightmare-reinject branch. Unfortunately It doesn't work for my case.
The stack trace it generated this time:
Scenario Steps:

  - I.waitForElement("a[href="/admin/logout"]", 5) at Object.loginWithDefaultCredentials (tests/e2e/pages/LoginPage.js:35:11)
  - I.click("button[type=submit]") at Object.login (tests/e2e/pages/LoginPage.js:28:11)
  - I.fillField("[name="admin[password]"]", "123456") at Object.login (tests/e2e/pages/LoginPage.js:27:11)
  - I.fillField("[name="admin[email]"]"<EMAIL_ADDRESS>at Object.login (tests/e2e/pages/LoginPage.js:26:11)
  - I.see("Login") at Object.visit (tests/e2e/pages/LoginPage.js:22:11)
  - I.amOnPage("/") at Object.visit (tests/e2e/pages/LoginPage.js:21:11)

  TypeError: Cannot read property 'indexOf' of undefined
      at browser.wait.catch (node_modules/codeceptjs/lib/helper/Nightmare.js:864:22)
      at process._tickCallback (internal/process/next_tick.js:109:7)

I debugged it a bit. The error is message is outside err.message it is just inside err object. The actual error it generated is Error: [Wrapped Error] "Cannot read property 'findElement' of undefined" from recorder.js.

@m1x0n Is your site public? Can I test this by myself?

@APshenkin No. I think it could be replicated it by laravel app with basic auth. https://laravel.com/docs/5.4/authentication.

@m1x0n Unfortunately, I can't reproduce this issue locally. I tried it on this website, but it works ok for me http://laravel-tricks.com/. BTW, I did several changes, so can I ask you to try it again with latest changes in nightmare-reinject branch?


Update to Bootstrap 4

Update templates from Bootstrap 3 to use Bootstrap 4.

Great idea - do you want to work on it?

No, but here is some migration documentation:
https://getbootstrap.com/docs/4.1/migration/
Any work would be done in the IdentityServer4.Quickstart.UI project or the IdentityServer4.Templates or both?

I think you misunderstood the OSS thing then.

I would be happy to contribute. Should I open a new issue and then send in a PR once it's complete or how does this team prefer to do it?

yea, PR is fine. you will have to update the main css, but IIRC it's in less, so that's the preferred styling language for the host. if you plan to make it too different looking, then maybe show us a screen shot first.

Ok. I'll try to keep to the accepted styling. How far back are we wanting to support Browserwise?
If >= IE10 we could implement the new Bootstrap 4 flex options that would make it super responsive and bring it up to date with modern CSS3 practices.
Also, is there a reason to stick with LESS? SASS has replaced LESS in Bootstrap4 as the preferred precompiler and from what I can see so far there wouldn't be much in way of syntax that would need to change if we stuck with a .scss format.

I'm fine with IE11. Also, please send the PR to the host folder -- we take that and then merge it into the QS repo. IOW, don't do the PR there, please. Thx


Help: How to save layer as transparent PNG?

Very nice work on this library 👍
Your test creates bitmap files out of the layers, could I ask how you would go about saving a (transparent) PNG file instead?
I managed to convert a BMP MemoryStream to save as a PNG, but the transparency is lost in the saved PNG file...
Thanks!

I have modified the code to save in PNG format.
Please try this code.
https://github.com/manju-summoner/PsdParser/blob/ab02e501c4d09a94793a3ed654e507bacbd1e8fe/PsdParser.Test/PsdFileTest.cs#L59-L66

Perfect, much appreciated 👌


/api/generate hangs after about 100 requests

Tested this issue and hang still occurs. This time fast (5mins from test).
Tests: https://github.com/ollama/ollama-python/pull/75


Merge Giraffe with Suave

First of all this issue is only an attempt to move this Twitter thread into a more organised forum which makes it easier to discuss & brainstorm a potential merge of Giraffe with Suave. There are no current plans of merging Giraffe with Suave as of today and this issue should not worry any Suave or Giraffe users!
Ok, now that I got this out of the way l'd like to start this conversation by saying that I am generally very open in merging efforts in every possible way. Having said that I also acknowledge that there are some fundamental differences between Suave and Giraffe (hence why Giraffe was born) and I think it is crucial to get a common ground on these differences and a shared vision before even discussing any technical details on how to achieve such a merge.
One of the main differences between Giraffe and Suave is that Giraffe's fundamental vision, as often stated, is to tightly integrate with ASP.NET Core. It was born to fill the niche where functional .NET devs wanted to build a functional ASP.NET Core web application. Giraffe tries to fill this specific niche by providing a thin layer on top of ASP.NET Core, but keeping the core building blocks of ASP.NET Core alive (DI, HttpRequest, HttpResponse, Config, etc.). This is a very important aspect from my point of view, because I personally believe that this enables F# developers to use a lot of the already existing (and future upcoming) ASP.NET Core ecosystem which is done by the community (F# as well as C# open source projects and MS projects). A good example is Identity, EF, various error reporting or logging frameworks and so on.
This tight integration also made the maintenance of Giraffe fairly trouble free. There was very little critical issues raised so far and very little feature requests which couldn't be implemented with little efforts, because all the heavy work - features like security, logging, web server capabilities, development and debug features, etc. - were already solved for ASP.NET Core by other people and therefore accessible in Giraffe without any additional effort from my side. This is a huge win for me and the community IMHO.
I think all the other benefits which I might have blogged or talked about are sort of inherited from this one single feature. I think it is possible to find a way to make it work with Suave (e.g. Suave could have a dependency on ASP.NET Cores HttpAbstractions), but before going too much into detail I'd be interested to hear @haf and @ademar view points and vision for Suave to see how it fits with Giraffe.
Of course everyone else is welcome to chip in and provide your ideas/views/thoughts on this topic.

@dustinmoris thanks for explaining - to people like me who aren't heavily using either, it's very helpful to have that articulation of Giraffe's raison d'être

Now that Asp.Net Core exists, does it still makes sense for Suave to use its own server implementation? Maybe it is a naive question, but I'm fairly unaware of the Dotnet Core ecosystem.
Maybe the solution would be to have a common functional API layer built upon multiple server implementation layers (.Net Core, custom server, etc.)

is the idea to make work Suave with ASP.Net?

@josselinauguste I think a lot of applications still use the simple own server implementation eg Ionide & FSCS, to allow simple micro server instances to be used as app api ... using full dotnet core, due to its heavy caching and pooling would take up a lot of memory in their basic cases, makes sense to keep for these use cases.
Suave currently already has a version built on top of kestrel but due to Giraffes thin middleware and use of Task Continuations over Suave Async Bindings, it performs 50% faster than Suave with Kestral, in line with c# MVC performance, and about 88x faster than Suave's basic server (thanks mostly to Kestral). To create a common functional API layer, Giraffe would have to go back to Async binding but in doing so loose 20% of its speed as it would run into the issues of :

Converting back and forth between Task & Async (additional scheduling)
Wrapping sync values in Async, just to fit in the pipeline (Giraffe never needs to wrap thanks to continuations)

In case anyone is unfamiliar with Giraffe, it's main composable function, comparable to Suave's Webpart is its HttpHandler but the signatures are different:
Suave WebPart (accepts HttpContext) =
type WebPart = HttpContext -> Async<HttpContext option>

Giraffe Httphandler (accepts both a continuation/nextFn & HttpContext)=
type HttpFunc = HttpContext -> Task<HttpContext option>
type HttpHandler = (HttpFunc -> HttpContext) -> Task<HttpContext option> // HttpFunc -> HttpFunc

@mrkaspa I think the idea is to discuss the feasibility of merging Giraffe (that uses ASP.net core) into Suave so that in the end Suave would have an ASP.Net core server option.

That would be good to have a solid web library for f# avoiding the ecosystem fragmentation

Merging would make it easier to push F# into organisations reluctant to try F#.

My thoughts are that they solve different problems. Suave is a standalone framework whereas Giraffe is a set of functional helpers that sit on top of a different framework. What's to merge?

IMO one of the best things about Suave its its standalone nature. Giraffe looks great and I can see places where my (C#) org would have an easier time adopting an F# webapp that plugs right into a familiar ASP.NET framework, but equally I've been able to roll out internal tools more easily with Suave because the configuration burden was lower.

Hi @dustinmoris
There is nothing to merge. The projects serve different purposes and niches.
Suave is first and foremost a stand alone web server. One of the things that has made Suave successful is the easiness of spawning a web server with minimal ceremony and no dependencies. Suave  also runs on Mono, Android and iOS.
I do not care about Kestrel and the ASP.NET stack and have nothing against Giraffe filling that space.
Cheers,

@ademar what I'd like to see is a common lib that shares most of the user accessible apis. Like a combinator library that works on both server implementations. Since one is using task and the other one is using async (and we don't have type classes) it may just be the names and two different implementations. I personally think that both projects and especially its users would benefit a lot from a shared documentation and something like an umbrella project. As already discussed both server technologies  have some advantages and it would be very good if we could somehow bring these worlds together.
So from my point of view a merge would be really really big win for the ecosystem. But that merge does not mean to be on a code level. I'm hoping we can create an umbrella and share docs + mindset.

It's the programming model that's key for me - things like the >=> operator, CHOOSE and whatnot. In a perfect world (IMHO) we'd have a common library to compose functions into routes in some abstract manner, which is then adapted into either ASP .NET or Suave's web server. There are many benefits to this approach, the biggest IMHO being documentation and ease of adoption - rather than two websites with two approaches to documenting this, two sets of learning material etc., it can all be compressed into one. Less work to maintain for the project owners, easier to learn for new users, and a bigger overall community - to me, a win-win situation. In addition, the set of combinators could (hopefully) grow more quickly and would guarantee consistency as well.
Of course, I'm sure that there will always be things that are unique to Suave or Giraffe - but that can be managed through a set of Suave-specific combinators that are e.g. a separate NuGet package.

@forki maybe that's the first step - perhaps a documented set of combinators that follow a consistent convention on some common site. Code-level "sharing" could initially be as simple as just having a consistent approach to namespacing, modules and function names.

Thanks for all the comments so far! I do respect the opinion of the community (hence why I created this issue), but I also respect the opinion of @ademar and if he's happy with the current situation then I'm afraid there's little purpose for me to push any further, as it would make things for me more difficult too.
In terms of shared docs and shared combinators I think it is a noble idea, but my pragmatic side tells me that it would probably add a lot more complication to the ease and speed of development of both frameworks in return of a very small reward, as I really don't think that it's very difficult to pick up the combinators of each framework.
For example, there is already a subtle but significant difference between Suave and Giraffe. If a combinator returns Some ctx in Suave then the next combinator will further process the HttpRequest, whereas in Giraffe this would end the pipeline and finish the request at this point. In Giraffe you'd have to invoke the next handler (similar to middleware) in order to further process the request. These differences already need to be picked up by anyone who wants to use either framework and it's very unlikely to go away.
Personally I see the biggest win through more collaboration by sending each other PRs with features/combinators or other improvements where we think the other framework could benefit from it. I wanted to contribute a lot more back to Suave and I actually started with a small PR not too long ago and I would like to do this more in the future if it is received well. I also want Suave to be great and I'd be happy to send multiple PRs whenever I have time and then let them decide if they like it or not. I wouldn't be uspet if ademar would reject 5 PRs in a row and then only accept one. It needs to make sense for Suave and their vision! :)
Anyways.. these are my two cents, but I'll let this thread go on for a bit longer and see if anyone else has some great ideas/thoughts on this topic or if opinions change.

@gerardtoconnor

I think a lot of applications still use the simple own server implementation eg Ionide & FSCS, to allow simple micro server instances to be used as app api ... using full dotnet core, due to its heavy caching and pooling would take up a lot of memory in their basic cases, makes sense to keep for these use cases.

This is interesting. Do you have any link on the subject?
@MattJOlson, @ademar

IMO one of the best things about Suave its its standalone nature. Giraffe looks great and I can see places where my (C#) org would have an easier time adopting an F# webapp that plugs right into a familiar ASP.NET framework, but equally I've been able to roll out internal tools more easily with Suave
because the configuration burden was lower.

Suave is first and foremost a stand alone web server. One of the things that has made Suave successful is the easiness of spawning a web server with minimal ceremony and no dependencies.

Isn't ASP.NET Core rather low-ceremony as well? Suave is mono myServer.exe, Core is dotnet run myServer.dll. I think that advantage is much reduced compared to previous ASP.NET implementations.

Suave also runs on Mono, Android and iOS.

This is a very good point. While both can run on Linux, I assume you're currently SOL if you want to run .NET Core on a mobile platform, right?

@piaste as mentioned in quote, Ionide (link) is the first example that comes to mind but are many more others. Ionide starts a local Suave server api backend that interfaces with command line FSCS, VSCode then works as a JS/Fable webapp that calls the Suave API.

Closing as there was nothing new since the last time.


Bump babelfishpg_tsql extension version to 1.3.0

This commit bumps up babelfishpg_tsql extension version to 1.3.0 and adds upgrade script for 1.2.1 to 1.3.0 upgrade path.
Signed-off-by: Harsh Lunagariya<EMAIL_ADDRESS>Check List

[x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Please update https://github.com/babelfish-for-postgresql/babelfish_extensions/blob/BABEL_1_5_STABLE/contrib/babelfishpg_tsql/src/babelfish_version.h


[Bug]: MistralTokenizer object has no attribute 'get_vocab'

Your current environment

The output of `python collect_env.py`
PyTorch version: 2.4.0+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.3 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.30.2
Libc version: glibc-2.35

Python version: 3.11.7 (main, Dec  8 2023, 18:56:58) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-5.14.21-150500.55.49-default-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: NVIDIA A100 80GB PCIe
Nvidia driver version: 535.104.12
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.0
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Address sizes:                      48 bits physical, 48 bits virtual
Byte Order:                         Little Endian
CPU(s):                             96
On-line CPU(s) list:                0-95
Vendor ID:                          AuthenticAMD
Model name:                         AMD EPYC 7F72 24-Core Processor
CPU family:                         23
Model:                              49
Thread(s) per core:                 2
Core(s) per socket:                 24
Socket(s):                          2
Stepping:                           0
BogoMIPS:                           6387.87
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip rdpid overflow_recov succor smca
L1d cache:                          1.5 MiB (48 instances)
L1i cache:                          1.5 MiB (48 instances)
L2 cache:                           24 MiB (48 instances)
L3 cache:                           384 MiB (24 instances)
NUMA node(s):                       4
NUMA node0 CPU(s):                  0-11,48-59
NUMA node1 CPU(s):                  12-23,60-71
NUMA node2 CPU(s):                  24-35,72-83
NUMA node3 CPU(s):                  36-47,84-95
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit:        Not affected
Vulnerability L1tf:                 Not affected
Vulnerability Mds:                  Not affected
Vulnerability Meltdown:             Not affected
Vulnerability Mmio stale data:      Not affected
Vulnerability Retbleed:             Vulnerable
Vulnerability Spec rstack overflow: Vulnerable
Vulnerability Spec store bypass:    Vulnerable
Vulnerability Spectre v1:           Vulnerable: __user pointer sanitization and usercopy barriers only; no swapgs barriers
Vulnerability Spectre v2:           Vulnerable, IBPB: disabled, STIBP: disabled, PBRSB-eIBRS: Not affected
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected

Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] nvidia-cublas-cu12==<IP_ADDRESS>
[pip3] nvidia-cuda-cupti-cu12==12.1.105
[pip3] nvidia-cuda-nvrtc-cu12==12.1.105
[pip3] nvidia-cuda-runtime-cu12==12.1.105
[pip3] nvidia-cudnn-cu12==<IP_ADDRESS>
[pip3] nvidia-cufft-cu12==<IP_ADDRESS>
[pip3] nvidia-curand-cu12==<IP_ADDRESS>
[pip3] nvidia-cusolver-cu12==<IP_ADDRESS>
[pip3] nvidia-cusparse-cu12==<IP_ADDRESS>
[pip3] nvidia-ml-py==12.560.30
[pip3] nvidia-nccl-cu12==2.20.5
[pip3] nvidia-nvjitlink-cu12==12.6.20
[pip3] nvidia-nvtx-cu12==12.1.105
[pip3] pyzmq==26.1.0
[pip3] torch==2.4.0
[pip3] torchvision==0.19.0
[pip3] transformers==4.44.0
[pip3] triton==3.0.0
[conda] Could not collect
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.6.0@32e7db25365415841ebc7c4215851743fbb1bad1
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0    NIC0    NIC1    NIC2    NIC3    CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      NODE    NODE    NODE    NODE    36-47,84-95     3               N/A
NIC0    NODE     X      PIX     PIX     PIX
NIC1    NODE    PIX      X      PIX     PIX
NIC2    NODE    PIX     PIX      X      PIX
NIC3    NODE    PIX     PIX     PIX      X

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

NIC Legend:

  NIC0: mlx5_0
  NIC1: mlx5_1
  NIC2: mlx5_2
  NIC3: mlx5_3

🐛 Describe the bug
I try to use guided_json or response_format in request via vLLM server with Mistral-Nemo-Instruct-2407 and --tokenizer-mode mistral but get an AttributeError : AttributeError: 'MistralTokenizer' object has no attribute 'get_vocab'
Launch the server :
vllm serve /path/to/model/Mistral-Nemo-Instruct-2407 --tokenizer-mode mistral --max-model-len 4096 --host <IP_ADDRESS> --port 6379

Request in python with response_format:
import requests

url = "http://<IP_ADDRESS>:6379"
endpoints = "/v1/completions"

data = {
  "prompt": "Describe Ada Lovelace. Your answer should be in form of a json with the keywords name, age, is_alive, height_in_meters, names_of_children.",
  "model": "Mistral-Nemo-Instruct-2407",
  "temperature": 0.0,
  "repetition_penalty": 1,
  "top_p": 0.8,
  "max_tokens": 150,
  "response_format": {
    "type": "json_object"
  }
}

response = requests.post(url+endpoints, json=data)
response.json()

Same with guided_json :
import requests

url = "http://<IP_ADDRESS>:6379"
endpoints = "/v1/completions"

data = {
  "prompt": "Describe Ada Lovelace.",
  "model": "Mistral-Nemo-Instruct-2407",
  "temperature": 0.0,
  "repetition_penalty": 1,
  "top_p": 0.8,
  "max_tokens": 150,
  "guided_json": {
      "type": "object",
      "properties": {
          "name": {
              "type": "string"
          },
          "age": {
              "type": "integer"
          },
          "is_alive": {
              "type": "boolean"
          },
          "height_in_meters": {
              "type": "number"
          },
          "names_of_children": {
              "type": "array",
              "items": {
                  "type": "string"
              }
          }
      },
      "required": [
          "name",
          "age",
          "is_alive",
          "height_in_meters",
          "names_of_children"
      ]
  }
}

response = requests.post(url+endpoints, json=data)
response.json()

Get the same AttributeError :
Traceback (most recent call last):
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in __call__
    await self.app(scope, receive, send)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/fastapi/routing.py", line 297, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/fastapi/routing.py", line 210, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/vllm/entrypoints/openai/api_server.py", line 302, in create_completion
    generator = await openai_serving_completion.create_completion(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/vllm/entrypoints/openai/serving_completion.py", line 102, in create_completion
    await self._guided_decode_logits_processor(request, tokenizer))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/vllm/entrypoints/openai/serving_engine.py", line 161, in _guided_decode_logits_processor
    return await get_guided_decoding_logits_processor(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/vllm/model_executor/guided_decoding/__init__.py", line 21, in get_guided_decoding_logits_processor
    return await get_outlines_guided_decoding_logits_processor(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/vllm/model_executor/guided_decoding/outlines_decoding.py", line 78, in get_outlines_guided_decoding_logits_processor
    return await loop.run_in_executor(global_thread_pool,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/vllm/model_executor/guided_decoding/outlines_decoding.py", line 165, in _get_logits_processor
    return CFGLogitsProcessor(guide, tokenizer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/vllm/model_executor/guided_decoding/outlines_logits_processors.py", line 165, in __init__
    super().__init__(CFGLogitsProcessor._get_guide(cfg, tokenizer))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/outlines/caching.py", line 122, in wrapper
    result = cached_function(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/vllm/model_executor/guided_decoding/outlines_logits_processors.py", line 151, in _get_guide
    tokenizer = _adapt_tokenizer(tokenizer)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/vllm/model_executor/guided_decoding/outlines_logits_processors.py", line 186, in _adapt_tokenizer
    tokenizer.vocabulary = tokenizer.get_vocab()
                           ^^^^^^^^^^^^^^^^^^^
AttributeError: 'MistralTokenizer' object has no attribute 'get_vocab'

Update : With the argument guided-decoding-backend = lm-format-enforcer, I get a TypeError
Traceback (most recent call last):
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in __call__
    await self.app(scope, receive, send)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/fastapi/routing.py", line 297, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/fastapi/routing.py", line 210, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/vllm/entrypoints/openai/api_server.py", line 302, in create_completion
    generator = await openai_serving_completion.create_completion(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/vllm/entrypoints/openai/serving_completion.py", line 102, in create_completion
    await self._guided_decode_logits_processor(request, tokenizer))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/vllm/entrypoints/openai/serving_engine.py", line 161, in _guided_decode_logits_processor
    return await get_guided_decoding_logits_processor(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/vllm/model_executor/guided_decoding/__init__.py", line 26, in get_guided_decoding_logits_processor
    return await get_lm_format_enforcer_guided_decoding_logits_processor(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/vllm/model_executor/guided_decoding/lm_format_enforcer_decoding.py", line 30, in get_lm_format_enforcer_guided_decoding_logits_processor
    tokenizer_data = _cached_build_vllm_token_enforcer_tokenizer_data(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/vllm/model_executor/guided_decoding/lm_format_enforcer_decoding.py", line 121, in _cached_build_vllm_token_enforcer_tokenizer_data
    return build_vllm_token_enforcer_tokenizer_data(tokenizer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/lmformatenforcer/integrations/vllm.py", line 40, in build_vllm_token_enforcer_tokenizer_data
    return build_token_enforcer_tokenizer_data(tokenizer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/lmformatenforcer/integrations/transformers.py", line 77, in build_token_enforcer_tokenizer_data
    regular_tokens = _build_regular_tokens_list(tokenizer)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "path/to/venv/venv_happyvllm/lib/python3.11/site-packages/lmformatenforcer/integrations/transformers.py", line 57, in _build_regular_tokens_list
    token_0 = tokenizer.encode("0")[-1]
              ^^^^^^^^^^^^^^^^^^^^^
TypeError: Tekkenizer.encode() missing 2 required positional arguments: 'bos' and 'eos'

Before submitting a new issue...

[X] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Can you check whether #8364 can solve this issue?

At the moment we do not have support for guided decoding. I can take a look though to see if it's easy to implement. I think it should be simple to add a get_vocab() function to the MistralTokenizer

At the moment we do not have support for guided decoding. I can take a look though to see if it's easy to implement. I think it should be simple to add a get_vocab() function to the MistralTokenizer

get_vocab() was already added in the linked PR. So we just have to worry about guided decoding.

With the fix, now I get this error (same with response_format, guided_json or also guided_choice :
RuntimeError('Cannot convert token ` �` (130971) to bytes:  �') in vllm.model_executor.guided_decoding.outlines_logits.processors.BaseLogitsProcessor
Forced to run in debugging because the API returns a 500 error without extra informations

Also linking this issue here: https://github.com/vllm-project/vllm/issues/8429#issuecomment-2353336799

Closing as completed by #9188


feat: Select and Delete FAQ from List

Fixes #728
Changes:   Following feature set is added.

User can select(by long click) any FAQ from list to delete it from toolbar.
If other list item is long clicked then it get selected instead of the first one.
If user clicks other list item while an item is already selected then it gets deselected as well as if the user after selecting an item, clicks it again then it gets deselected.
If a list item is selected and user clicks to create new FAQ then it gets deselected.

Screenshots for the change:   Below are the screen records for the changes mentioned above.
1.

2 & 3.

@iamareebjamal Now, I'm storing 2 faq objects in the presenter. First,  currentFaq - the Faq which is selected in the list and second,previousFaq - the Faq which was selected before the current Faq. Then when i need to deselect all the Faq then rather than traversing the entire list I will just unselect these 2 Faqs. Also this helps in switching (selecting) from one Faq to another by remembering previous Faq.
Further, this don't need to traverse along the list so maybe we won't need to use runnable to do that process in a different thread. Is it okay? I will remove merge conflicts and update the unit tests acordingly.


sandbox: handle SIGTTOU and SIGTTIN to avoid hangs

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same change?
[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[ ] Have you written new tests for your changes? Here's an example.
[ ] Have you successfully run brew style with your changes locally?
[ ] Have you successfully run brew typecheck with your changes locally?
[ ] Have you successfully run brew tests with your changes locally?

Fixes #12784.

Review period skipped due to critical label.


Feat: Copy web url of MR to clipboard

One less reason to go to the Web :)
This also cosmetically refactors code for getting the node url.

Looks good, thanks! Can we just rename the method to copy_mr_url() instead?

Looks good, thanks! Can we just rename the method to copy_mr_url() instead?

No problem. I was blindly copying the name from the state.INFO, but copy_mr_url() is more appropriate.


[Do not merge] Identify and validate api calls

This fell out of upgrading hmrc-manuals-api to Rails 5, the gds-sso bump from 9.3.0 to 13.2.0 indicated a problem.
https://trello.com/c/6EoCMZer/934-upgrade-hmrc-manuals-api-to-a-supported-version-of-rails
An API call is identified as having the HTTP_ACCEPT 'application/json' request header.
A valid API call also has a HTTP_AUTHORIZATION 'Bearer ...' request header.
Checking both in various Warden strategies means that json requests with no
bearer token still get treated as api calls because of the accept header.
Do not merge as we need CI first

This was intentional. It means applications can call into themselves via an API, without specifying a bearer token. For the background see #107.

@boffbowsh It seems @benlovell's proposal was aimed at a particular use case.
If we revert to checking for HTTP_ACCEPT: application/json with this PR there's a chance some AJAX calls in our applications could fail if the application calls back to itself without a bearer token.
On the other hand, requests with the accept header and no bearer token will not be treated as api calls and currently respond with a redirect. The only application I know to be affected is hmrc-manuals-api but in this case the redirect results in a 404.
Fun.

Closing as this will have a negative effect on apps making calls back to themselves.


Add rhtap dockerfile with allowed image references

See the details in the associated task.
Refs:

https://issues.redhat.com/browse/ACM-7178

I'm not sure the location or name of the Dockerfile is configurable (at least it wasn't last I knew). I'm not sure the background on the issue nor whether this is feasible, but can the location just be updated upstream to registry.access.redhat.com?
FROM registry.ci.openshift.org/stolostron/builder:go1.20-linux AS builder

https://github.com/open-cluster-management-io/governance-policy-addon-controller/blob/c1e255e4bb58eec0f02462c4c27d9e8d638e958c/build/Dockerfile#L4

Oh, nevermind--sorry. I see the pattern from Hypershift now.

And Prow would be unaffected if RHTAP is referencing an entirely different build file, so that's good (though I'm not a fan of the risk for skew there, but it seems that's unavoidable).

Looks like they don't have go 1.20 yet.  https://catalog.redhat.com/software/containers/ubi9/go-toolset/61e5c00b4ec9945c18787690?gs&q=go-too

/hold
Waiting for golang tooling to be available for rhtap

@dhaiducek Do you know what happened to the RHTAP tests that used to run in PRs?

@dhaiducek Do you know what happened to the RHTAP tests that used to run in PRs?

It should be running as far as I know. The RHTAP console is down, so maybe there's an outage?

@gparvin Have you tried rebasing this PR? It might not be running because it doesn't like that the branch is behind, maybe?


Application error when right click on picture.

Description
Application error when right click on picture.
Steps To Reproduce

Right-click on the picture file (png, jpg)
There is an error popup

Requirements

Fix crash that occurs when right-click on a picture.

Files Version
<IP_ADDRESS>
Windows Version
10.0.22621.1344
Log file
debug.log

I restore my system and the problem fixed.


Switch to useRandomCoords by default for dm.conformers.generate

See https://greglandrum.github.io/rdkit-blog/conformers/exploration/2021/01/31/looking-at-random-coordinate-embedding.html for the rational.
Wht do you guys think? @maclandrol @jdavid04

In addition, it would be nice to set some kind of timeout (joblib friendly) too.

I haven't added the timeout feature as it's very tricky to get it right for all the possible situations (main process, threads, joblib, etc).


[Loc] Sql-migration xlf update for 5-3-2022

This PR fixes #

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 42.186%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
27856

Relevant Lines:
61752

💛  - Coveralls


Correct way to use Evercrypt API from multiple cpu cores (threads)?

Dear hacl-star/evercrypt team,
I'd like to use/call Evercrypt's CTR api from multiple CPU cores, in a thread-per-core design.
What would be the correct way to perform the auto-initialization for the agile APIs in this scenario?
Is it correct to call EverCrypt_AutoConfig2_init(); only from a single core (say core 0), and after that, each core can call into the agile APIs?
And are there any multi-threading caveats to be aware of ?
kind regards,
Niek

Hi Niek,
These are global variables under the hood, so I assume in your model they would be shared by all threads in the process? In that case, I would call the init function first, then create the threads and dispatch them to the right cores

I'll do that, then. Thanks Jonathan!


Themes support issues

mkdocs gradle plugin worked, but this was when my
mkdocs.yml had
theme:
    name: material

now it has
theme:
    name: ivory

And it fails to build with gradle.
However, it builds with direct call to 'mkdocs build'
(after running  'pip install mkdocs-ivory' )
LOG:
> Task :checkPython
Using python 3.8.3 from G:\DXC\JET\JetWebAppHelp\.gradle\python (.gradle\python\Scripts\python.exe)
Using pip 20.1.1 from G:\DXC\JET\JetWebAppHelp\.gradle\python\lib\site-packages\pip (python 3.8)

> Task :pipInstall
[python] cmd /c .gradle\python\Scripts\python.exe -m pip install pymdown-extensions==6.3.0
	 Requirement already satisfied: pymdown-extensions==6.3.0 in g:\dxc\jet\jetwebapphelp\.gradle\python\lib\site-packages (6.3)
	 Requirement already satisfied: Markdown>=3.2 in g:\dxc\jet\jetwebapphelp\.gradle\python\lib\site-packages (from pymdown-extensions==6.3.0) (3.2.2)
[python] cmd /c .gradle\python\Scripts\python.exe -m pip list --format=columns
	 Package            Version
	 ------------------ ---------
	 click              7.1.2
	 future             0.18.2
	 Jinja2             2.11.2
	 joblib             0.15.1
	 livereload         2.6.1
	 lunr               0.5.6
	 Markdown           3.2.2
	 MarkupSafe         1.1.1
	 mkdocs             1.1
	 mkdocs-material    4.6.3
	 nltk               3.5
	 pip                20.1.1
	 Pygments           2.6.1
	 pymdown-extensions 6.3
	 PyYAML             5.3.1
	 regex              2020.5.14
	 setuptools         46.4.0
	 six                1.15.0
	 tornado            6.0.4
	 tqdm               4.46.0
	 wheel              0.34.2

> Task :mkdocsBuild
[python] cmd /c G:\DXC\JET\JetWebAppHelp\.gradle\python\Scripts\python.exe -m mkdocs build -c -d "G:\DXC\JET\JetWebAppHelp\www\master" -s
	 ERROR   -  Config value: 'theme'. Error: Unrecognised theme name: 'ivory'. The available installed themes are: mkdocs, readthedocs, material

	 Aborted with 1 Configuration Errors!

(after running 'pip install mkdocs-ivory' )

Exactly! You need to tell the plugin to install required pip package:
python.pip 'mkdocs-ivory:0.4.5'

And it will work.
By default, python plugin creates local python virtualenv (G:\DXC\JET\JetWebAppHelp\.gradle\python\) and install configured pip packages there. This way project gets an isolated python environment (it would be harder to break build with global side effects).
When you build mkdocs directly with mkdocs build it uses global python installation which is able to use globally installed packages.

Added documentation page describing themes installation


Hotfix 4.0.3

Codecov Report

Merging #9 into release-4.0.0 will not change coverage.
The diff coverage is 100%.

@@             Coverage Diff              @@
##           release-4.0.0     #9   +/-   ##
============================================
  Coverage            100%   100%
============================================
  Files                  4      4
  Lines                 50     54    +4
  Branches               3      2    -1
============================================
+ Hits                  50     54    +4

Impacted Files
Coverage Δ

src/angularjs-store.ts
100% <100%> (ø)
:arrow_up:

src/models/state-holder.ts
100% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3919fda...e931fd5. Read the comment docs.


Fix FlatteningSerializer to not split on dot when using a Map

Ref - https://github.com/Azure/azure-sdk-for-java/issues/20150, https://github.com/Azure/azure-sdk-for-java/issues/8372
This PR fixes the FlatteningSerializer to not split/flatten on dot when using a Map in a class with final modifier.
Currently, we were skipping the Map keys that were attributes of a final class which also had a JsonFlatten annotation suggesting we loop over all the fields of the class  and flatten the fields on encountering a . operator.

/azp run java - core - ci


duplicates() is about values appearing more than once

Looks like a copy-pasto from singleton

whistle :)


chore(main): release 1.8.6

:robot: I have created a release beep boop
1.8.6 (2023-10-20)
Bug Fixes

🔧 修复 macOS 无法正确获取系统依赖路径的问题 (2352593)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/viarotel-org/escrcpy/releases/tag/v1.8.6 :sunflower:


Microsoft.CodeAnalysis.LanguageServer client: couldn't create connection to server

Environment data
dotnet --info output:
.NET SDK:
Version:           8.0.303
Commit:            29ab8e3268
Workload version:  8.0.300-manifests.c915c39d
MSBuild version:   17.10.4+10fbfbf2e
Ambiente de runtime:
OS Name:     Windows
OS Version:  10.0.22631
OS Platform: Windows
RID:         win-x64
Base Path:   C:\Program Files\dotnet\sdk\8.0.303\
Cargas de trabalho do .NET instaladas:
Não há cargas de trabalho instaladas para exibir.
Host:
Version:      8.0.7
Architecture: x64
Commit:       2aade6beb0
.NET SDKs installed:
5.0.100 [C:\Program Files\dotnet\sdk]
6.0.424 [C:\Program Files\dotnet\sdk]
8.0.303 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
arm64 [C:\Program Files\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\arm64\InstallLocation]
x86   [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
VS Code version:
C# Extension version: v2.39.28
OmniSharp log
Using dotnet configured on PATH
Dotnet path: C:\Program Files\dotnet\dotnet.exe
Activating C# standalone...
Starting server at c:\Users\01518536.vscode\extensions\ms-dotnettools.csharp-2.39.29-win32-x64.roslyn\Microsoft.CodeAnalysis.LanguageServer.exe
Server arguments --logLevel Trace --razorSourceGenerator c:\Users\01518536.vscode\extensions\ms-dotnettools.csharp-2.39.29-win32-x64.razor\Microsoft.CodeAnalysis.Razor.Compiler.dll --razorDesignTimePath c:\Users\01518536.vscode\extensions\ms-dotnettools.csharp-2.39.29-win32-x64.razor\Targets\Microsoft.NET.Sdk.Razor.DesignTime.targets --telemetryLevel all --extensionLogDirectory c:\Users\01518536\AppData\Roaming\Code\logs\20240806T114025\window1\exthost\ms-dotnettools.csharp
[Error - 11:40:37 AM] Microsoft.CodeAnalysis.LanguageServer client: couldn't create connection to server.
Error: spawn UNKNOWN
at ChildProcess.spawn (node:internal/child_process:421:11)
at Object.spawn (node:child_process:799:9)
at W. (c:\Users\01518536.vscode\extensions\ms-dotnettools.csharp-2.39.29-win32-x64\dist\extension.js:2:1263451)
at Generator.next ()
at s (c:\Users\01518536.vscode\extensions\ms-dotnettools.csharp-2.39.29-win32-x64\dist\extension.js:2:1253076)
Steps to reproduce

Open a dotnet porject with a regular account(non admin privilege)
Press F5 to start debugging the project
Wait a while to building process
See error on output window

Expected  behavior
Start a debug session
Actual behavior
On integrated terminal the process finishes without error but application don't start, as if I only asked to build the app
Additional context
Running vscode with admin privilege the problema do not happen.  I tried using only C# extension and also with C# Dev Kit, both last available version and also with versions from 6 months ago.  None of those options has worked without admin privilege.
I unistalled vscode and installed again, I tried installing per user and system wide and nothing made it work.
It happens even with a dummy console application just created by dotnet CLI.

@alberico-lima Is it possible the SDK was installed as Admin? Do you need Admin when using the dotnet CLI?

same bruh


[Improvement] Ask Password email has hyperlinks for the username when defined user name is an email

== Environment ==
IS 5.4.0 Update4 - 2 node Cluster
JDK - 1.8
DB - H2
OS - ubuntu 16.04
Browser - Chrome - Version 59.0.3071.115
== Steps to Recreate =

Enable email as username for JDBC [1].
Enabled 'Ask Password' according to [2]
Go to Management Console, create a user by specifying an 'email as username' and request for a ask password.
User should get an email

== Actual Outcome ==
Received email has a hyperlink for the username like below.

== Expected Outcome ==
Since the "hyperlink" type username doesn't intended to use as redirection or composing a mail, it's better to make it a static value.
[1] https://docs.wso2.com/display/IS540/Using+Email+Address+as+the+Username
[2] https://docs.wso2.com/display/IS540/Creating+Users+using+the+Ask+Password+Option

Thanks @maneeshaheshan,
This is a mailto: link which is added from the browser.


Open 'Try in REPL' from the example sections in the new tab

Hello, everybody.
In my humble opinion, it's kinda annoying when you are on docs page and click on the Try in REPL it's opening REPL in the same tab. After all you need to press backspace to return back to the docs page. And more changes in REPL you did - more times you need to press backspace.
I'd like to make PR, but can't find the place where this code is living:
function tryInREPL(event) {
    if (!event.target.matches('.try-repl')) {
      return;
    }
    var version = event.target.dataset && event.target.dataset.ramdaVersion;
    var versionParam = version ? '?v=' + version : '';
    var code = event.target.nextElementSibling.textContent;
    var encoded = fixedEncodeURIComponent(code);
    location.assign(location.origin + '/repl/' +
      versionParam + '#;' + encoded);
  }

I've looked everything in repo files but didn't manage to find :disappointed:
Basically, what we need to do is replace location.assign with window.open. As I'm guessing, this lives somewhere in here maybe /lib/docs/public/, but this path is in .gitignore.
Would you mind to reference me to the target file where tryInREPL lives?
Cheers!

I've done same manipulation in here and it works perfectly for Chrome extension.

Hi -- please open this issue/PR in the docs repo, ramda/ramda.github.io
Thanks

@buzzdecafe thank you! Done


Custom Theme

If I wanted to develop a theme that can be used via the command line how do I go about it?

It seems that you should make a 'template' enduro project like usual, and then submit a pull request to themes list so people could clone it via command line.
https://www.endurojs.com/docs/themes#creating-enduro-js-themes

Hey, @CosmoMyzrailGorynych thank you for answering this one. I am going to close this ticket now.
@karneaud Please reach out should you have more questions.


⚠ Bofrost.lu has degraded performance

In 272b062, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 947 ms

Resolved: Bofrost.lu performance has improved in 5cf8dfe.


IndexMany method does not take under consideration the ignored properties

NEST/Elasticsearch.Net 7.6.1:
Elasticsearch 7.6.2:
When I use the .IndexMany() method all the .Ignore() properties from the DefaultMappingFor are not applied. But If I use the .IndexDocument() method my .Ignore() properties are applied.
Steps to reproduce:

Ignore few properties from your class in the DefaultMappingFor
Use the .IndexMany() method to insert a list of objects
Execute the following command and see that the ignored properties were inserted although they were ignored:

Command:
GET /<test_index_name>/_search
{
"query": {
"match_all": {}
}
}
Expected behavior
When I use the .IndexMany() method the predefined ignored properties in the DefaultMappingFor should not appear/insert in the Elasticsearch

Hi @KrisPetkov, I can't replicate this. Here is the test that I'm running https://github.com/elastic/elasticsearch-net/commit/193e1c678e4d12b5098c7ae7b721b85df0151e64
public void Main()
{
	var pool = new SingleNodeConnectionPool(new Uri("http://localhost:9200"));
	var settings = new  ConnectionSettings(pool, new InMemoryConnection())
		.DisableDirectStreaming()
		.DefaultMappingFor<Foo>(m => m
			.Ignore(p => p.Baz)
			.IndexName("foos")
		);

	var client = new ElasticClient(settings);
	var docs = new[] { new Foo { Bar = "bar", Baz = "baz" }, };
	var bulkResponse = client.IndexMany(docs);
	var actual = Encoding.UTF8.GetString(bulkResponse.ApiCall.RequestBodyInBytes);
        var expected =  "{\"index\":{\"_id\":null,\"_index\":\"foos\"}}\n{\"bar\":\"bar\"}\n";

	if (actual != expected)
        {
            throw new Exception($"Expected {expected}, Actual: {actual}")
        }
}

public class Foo
{
	public string Bar { get; set; }
	public string Baz { get; set; }
}

which passes (i.e. doesn't throw the exception).
Can you provide a small but complete example that demonstrates what you're seeing?

Well it seems that the problem occurs when I am using objects that were acquired from the database by using EF Core. If I create a list of this objects manually in the code and pass the list to the .IndexMany method it works. The properties are ignored. But if I pass to the method a list which was formed from the EF Core the properties which should be ignored - are not.
Here's what I'm using:
Base Entity:
public class BaseEntity
{
        public int Id { get; set; }
}

Entity:
public class Item : BaseEntity
{
        public Item()
        {
            Guid = Guid.NewGuid();
        }

        public Guid Guid { get; private set; }

        public string Name { get; set; }

        public decimal Weight { get; set; }

        public decimal Length { get; set; }

        public decimal Width { get; set; }

        public decimal Height { get; set; }

        public byte Size { get; set; }

        // Navigation properties

        public virtual ICollection<Discount> AppliedDiscounts { get; set; }
}

Service Constructor:
public Service()
{
var pool = new SingleNodeConnectionPool(new Uri("my_elk_cloud_url"));
            var settings = new ConnectionSettings(pool)
                .BasicAuthentication("my_user", "my_password")
                    .DefaultMappingFor<Item>(m => m
                    .Ignore(p => p.Height)
                    .Ignore(p => p.Length)
                    .Ignore(p => p.Weight)
                    .Ignore(p => p.Width)
                    .IndexName("my_index_name")
                );
            //Private variable for the class
           client = new ElasticClient(settings);
}

My method (Does not ignore the properties):
Note: the list with objects comes from EF Core call to the DB:
public void ReIndex(IList<Item> newItemsToIndex)
{
          client.IndexMany(newItemsToIndex);
}

My method (Works and ignores the properties if I create the objects manually):
public void ReIndex(IList<Item> newItemsToIndex)
{
var listOfObjects = new List<Item>()
                {
                new Item()
                    {
                        Id = 1,
                        Name = "Test item 1",
                        Height = 150,
                        Length = 10,
                        Width = 70,
                        Weight = 5
                    },
                    new Item()
                    {
                        Id = 2,
                        Name = "Another test item",
                        Size = 10,
                        Weight = 0m,
                        Width = 0m,
                        Height = 33,
                        Length = 50
                    }
            };

          client.IndexMany(listOfObjects );
}

@russcam
I have just made another test and it seems that this problem occurs when I'm using the LazyLoading option of the EF Core. Do you know something about this?

I have just made another test and it seems that this problem occurs when I'm using the .UseLazyLoadingProxies(); option of the EF Core. Do you know something about this?

I think you're hitting the same issue as https://github.com/elastic/elasticsearch-net/issues/3929. What makes your scenario trickier however is that you don't know the type of the dynamic proxy that EF generates, therefore the current Ignore property implementation can't be worked around, at least with DefaultMappingFor.
For the time being, would using [Nest.Ignore] attribute on properties work?

@russcam Thank you for your answer!
I will try with the attribute in an hour or so and will let you know.
But my entities are in an anemic core project independent of all kind of external dependencies and this will introduce a dependency in the project. But for the sake of test I will try and see if it works.
As you said the ORM generates a dynamic proxy type for the virtual properties and overrides them but the problem is that also non virtual properties are not ignored. I mean that if it was not ignoring the AppliedDiscounts property from my example above it is understandable but it does not work for the Size property, for example, which is a simple byte variable.

@russcam Thank you for your answer!
I will try with the attribute in an hour or so and will let you know.

So, I have made the test and if I use the [Nest.Igonre] attribute everything works (with the lazy loading proxies activated). So maybe the .Ignore() method is the problem and cannot cope with the proxies.
In regards to my previous comment. If there are no plans for fixing this problem in a foreseeable future I will have to make some entity mappings (like AutoMapper or something like this) and to dynamically map my entities to/from a wrapper entity.

So maybe the .Ignore() method is the problem

It's related to how members are reflected to build a type specific serializer, and how those members are compared to mappings on members of a base type. In the attribute case, it is retrieved with the inherit: true, so will pick it up from the base type:
https://github.com/elastic/elasticsearch-net/blob/b669afd8f7716bdd49711feb50af4262de9addb6/src/Nest/CommonAbstractions/SerializationBehavior/PropertyMapping.cs#L64

If there are no plans for fixing this problem in a foreseeable future

I think it would be good to address this behaviour in the near future.

Thank you! For now I will make a workaround for my project.
Should I leave the issue open for future references or to close it for now?

Should I leave the issue open for future references or to close it for now?

I think it might be good to close this one for now, as the issue is captured in #3929, which is still open. Closing.


Unable to start project (Unsupported Java)

Shared ViewModel CodeLab
In which task and step of the codelab can this issue be found?
This problem is present after downloading the starter branch and importing it to Android Studio.
Describe the problem
I'm using the latest version of Android Studio (Flamingo 2022.2.1)
When importing the project, it will start syncing, but after a short while I'll get the error:

Unsupported Java.
Your build is currently configured to use Java 17.0.6 and Gradle 7.0.2.
Possible solution:

Upgrade Gradle wrapper to 7.2 version and re-import the project

What I've tried is upgrading the Gradle version to 7.2 and 7.6, cleaning the project, and rebuilding it, but then, I'll get even more errors:

Execution failed for task ':app:kaptGenerateStubsDebugKotlin'.

Internal compiler error. See log for more details

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Steps to reproduce?

Download the starter branch.
Import it to Android Studio.
Wait for the Sync to start.

Versions
Android Studio version: Flamingo 2022.2.1
API version of the emulator:  31

Right click on the error and tick on Possible Solution then close and reopen Android Studio. Like in the image it show 2 error, Go To : Unsupported java and click on  Upgrade Gradle wrapper to 7.2 version and re-import the project. It will do the rest file will sync without any error

I can't do that, this is a mainantenence project/library used by a lot of
customers. I can't change the gradle version.
Abhinab Sahoo @.***> escreveu no dia terça, 18/04/2023
à(s) 16:31:

Right click on the error and tick on Possible Solution then close and
reopen Android Studio. Like in the image it show 2 error, Go To :
Unsupported java and click on Upgrade Gradle wrapper to 7.2 version and
re-import the project. It will do the rest file will sync without any error
[image: Screenshot (51)]
https://user-images.githubusercontent.com/102297793/232826659-7fb27823-2edc-4dca-858e-99d7b19399d3.png
—
Reply to this email directly, view it on GitHub
https://github.com/google-developer-training/android-basics-kotlin-cupcake-app/issues/93#issuecomment-1513368486,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AF5KVWZ5YUDD742YW5AUX4TXB2XUDANCNFSM6AAAAAAXAIUWRM
.
You are receiving this because you are subscribed to this thread.Message
ID:
<google-developer-training/android-basics-kotlin-cupcake-app/issues/93/1513368486
@github.com>

Had the same problem.

Go To : Unsupported java and click on Upgrade Gradle wrapper to 7.2 version and re-import the project. It will do the rest file will sync without any error

fixed the initial file sync error.
I tried running the app and got the same error as mentioned above

What I've tried is upgrading the Gradle version to 7.2 and 7.6, cleaning the project, and rebuilding it, but then, I'll get even more errors:

Execution failed for task ':app:kaptGenerateStubsDebugKotlin'.
Internal compiler error. See log for more details
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with -->scan to get full insights.

What helped is setting in the projects build.gradle file the $kotlin_version like so:
buildscript {

    // change from ext.kotlin_version = "1.5.31" to
    ext.kotlin_version = "1.8.21"
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.0.3'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

Sync gradle and build project.

I spend a few terrible hours solving this problem.
For me is working this configuration (I have java 7.0.2):
buildscript {
    ext.kotlin_version = "1.4.21"
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.2.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0"
    }
}

I tried all the solutions above, along with some others from stack overflow, but nothing has worked for me till now. Do you have any idea?


[Azure] Error: VM size is not valid

The command I ran that caused this error was skyplane cp -y -r https://aucent.blob.core.windows.net/fake-image-net/fake_imagenet/ s3://eu-west-3/fake_imagenet_5/, which tried to copy azure blob files to s3 bucket.
The full error trace and the client log are attached:
error.txt
client.log

Skyplane's default azure_instance_class setting is "Standard_D32_v5", which is included in the list of valid VMs (also tried "Standard_D32_v4"), but I still got the same error.

The resolution here is better error handling in #474.


Proposed hugo archetype to fix issue #27843

This PR provides a Hugo archetype for users to create new blog posts. After we discuss, improve, and merge this archetype, we will create a separate PR providing instructions for contributors to use it.
As @nate-double-u suggested, "It might be good to add some information about this archetype (and how to use it) to the Submitting blog posts and case studies page. (Maybe under the Technical Considerations for submitting a blog post section?)"

This is great, thanks @rolfedh.
It might be good to add some information about this archetype (and how to use it) to the Submitting blog posts and case studies page. (Maybe under the Technical Considerations for submitting a blog post section?)

/area blog

@sftim @kbhawkey Thank you both for your comments. Sorry about the long delay. What do you think about the updates?

/lgtm great idea!

BTW @jimangel that LGTM didn't get counted, I assume you intended it to?

@sftim that's what I get for late-night reviewing :)
/lgtm

Hi @rolfedh .
Is there more work to do?
Holding, if there are any other comments or suggestions. If not, feel free to unhold.
Thanks.
/approve
/hold

@sftim Ready to merge?


fix: add modules needed to compile the profiler in typescript

Fixes #304  and #171

FWIW, see https://help.github.com/articles/closing-issues-using-keywords/#closing-multiple-issues, to mark PR as fixing multiple issues the keyword needs to be used before each issue ID. I'll fix that.


update numpy

Update numpy to version 1.21.6

This is superseeded by the MR removing the pandas dependency.


flutter stable channel A KeyRepeatEvent is dispatched, but the state shows that the physical key is not pressed. If this occurs in real application, please report this bug to Flutter

A KeyRepeatEvent is dispatched, but the state shows that the physical key is not pressed. If this occurs in real application, please report this bug to Flutter. If this occurs in unit tests, please ensure that simulated events follow Flutter's event model as documented in HardwareKeyboard. This was the event: KeyRepeatEvent#bb266(physicalKey: PhysicalKeyboardKey#700e3(usbHidUsage: "0x000700e3", debugName: "Meta Left"), logicalKey: LogicalKeyboardKey#00106(keyId: "0x200000106", keyLabel: "Meta Left", debugName: "Meta Left"), character: null, timeStamp: 21:32:52.999493)
'package:flutter/src/services/hardware_keyboard.dart':
Failed assertion: line 432 pos 16: '_pressedKeys.containsKey(event.physicalKey)'

Steps to Reproduce

Execute flutter run on the code sample
...
...

Expected results:
Actual results:

Code sample

Logs

Hello @abdulrehmananwar. This issue looks similar to https://github.com/flutter/flutter/issues/87391. Please follow that issue for further updates on it. I am closing this issue as a duplicate but if you disagree, please comment with a complete and minimal, reproducible example and your flutter doctor -v. Thank you.


Version number on files not updated to 2.8.0

Hi There,
Version number still on 2.7.1 on:
CHANGELOG.md
package.json
style.css
Thanks

Thanks for pointing that out. Fixed https://github.com/olefredrik/FoundationPress/commit/ce831de063c712e60776fdb695aebfe19bd456eb


Remove function runtest sub-folder parameter

Fix the issue of 'can't find files' when running with multiple
BUILD_LISTs. TestKitGen has improved to use BUILD_LIST to generate make
targets and compile projects there is no need to run the targets under
BUILD_LIST.
Signed-off-by: Sophia Guo<EMAIL_ADDRESS>

Grinder https://ci.adoptopenjdk.net/view/work in progress/job/Grinder_Sandbox/319/console.
Also tested with parallel story.

@sophia-guo - I will leave you to merge this once you make the minor update to comment / spelling


react-native app shows this error while running on a Mac Machine (M1) Parameter specified as non-null is null

Description
I have started a project with a linux machine (Ubuntu 20.04) and everything was going really well, While I have changed to Mac Machine I'm seeing this error while try to run the app.
I'm using latest version of Monterey version 12.3.1, trying to compile the application with the android api 30 and I'm have test real devices and emulators.
The react-native version is 0.67.2, I should also mention that I everything works fine while I'm trying to run the app on the same old Linux machine.
Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter,parameterurl

This is the screenshot for the error I'm getting:

Version
0.67.2
Output of npx react-native info
System:
OS: macOS 12.3.1
CPU: (8) arm64 Apple M1 Pro
Memory: 95.05 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.19.1 - ~/.nvm/versions/node/v14.19.1/bin/node
Yarn: 1.22.18 - ~/.nvm/versions/node/v14.19.1/bin/yarn
npm: 8.5.5 - ~/.nvm/versions/node/v14.19.1/bin/npm
Watchman: 2<IP_ADDRESS> - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK: Not Found
IDEs:
Android Studio: Bumblebee 2021.1.1 Patch 2 Bumblebee 2021.1.1 Patch 2
Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild
Languages:
Java: 11.0.11 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.67.2 => 0.67.2
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Just try to run the project as you do,
1. npm install
2. npm start
3. npm run android

I'm getting this output which says that the build is successful,
BUILD SUCCESSFUL in 43s
359 actionable tasks: 10 executed, 349 up-to-date
info Connecting to the development server...
info Starting the app on "emulator-5554"...
Starting: Intent { cmp=com.dummy/.MainActivity }
✨  Done in 48.37s.

But as I have mentioned above I face with the page that I have attached the screen shot.
Snack, code example, screenshot, or link to a repository
No response

```shell
Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter,parameterurl

You most likely have a stacktrace in adb logcat. It seems like you have a parameterurl which was null while it should have not been null.
Without the stacktrace we can't debug this further

Hi @cortinico, thanks for your quick reply.
Will share the log from adb in couple of minutes,

@cortinico sorry how am I supposed the prepare the log file for you? I'm not really familiar with adb tool.

I hope this helps
file.txt

Yup it does. The stacktrace is:
05-04 20:42:08.405  4430  4509 E unknown:ReactNative: Exception in native call
05-04 20:42:08.405  4430  4509 E unknown:ReactNative: java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter url
05-04 20:42:08.405  4430  4509 E unknown:ReactNative:   at okhttp3.Request$Builder.url(Unknown Source:2)
05-04 20:42:08.405  4430  4509 E unknown:ReactNative:   at com.facebook.react.modules.websocket.WebSocketModule.connect(WebSocketModule.java:98)
05-04 20:42:08.405  4430  4509 E unknown:ReactNative:   at java.lang.reflect.Method.invoke(Native Method)
05-04 20:42:08.405  4430  4509 E unknown:ReactNative:   at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
05-04 20:42:08.405  4430  4509 E unknown:ReactNative:   at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188)
05-04 20:42:08.405  4430  4509 E unknown:ReactNative:   at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
05-04 20:42:08.405  4430  4509 E unknown:ReactNative:   at android.os.Handler.handleCallback(Handler.java:938)
05-04 20:42:08.405  4430  4509 E unknown:ReactNative:   at android.os.Handler.dispatchMessage(Handler.java:99)
05-04 20:42:08.405  4430  4509 E unknown:ReactNative:   at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
05-04 20:42:08.405  4430  4509 E unknown:ReactNative:   at android.os.Looper.loop(Looper.java:223)
05-04 20:42:08.405  4430  4509 E unknown:ReactNative:   at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
05-04 20:42:08.405  4430  4509 E unknown:ReactNative:   at java.lang.Thread.run(Thread.java:923)

You're trying to connect to a WebSocket, and you're not passing the URL. So the app dies here: https://github.com/facebook/react-native/blob/709a459b1ef7968d447c0a5dbe5cd44d1e03fcb4/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.java#L98
(The exception is raised by network library).

Thanks, but this is another thing that I have no idea.
I'm using Graphql and Apollo client, which I have a web socket connection there. It seems that everything is okay by my side.
And I'm using Fire Base package like fire-base-messaging.
What do you think about this. you think the problem should be on Graphql side which I'm connecting to a web socket. or maybe a web socket maybe firebase libraries rely on

I'm using Graphql and Apollo client, which I have a web socket connection there. It seems that everything is okay by my side.
And I'm using Fire Base package like fire-base-messaging.

I don't have enough context to tell you where is the problem, but is definitely not related to  React Native. My suggestion is to try to exclude some of those libraries and try to bisect where the error is happening.
You should also consider opening an issue on the issue tracker of those projects you metnioned, as they have more context than us on this problem.
Closign as this is unrelated to RN, feel free to reopen if the issue persists.

Thanks for your help, the problem is solved and trying to know which package is exactly causing the problem.

Thanks for your help, the problem is solved and trying to know which package is exactly causing the problem.

can you tell us how you fix it?

@emadbaqeri how did you solve it?

try to update library


Add reference tree to find reference's parent/child (partial backport #16569 + #16893)

Backports the ReferenceTree impl as this is needed to backport https://github.com/crate/crate/pull/16960.
Partial backport of #16569 + full backport of #16893.

@mergifyIO rebase


New Wallet – Step 1:Check the heading.

Check the text.
https://xd.adobe.com/view/0aef8043-d951-4d0a-9a97-b7b2e16ffdbc-5fbc/screen/a652b8b9-9f08-467d-89c0-bd37c9d6f6db/?fullscreen

Verified this issue on dev app v2.0.68(415)