Type inference/narrowing lost after assignment

TypeScript Version:  3.1
Search Terms: type inference, type guard, narrowing, lost, assignment
Code
let a: unknown = 'x';

if (typeof a === 'string') {
  // a inferred as `string`
  a = a.substr(0, 5);  // (method) String.substr(from: number, length?: number): string
  // a inferred as `unknown`
  a.length;            // Failure: Object is of type 'unknown'.
}

Expected behavior: This should compile without an error.
Actual behavior: Line 7 fails with: Object is of type 'unknown'.
Playground Link: https://www.typescriptlang.org/play/index.html#src=let a%3A unknown %3D 'x'%3B

if (typeof a %3D%3D%3D 'string') {
  %2F%2F a inferred as `string`
  a %3D a.substr(0%2C 5)%3B
  %2F%2F a inferred as `unknown`
  a.length%3B
}

Related Issues: #18840, #19955, #26673

@DanielRosenwasser We do not currently narrow non-union types on assignment. For example, given
declare class Foo {
    x: string;
}

declare class Bar extends Foo {
    y: string;
}

declare var x: Foo;

if (x instanceof Bar) {
    x.y;
    x = new Bar();
    x.y;
}

we error on the second x.y as well.
Did we want to change this?

@DanielRosenwasser We do not currently narrow non-union types on assignment. For example, given
declare class Foo {
    x: string;
}

declare class Bar extends Foo {
    y: string;
}

declare var x: Foo;

if (x instanceof Bar) {
    x.y;
    x = new Bar();
    x.y;
}

we error on the second x.y as well.
Did we want to change this?

1 for this. Another example, which to me is quite unintuitive, is with objects that contain union types:

// compiles
let myVar: string | number;
myVar = '5';
console.log(myVar.length);

// compiles
let myObj1: {myProp: string | number} = {myProp: 5};
myObj1.myProp = '5';
console.log(myObj1.myProp.length);

// does not compile, emitting the following error:
// TSError: ⨯ Unable to compile TypeScript:
// myt.ts(63,26): error TS2339: Property 'length' does not exist on type 'string | number'.
//   Property 'length' does not exist on type 'number'.
let myObj2: {myProp: string | number} = {myProp: 5};
myObj2 = {myProp: '5'};
console.log(myObj2.myProp.length);

I just stumbled into this aswell, albeit with number instead of string. I can't see any logical reason why assigning a number to a value we know for sure to be a number should require us to narrow again:
declare function takesNumber(value: number): void;

function test(value: unknown) {
  if (typeof value !== "number") return;
  takesNumber(value); // ok
  value = 1; // assign the same type!
  takesNumber(value); // error (value is unknown, although we narrowed it to number before)
}

I would really love to have an unknown type that is less cumbersome to work with. It has been really awkward since it was introduced almost 3 years ago and not much has changed :(.

I also ran into this issue today while trying to use unknown. It's rather fine that assignment itself doesn't narrow types, that would just be nice. However, the unintuitive part for me is that it actually broadens an already narrowed type. So if I have type checked that I am working with an array, if at any point I do a reassignment on that variable, I'll lose the narrowing that has already been done and have unknown again. I'm left with the option of creating a new variable after doing the type narrowing and assigning it to the now narrowed variable, then the type for that variable will be inferred as the correct type, which is just really awkward and creates unneeded variables.

Any news on the subject guys? 😶🌫
The number of duplicates seems to indicate that there is a real need for this feature 👀

Just came to report this myself.
Search terms "type narrowing lost after assignment".
Kudos to OP for naming the issue perfectly.

Worth noting this also happens with {}, not just unknown


Get if review liked by user

How to check if the user liked a review?
For eg., user likes a review for a movie and after a few days opens review for the same movie, how to check whether the reviews are already liked by the user or not.

I’m pretty sure you would need to sync the users likes using the /users/likes/comments endpoint https://trakt.docs.apiary.io/#reference/users/likes/get-likes.
You can find out if they’ve liked something since last syncing with the /sync/last_activities endpoint and checking for comments.liked_at https://trakt.docs.apiary.io/#reference/sync/last-activities/get-last-activity
Sent with GitHawk

Thanks a lot.
I can maintain a local cache and sync it from time to time.


Flutter Windows: cannot build Windows App error MSB8066

I am getting this error while building for windows on debug mode
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(238,5): error MSB8066: Custom build for 'D:\DSI projects\sanjali_app\build\windows\CMakeFiles\a6c8cc86bdf940a07f4885a881770ba0\flutter_windows.dll.rule;D:\DSI projects\sanjali_app\build\windows\CMakeFiles\9c479cc21d461e620769ab96f5bca778\flutter_assemble.rule' exited with code 1. [D:\DSI projects\sanjali_app\build\windows\flutter\flutter_assemble.vcxproj] Exception: Build process failed.

Hi @aihamhasan
Can you please provide your flutter doctor -v, your flutter run --verbose and a minimal complete reproducible code sample?
Thank you

Hi, the issue gets resolved after deleting the windows folder and recreating it, But dint get the cause of the error and how it resolved. Also been facing it repeatedly
My Flutter doctor
D:\DSI projects\sanjali_app>flutter doctor -v
[√] Flutter (Channel dev, 1.26.0-1.0.pre, on Microsoft Windows [Version 10.0.19042.867], locale en-IN)
• Flutter version 1.26.0-1.0.pre at C:\Users\Avin Ronson\flutter
• Framework revision 63062a6443 (4 months ago), 2020-12-13 23:19:13 +0800
• Engine revision 4797b06652
• Dart version 2.12.0 (build 2.12.0-141.0.dev)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\Avin Ronson\AppData\Local\Android\Sdk
• Platform android-30, build-tools 29.0.2
• ANDROID_HOME = C:\Users\Avin Ronson\AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.8.4)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.8.30907.101
• Windows 10 SDK version 10.0.18362.0
[√] Android Studio (version 4.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 47.1.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] VS Code (version 1.55.1)
• VS Code at C:\Users\Avin Ronson\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.21.0
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19042.867]
• Chrome (web)      • chrome  • web-javascript • Google Chrome 89.0.4389.114
• Edge (web)        • edge    • web-javascript • Microsoft Edge 89.0.774.75
• No issues found!

@aihamhasan
It seems to be an issue with your VSCode setup / config rather than framework. See below similar issues and underlying comments / solutions and check if they help to resolve your issue.
https://github.com/flutter/flutter/issues/79381
https://github.com/flutter/flutter/issues/64419

Removing Extra spaces on the Projects Folder Path Solves the Issue.


Make godot-tbloader use the new FileAccess class instead of File

Is this still compatible with Beta 1? This change looks very recent on the master branch.

Is this still compatible with Beta 1? This change looks very recent on the master branch.

No, it isn't, it's tracking master

Yeah, I'll wait a bit with merging this PR then. Maybe we need a develop branch for the Godot master branch 🤔

This has to be rebased on master after e22ae9aa354ba01b36f36d841bb90290b9d97b8a.

Thanks for the PR! 🎉


Apk creation

Apk export
While exporting the android studio apk it gives me the following error:
Type com.learnium.RNDeviceInfo.BuildConfig is defined multiple times: C:\Users\manue\OneDrive\Desktop\MyApp\node_modules\react-native-device-info\android\build.transforms\9166b1d6d34e6b3b03f3d84907b6a605\transformed\classes\classes.dex, C:\Users\manue\OneDrive\Desktop\MyApp\android\app\build\intermediates\external_libs_dex\release\mergeExtDexRelease\classes2.dex
I entered multiDexEnabled true
I followed this video to no avail: https://www.youtube.com/watch?v=aHHtTi2eVNs
But there is nothing to do keep returning this error, how can I fix it?

I don't believe multidex is required if you have a minSdkVersion of 21 or higher, and that has been the lowest supported version for 2 years now (https://github.com/facebook/react-native/commit/a17ff44adcf003dd4e4ef2301e1f80b77913f712) so it is unlikely you still need it, and unlikely that will fix the problem.
Something is going on that is project specific, and I'm not sure what but perhaps npx react-native-clean-project could fix it?
I haven't seen this before in this repo ever though, and don't reproduce it myself, and there's no reproduction here (https://stackoverflow.com/help/mcve)
If you can post a reproduction (https://stackoverflow.com/help/mcve) that triggers this we can certainly re-open but I'm going to have to close this as project-specific / not actionable in the meanwhile


chore: provide an easier way to serve the application

Hello!
Thanks for the PR! The quickstart at https://angular.io/docs/js/latest/quickstart.html includes an optional step for running a server locally. The goal for this quickstart is to make sure no one needs to run any commands for this repo.

Yes. I was thinking about updating the tutorial to reflect this changes, but I wanted to receive feedback first.
Don't you think that this would be simpler than installing http-server, starting the server and typing the URL in the browser?


DOC: There seems to be a code line missing from the given example to connect retriever_tool to the tools list <Issue related to /v0.2/docs/tutorials/sql_qa/>

URL
https://python.langchain.com/v0.2/docs/tutorials/sql_qa/
Checklist

[X] I added a very descriptive title to this issue.
[X] I included a link to the documentation page I am referring to (if applicable).

Issue with current documentation:
I am quite new to SQL agents, however, I think there should be a line of code where the new retriever_tool should be added to the list of tools available to the agent? I can't seem to connect how these two blocks of code will work together:
retriever_tool = create_retriever_tool(
    retriever,
    name="search_proper_nouns",
    description=description,
)

AND
agent = create_react_agent(llm, tools, messages_modifier=system_message)

without an intermediate step like tools.add(retriever_tool) or something to that effect.
If I am wrong, please explain how Agent will know of retriever_tool.
Arindam
Idea or request for content:
No response

@dakshaai https://api.python.langchain.com/en/latest/tools/langchain_core.tools.Tool.html#langchain_core.tools.Tool
i cant find add function which other function do u think will do this?


[GLUTEN-4480][CH] Decouple LocalFiles from plan to improve driver generating substrait plan

What changes were proposed in this pull request?
Applied for CH backend following velox does  https://github.com/oap-project/gluten/pull/4177
The time taken to generate the substrait plan has decreased from 249938ms to 4486ms for 163180 partitions after this pach.
(Fixes: #4480)
How was this patch tested?
Pass CI

Thank you for working on this @exmy.
I noticed the PR doesn't make changes to the following two parts of code yet:

https://github.com/oap-project/gluten/blob/19a863c0d3781034b4def57be899e5bd4a8825b6/backends-clickhouse/src/main/scala/io/glutenproject/backendsapi/clickhouse/CHIteratorApi.scala#L247-L280

https://github.com/oap-project/gluten/blob/19a863c0d3781034b4def57be899e5bd4a8825b6/backends-clickhouse/src/main/scala/org/apache/spark/sql/execution/datasources/v2/ClickHouseAppendDataExec.scala#L234-L252

Do you have a plan to make cleanup to the code as well? Especially 2 since some of the code seems to be obsolete so can be removed probably. I am no sure so would you like to help doing a check? Thanks.
After that, we may be able to remove a series of APIs on splitInfos from SubstraitContext to get a cleaner design.

Do you have a plan to make cleanup to the code as well? Especially 2 since some of the code seems to be obsolete so can be removed probably. I am no sure so would you like to help doing a check? Thanks.
After that, we may be able to remove a series of APIs on splitInfos from SubstraitContext to get a cleaner design.

@zzcclp Could you help check if we need cleanup the two parts of code?

genNativeFileScanRDD

change the code in the part of the genNativeFileScanRDD , and the ClickHouseAppendDataExec.scala is already removed in other pr #4457

@zhztheplayer @zzcclp Have cleaned up the code in the part of the genNativeFileScanRDD except ClickHouseAppendDataExec. I'd like to remove the related APIs on splitInfos from SubstraitContext in the following pr.

@exmy PR #4457 has been merged, please rebase.
BTW, there are some changes for LocalFileNode when query data from mergetree data

LGTM for changes to common module
@zzcclp If you want to review CH changes, thanks.

===== Performance report for TPCH SF2000 with Velox backend, for reference only ====

query
log/native_4481_time.csv
log/native_master_01_28_2024_d041ce584_time.csv
difference
percentage

q1
32.47
32.99
0.519
101.60%

q2
25.53
23.85
-1.682
93.41%

q3
36.14
37.74
1.591
104.40%

q4
38.06
38.98
0.921
102.42%

q5
68.29
67.95
-0.340
99.50%

q6
7.11
7.02
-0.086
98.78%

q7
82.83
80.87
-1.962
97.63%

q8
85.66
84.35
-1.310
98.47%

q9
119.32
121.55
2.230
101.87%

q10
41.16
43.06
1.898
104.61%

q11
21.35
20.27
-1.080
94.94%

q12
28.11
27.38
-0.726
97.42%

q13
45.15
45.45
0.300
100.66%

q14
20.61
22.94
2.333
111.32%

q15
27.72
28.71
0.995
103.59%

q16
14.68
14.08
-0.594
95.95%

q17
98.46
102.67
4.218
104.28%

q18
146.51
148.89
2.386
101.63%

q19
13.58
12.47
-1.110
91.82%

q20
26.28
26.11
-0.171
99.35%

q21
224.09
226.03
1.942
100.87%

q22
13.38
13.55
0.163
101.22%

total
1216.50
1226.93
10.433
100.86%


.ts files do not recompile on save (.tsx does)

Is this a bug report?
Yes

Did you try recovering your dependencies?

Yes
Which terms did you search for in User Guide?

typescript, recompile on save
Environment

System:
OS: Linux 5.0 Ubuntu 18.04.2 LTS (Bionic Beaver)
CPU: (4) x64 Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz
Binaries:
Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
Yarn: Not Found
npm: 6.9.0 - ~/.nvm/versions/node/v10.15.3/bin/npm
Browsers:
Chrome: 73.0.3683.86
Firefox: 66.0.2
npmPackages:
react: ^16.5.2 => 16.8.6
react-dom: ^16.5.2 => 16.8.6
react-scripts: 3.0.0 => 3.0.0
npmGlobalPackages:
create-react-app: 3.0.0
Steps to Reproduce

Tried converting normal CRA to a Typescript project using the guide in the docs
Recompile on save works for most tsx files but I have some API files that are plain .ts files that don't recompile on save (have tried converting them to tsx just to see if that would work)

Expected Behavior

I assumed all typescript files would recompile on save no matter what change is given. I'm not sure if this is poor practice, but the file I tested has no default export (just has a few helper function exports)
Actual Behavior

Does not recompile on save for files with no tsx in it.
Reproducible Demo

Sooooooo the file affected wasn't being imported anywhere in my project; when I imported it, the recompile on save feature started working.
The recompile on save system is smarter than me :rofl:
Hopefully no one else spends as long as I did trying to troubleshoot this.


[Bug]: Accordion content padding missing

Describe the bug
The accordion has a span of 623px to 624px where the padding disappears according to the @container self. So when resizing the screen there is one point in which the content jumps around.
@container self (max-width: 623px) {     .content.svelte-1j9i5d0.svelte-1j9i5d0 {         padding: 1.5rem;     } }
@container self (min-width: 624px) {     .content.svelte-1j9i5d0.svelte-1j9i5d0 {         padding: 1.5rem 2rem 1.5rem 3.5rem;     } }

Provide Code
No response
To Reproduce
Add a GoAAccordion to a screen with some content that has background color.
Resize the Screen.
I'm working on a <GoAOneColumnLayout><GoAPageBlock width='800px'><GoAAccordion headingSize='medium' heading='Test'><GoAContainer type='non-interactive' accent='filled' padding='compact' width='full'>
Empty
</GoAContainer></GoAAccordion></GoAPageBlock></GoAOneColumnLayout> and the page as responsive of 687px
Relevant console log output
No response
What browsers are you seeing the problem on?
No response
Additional context
No response

I would recommend using the @container self (max-width: 623px) { .content.svelte-1j9i5d0.svelte-1j9i5d0 { padding: 1.5rem; } }
as a default styling so no need to use max-width and add the changes to the left and right on this @container self (min-width: 624px) { .content.svelte-1j9i5d0.svelte-1j9i5d0 { padding: 1.5rem 2rem 1.5rem 3.5rem; } }

I spoke with @AndreFilipeNavesDeBarros , and while I can't replicate this issue, it might just be due to my playground setup. He's willing to work on this issue

Ok so I played around with the code and here is what I did:

on the vite.config file I added, because I need a mobile type that the max was the not-mobile min.

        postcssReplace({
          pattern: /\(--up-to-not-mobile\)/g,
          replaceWith: "(max-width: 624px)"
        }),

Then I changed the Accordion.svelte I just moved some of the styles around so here it is the final for each.

  .title {
    display: flex;
    flex: 1;
    align-items: center;
  }
  .content {
    border-bottom: var(--goa-border-width-s) solid
      var(--goa-color-greyscale-200);
    border-left: var(--goa-border-width-s) solid var(--goa-color-greyscale-200);
    border-right: var(--goa-border-width-s) solid var(--goa-color-greyscale-200);
    border-bottom-left-radius: var(--goa-border-radius-m);
    border-bottom-right-radius: var(--goa-border-radius-m);
    padding: 1.5rem;
  }
  @container self (--up-to-not-mobile) {
    .title {
      flex-direction: column;
      align-items: flex-start;
    }
  }

  @container self (--not-mobile) {
    .content {
      padding-left: 3.5rem;
      padding-right: 2rem;
    }
  }


Write a Perl program to find volume of a sphere

Description
Write a Perl program to find volume of a sphere
Volume of sphere = 4/3 × π × Radius^3
Radius : 2

Volume : 33.510321638291124

How to contribute

Save the solution in find_volume_of_a_sphere.pl file
Add find_volume_of_a_sphere.pl file in find-volume-of-a-sphere folder

!assign


How to delete a point by ID

Dear Lanelet guys,
I use this code to get rid of points created by mistake or make changes in the Linestring3D of a Lanelet. It seems **the API lets me remove points from a LineString but not completed delete the point from the Map. Can this be changed ? **
import lanelet2
import lanelet2.core as lncore

# create one lanelet with two borders with points 1,2,3,4
lb1 = lncore.LineString3d(lncore.getId(),
                [lncore.Point3d(lncore.getId(), 4, 0, 0), lncore.Point3d(lncore.getId(), 4, 2, 0),
                 lncore.Point3d(lncore.getId(), 3, 3, 1), lncore.Point3d(lncore.getId(), 3, 4, 1)])
rb1 = lncore.LineString3d(lncore.getId(),
                [lncore.Point3d(lncore.getId(), 6, 0, 0), lncore.Point3d(lncore.getId(), 6, 2, 0),
                 lncore.Point3d(lncore.getId(), 5, 3, 1), lncore.Point3d(lncore.getId(), 5, 4, 1)])
llet1 = lncore.Lanelet(lncore.getId(), lb1, rb1)

# add to map
lmap = lncore.LaneletMap()
lmap.add(llet1)

# remove the point 1 from each border
for llet in lmap.laneletLayer:
    del llet.rightBorder[0]
    del llet.leftBorder[0]

# print out the points of the borders (they are updated, and only contain points 2,3,4
for llet in lmap.laneletLayer:
    print ("right border: %s" % [(p.id, p.x, p.y) for p in llet.rightBorder])
    print ("left border: %s" % [(p.id, p.x, p.y) for p in llet.leftBorder])

# print all points in the map: the deleted points are still there
for p in lmap.pointLayer:
    print ("point %d (%.2f,%.2f)" % (p.id, p.x, p.y) )

# finally I want to delete the individual points ... but this won't work function "__delattr__" is not implemented
#for p in lmap.pointLayer:
#    del p

Its not a limitiation of the python interface. The C++ interface does not allow this as well.
The reason is that a LaneletMap is designed such that it always self-contained. It always contains all primitives that are used by other primitives in the map. Offering a delete function would be misleading, since it would not actually not delete the point if it was still in use by other LineStrings.
We might think about having something like removeIfUnused in the future, however. But since you usually want to have a map that does not contain any unneeded objects at all, the best approach is to simply create a new map with the primitives you actually need (e.g. with createMapFromLanelets).

Thanks for the explanation. Yes removeIfUnused would be good. For now I found another way around to achieve what I wanted.

could you post the solution you had found for this issue ??

if you are talking to me, my solution was simply to created lineString or lanelet elements in memory, instead of immediately putting them in the map. each time I had to edit a point of those linestrings I edited in memory. when the lines were all correct (no redundant points) I would finally add them in the map.

Thanks @amastrobera we followed a similar approach and found map editing possible with a similar approach like yours. Thanks for that heads up


Cleanup confusing code

Goal
The goal of this PR is to clean up the confusing and duplicate code around find_msa_id and ensure_valid_schema_grant in the messages pallet.
Part of #255
With @shannonwells and @enddynayn
Discussion

find_msa_id in the messages pallet was doing three things, now it is just doing one
Moved the other two things to the one place that needed them
Removed extra ensure_valid_schema_grant
Removed extra ensure_valid_delegation

Checklist

[x] Chain spec updated
[x] Updated the js/api-augment code if a custom RPC added/changed
[x] Design doc(s) updated
[x] Tests updated
[x] Benchmarks added

/run-benchmarks


Manage collaborators of components through ttnctl

Blocked until API added to Account Server

working on it as we speak.

Closed by https://github.com/TheThingsNetwork/ttn/pull/637


fix(workspace): fix crash in updated fm field logic on doc save

fix(workspace): fix crash in updated fm field logic on doc save
One of the top Sentry hitters right now is in onWillSaveNote, "Cannot read property 'updated' of undefined".
This happens when we can't find a particular note in the engine when it's being saved.  I think this is caused by a race condition between the vscode onWillSaveNote callback and our filewatcher logic of adding the note to the engine for the cases of a user adding a new note outside of the Lookup command.
We should just avoid modifying the updated property if we can't find it - according to VSCode's API docs, if your  onWillSaveNote logic crashes 3 times, it will no longer get invoked.

Dendron Extended PR Checklist

NOTE: the links don't work. you'll need to go into the wiki and use lookup to find the note until we fix some issues in the markdown export

Code
Basics

[x] code should follow Code Conventions
[x] circular dependency check: make sure your code is not introducing new circular dependencies in plugin-core.  See Avoiding Circular Dependencies.
[x] sticking to existing conventions instead of creating new ones

eg: if configuration for utilities are already in one module or package, add future utilities there as well

Extended

General

[x] check whether code be simplified
[x] check if similar function already exist in the codebase. if so, can it be re-used?
[N/A] check if this change adversely impact performance

Operations

[x] when shipping this change, will it just work or will it introduce additional operational overhead due to complicated interface or known bugs?

Architecture

[N/A] check if code is introducing changes on a foundational class or interface. if so, call for design review if needed

eg: making changes to DNode

Instrumentation
Basics

[N/A] if you are adding analytics related changes, make sure the Telemetry docs are updated

Extended

[x] can we track the performance of this change to know if it is successful?

via Sentry Data

Tests
Basics

[ ] Write Tests
[ ] Confirm existing tests pass
[ ] Confirm manual testing
[ ] Common cases tested
[ ] 1-2 Edge cases tested
[ ] If your tests changes an existing snapshot, snapshots have been updated

Docs

[ ] if your change reflects documentation changes, also submit a PR to dendron-site and mention the doc PR link in your current PR
[ ] does this change introduce a new or better way of doing things that others need to be aware of? if so, an async should be created and a process added in Development or Packages

Close the Loop
Extended

[ ]  is this a developer BREAKING change? if another person cloning from this branch will need to adjust their dependencies or mental model of the architecture, then it is. if this is the case, make sure this is communicated according to Close Loop

eg: breaking dev change due to new dependency

pr looks good though looks like there's a build error now

pr looks good though looks like there's a build error now

fixed now


opam switch create . fails

I'm not sure is that related to dklm itself or just underlying software, but it works like this:
> opam -r _opam
> opam switch create .
[ERROR] Directory "C:\\Users\\User\\project\\_opam" already exists, please choose a different name
> find _opam
_opam
_opam/.dkml
_opam/.dkml/compiler-cache
_opam/.dkml/compiler-cache/3ba4ec083c93c654cc2705fbbcde40d8ef4bd783e412ecddbe596fcfb1d65ef4.sexp

Because Windows unfortunately needs custom opam repositories, custom opam options and several opam pins to work, opam switch create is not the best way to create switches on Windows. You can use dkml init (no arguments) instead from an empty directory (or any directory without an existing _opam) to create an opam local switch.
PS. dkml init also handles upgrading a switch when you install a new DKML version. Especially important when DKML installs a new system OCaml compiler.

That should already be documented on the Beyond Basics documentation page.

Yeah, I just realized opam switch create . is useless with dkml when I was trying to link a trivial executable and got errors about dvapi32.lib and ws2_32.lib.


MudDropZone: Fix NoDropClass not being removed after drop if ItemDropped handler is executed asynchronously (#4516)

Description

This sets the _transaction to null in MudDropContainer.CommitTransaction and MudDropContainer.CancelTransaction before the TransactionEnded event is fired. This is changed because if the component is re-rendered, there is still an active transaction, but _canDrop is set to false by the handler method MudDropZone.Container_TransactionEnded (if ApplyDropClassesOnDragStarted is set to true). This is why the NoDrop css classes are getting applied.
Fixes #4516
How Has This Been Tested?

Visually in the Docs app + new unit test.
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

[x] The PR is submitted to the correct branch (dev).
[x] My code follows the code style of this project.
[x] I've added relevant tests.

Hi @just-the-benno,
just pushed the new test case. One test case fails now. I don't see how this relates to my changes?!

Hi @dhaas-phoenis
We have a few test cases that sometimes fail. The case you had, was new to me. So, nothing wrong with your coding.
As you can see, another run didn't surface an error.
Thanks for adding (and understanding) the new test case.

@henon Ready to be merged

Thanks!


0000-Reduce iot location assert cost indefinitely.md

Reduce the cost to assert iot hotspots after hip-69's cutoff date.

That was fast! Ping me or @waveform06 if you want some feedback.

At the very least, let's get this into discussion.


Validate Recipient Account Numbers for Transactions

Bug Description
Sending transactions with account number recipients that are actually not valid hexadecimal numbers are accepted by the network.  This means that all clients that are using our APIs must make sure that they are not vulnerable to XSS attacks (particularly our desktop client).
Steps to Reproduce
Steps to reproduce the behavior:

Go to the client app.
Click on Send points button
Enter in ~!@#$%^&*()_+\b1234567890-=[]\;',./{}|:"<>~!@#$%^&*()_+a12345678 as the To (recipient) field.
Enter in some points.  After sending, you will see that the transaction was successfully fulfilled.
Go to your transactions tab and see the accepted transactions.

Expected behavior
The attempt to add the transactions to the blockchain should be declined due to the account numbers not being a valid hexadecimal.
Actual behavior
The transactions were pushed to the blockchain.
Screenshots/Recordings

OS and Browser

Windows 10
Chromium (with the client)

Account Number
d84543947090d300910f8d1b9604c0c0a56fafca6cfbe52511c1e31757188bca
How to Create an Account

Some possible solutions for this are listed on this stackoverflow question.

Sorry for closing, I accidentally hit the post instead of going to the markdown previewer.


Decimal Values: Server Error (500)

When I try to add a stock with decimal value quantity i get a Server Error (500) when i submit the form. (received stock and add stock)
I purchase and build parts with decimal value.
Eg.

I purchase 230.34KG of salt
I build a part with 1.21kg of Salt

Screenshots
If applicable, add screenshots to help explain your problem.
--->

Deployment Method

[ ] Docker

Version Information

[ ] 0.5.4

Also played with the https://demo.inventree.org/order/purchase-order/3/, it doesn't let you receive items in decimal value

However I could add 12, the form accepts the submission.
On the remaining 0.56, i get this form with over 12 digits after decimal.

after manually removing the excess amount of digits, still same error appears: when i submit

Hi ther @huseyinkogo
In general quantities should support fractals, although it is not a regular testing scenario.
Without the error message it is quite difficult / impossible to find out more without reproducing everything. I would suggest including the error message as error 5** is almost everything that can happen serverside.

Hey @matmair
I have included the error code of Server error (500) however that was all i received. When i submitted the form with a whole it succeed.
All the recent comments were from the demo page.  https://demo.inventree.org/order/purchase-order/3/

@huseyinkogo the demo instance resets daily, so examples from there are not really working.
I can reproduce the error, the API seems to block receiving of fractal parts.
We are very shortly before the next release so I tag the next version for it.

@matmair
Roughly how many weeks are saying to resolve this bug.

@matmair I made a pass to fix this bug, I believe this should target 0.6.0 not the next release.

@eeintech feel free to fix every bug you want😇!
At some point I would like to have a stable release so I can  merge, test and release my plugins but small bugfixes should not stir in the APIs so why not.

Definitely worth fixing this one before stable release. Thanks @eeintech for fixing and @huseyinkogo for reporting!

@huseyinkogo It's on master now, let us know if you still have issue with decimals

Can verify its fixed :) @eeintech @SchrodingersGat


Properly handle empty CSGCombiners

Fixes "Cannot get CSGBrush" error spam.
Fixes #24696.
Fixes #40782.

Thanks!

Cherry-picked for 3.2.4.


generated: model replace jsonutils member to interface

这个 PR 实现什么功能/修复什么问题:
是否需要 backport 到之前的 release 分支:

2.13

Codecov Report

Merging #3976 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master   #3976      +/-   ##
=========================================
+ Coverage    6.94%   6.94%   +<.01%
=========================================
  Files         505     505
  Lines       85047   85047
=========================================
+ Hits         5904    5906       +2
+ Misses      78642   78640       -2
  Partials      501     501

Flag
Coverage Δ

#aFlag
6.94% <ø> (ø)
:arrow_up:

Impacted Files
Coverage Δ

pkg/cloudcommon/db/lockman/inmemory.go
67.07% <0%> (+2.43%)
: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 3c90b4d...88786b4. Read the comment docs.


(List/dictionary) Literal syntax proposal

✏ Proposed change
🍨 changed to 📄 (page facing up) to denote list literal or list beginning
🍆 changed to 📃 (page with curl) to denote list end.
🤔 Rationale
Pages because they look like something you'd write a list on.
Page facing up for list. Like you're taking a new sticky note to write a list on.
Page with curl for end of list. Like you're curling up a list after you're done with it.
Plus it looks like two halves of a long scroll when put directly under each other.
📄
📃
^ See?
Alternative:
📰 (newspaper) for list literal/beginning
🗞 (rolled up newspaper) for list end.
Same reasoning, but not a page. Newspapers, though they often do hold lists, aren't something you'd write your own list on. But the newspaper and rolled up newspaper work well as a visual combo.
🕺Example
📄
1 2 3 4 5 6 8 9 10 7
📃
*EDIT: Upon a brief consideration, I feel if this ends up passing using the list like the above example should be standard emojicode list style. It just makes so much emoji sense, it's so readable.
📰 1 2 3 4 5 6 8 9 10 7🗞

I closed #67 because I think that we should unify the literal syntax for all types and perhaps ultimately (far in the future) add the possibility for every (collection) type to define how it can be created from a literal.
This can be achieved by denoting the type the literal is supposed to construct. E.g.
To create a list 📄🍨 1 2 3 4 5 6 8 9 10 7📃
or to create a dictionary 📄🍯 🔤key one🔤 32 🔤key two🔤 32  📃
I’m still not sure if 📄 is a good choice due to the similarity with the files API, but it’s technically possible (now).

I still don’t want to use  📄. Some suggestion of mine instead:

🍿🍨 1 2 3 4 5 6 8 9 10 7 🍆 The individual popcorns hint at the individual values.
🎞🍨 1 2 3 4 5 6 8 9 10 7 🍆 The individual frames hint at the individual values.

🍪 will be replaced with 🍿🔡  🔤Concatenate🔤 🔤this🔤 🍆 (or the like).
Maybe someone has a better suggestion instead of 🍿 and 🎞?

Closing in favor of #156


Add Cycle in addition to Level in StructBalanceUpdates

Cycle replaces Level in Protocol 4, but alphanet and zeronet appear to still be running Protocol 3 so keep this for backwards compatibility.

Thanks @BrianBland!


Add KB for Code Injection

In the previous entries added , The languages that were used : java , js , and php , should it be the same or it's ok to change it .

Not necessarily, some vulnerabilities are more common in specific languages, for instance java doesn't have an eval method therefore there is no point in using it as example in code injection.


Instrumentation error in production: TypeError: parentTracer.getSpanLimits is not a function

Bug description
I am attempting to connect to honeycomb.io with the new Prisma Telemetry options. In a dev environment this works just fine. But in production, I receive the following error:
TypeError: parentTracer.getSpanLimits is not a function
  at new Span (/build/node_modules/@prisma/client/runtime/index.js:21694:37)
  at /build/node_modules/@prisma/client/runtime/index.js:23527:18
  at Array.forEach (<anonymous>)
  at createSpan (/build/node_modules/@prisma/client/runtime/index.js:23511:25)
  at runMicrotasks (<anonymous>)
  at runNextTicks (node:internal/process/task_queues:61:5)
  at listOnTimeout (node:internal/timers:528:9)
  at processTimers (node:internal/timers:502:7)

How to reproduce
My code (after following these instructions: https://www.prisma.io/docs/concepts/components/prisma-client/opentelemetry-tracing#register-tracing-in-your-application)
import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node";
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-proto";
import { PrismaInstrumentation } from "@prisma/instrumentation";
import { registerInstrumentations } from "@opentelemetry/instrumentation";
import { Resource } from "@opentelemetry/resources";
import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions";
import { SimpleSpanProcessor } from "@opentelemetry/sdk-trace-base";

function setupTelemetry() {
  if (process.env.NODE_ENV !== "production") {
    return;
  }
  const provider = new NodeTracerProvider({
    resource: new Resource({
      [SemanticResourceAttributes.SERVICE_NAME]: "SERVICE_NAME"
    })
  });

  // Setup how spans are processed and exported. In this case we're sending spans
  // as we receive them to an OTLP-compatible collector (e.g. Jaeger).
  provider.addSpanProcessor(new SimpleSpanProcessor(new OTLPTraceExporter()));

  // Register your auto-instrumentors
  registerInstrumentations({
    instrumentations: [new PrismaInstrumentation()],
    tracerProvider: provider
  });

  provider.register();
  // eslint-disable-next-line no-console
  console.log("📈 Telemetry set up");
}

export default setupTelemetry;

I then import setupTelemetry at the entrypoint for my application and execute it:
import setupTelemetry from './server/telemetry.ts';
// ....
setupTelemetry();

Expected behavior
In a production environment, I should not receive an error AND I should receive telemetry data to Honeycomb. Right now, I get the aforementioned error and receive no telemetry data.
In a development (local) environment, everything behaves as expected.
Prisma information
Packages:
    "@prisma/client": "4.2.1",
    "@prisma/instrumentation": "4.2.1",
    "prisma": "4.2.1",

Environment & setup

OS: macOS (local) and Linux (Azure App Services)
Database: Azure PostgreSQL DB
Node.js version: v16.14.2 (locally and in Azure)

Prisma Version
prisma                  : 4.2.1
@prisma/client          : 4.2.1
Current platform        : darwin-arm64
Query Engine (Node-API) : libquery-engine 2920a97877e12e055c1333079b8d19cee7f33826 (at<EMAIL_ADDRESS>Migration Engine        : migration-engine-cli 2920a97877e12e055c1333079b8d19cee7f33826 (at node_modules/@prisma/engines/migration-engine-darwin-arm64)
Introspection Engine    : introspection-core 2920a97877e12e055c1333079b8d19cee7f33826 (at node_modules/@prisma/engines/introspection-engine-darwin-arm64)
Format Binary           : prisma-fmt 2920a97877e12e055c1333079b8d19cee7f33826 (at node_modules/@prisma/engines/prisma-fmt-darwin-arm64)
Default Engines Hash    : 2920a97877e12e055c1333079b8d19cee7f33826
Studio                  : 0.469.0

@SheaBelsky When you say it works in the dev environment, is the dev environment still using honeycomb?

I cannot confirm this bug using honeycomb.io, using your reproduction I get traces in there.
Are you setting all the required environment variables to connect to Honeycomb?
export OTEL_EXPORTER_OTLP_ENDPOINT="https://api.honeycomb.io"
export OTEL_EXPORTER_OTLP_HEADERS="x-honeycomb-team=YOUR_KEY_HERE"
export OTEL_SERVICE_NAME="your-service-name"

Please could you share the open telemetry versions or your package.json?

Could you also tell us what is different between your dev environment and production environment?

Package information:
    "@opentelemetry/exporter-trace-otlp-http": "0.31.0",
    "@opentelemetry/exporter-trace-otlp-proto": "0.31.0",
    "@opentelemetry/instrumentation": "0.31.0",
    "@opentelemetry/resources": "1.5.0",
    "@opentelemetry/sdk-trace-base": "1.5.0",
    "@opentelemetry/sdk-trace-node": "1.5.0",
    "@opentelemetry/semantic-conventions": "1.5.0",

My production environment runs on Azure App Service, and my dev environment runs on my computer. When I use the exact same environment variables (and the only difference being that the code runs locally vs on Azure App Service), I get the original error on Azure App Service.
@danstarns are you able to get logs in a cloud environment using my code? or are you running it locally?

Sorry for not including earlier - the only other difference would be that in Azure App Services, I'm running in a Docker environment, and not doing that in a local environment. My dockerfile is pretty minimal though:
FROM node:16-alpine AS builder
WORKDIR /build

COPY . .

 That would make it a lot easier for us to maybe also try to deploy such a project to Azure App Services and see if that triggers the problem for us as well. Thanks @SheaBelsky.

Will work on this today!

Here's a minimal representation of this error where I can reproduce the error:
https://github.com/SheaBelsky/prisma-instrumentation-test
Using the following Azure Services:

https://azure.microsoft.com/en-us/services/app-service/
https://docs.microsoft.com/en-us/azure/postgresql/flexible-server/

In this minimal environment locally, I can get Honeycomb data to work. But in production (Docker), I cannot and I get the following error:
2022-08-22T15:56:13.052368931Z /build/node_modules/@prisma/client/runtime/index.js:21694
2022-08-22T15:56:13.052433833Z     this._spanLimits = parentTracer.getSpanLimits();
2022-08-22T15:56:13.052441634Z                                     ^
2022-08-22T15:56:13.052446134Z
2022-08-22T15:56:13.052450234Z TypeError: parentTracer.getSpanLimits is not a function
2022-08-22T15:56:13.052454434Z     at new Span (/build/node_modules/@prisma/client/runtime/index.js:21694:37)
2022-08-22T15:56:13.052458634Z     at /build/node_modules/@prisma/client/runtime/index.js:23527:18
2022-08-22T15:56:13.052462834Z     at Array.forEach (<anonymous>)
2022-08-22T15:56:13.052468335Z     at createSpan (/build/node_modules/@prisma/client/runtime/index.js:23511:25)

@SheaBelsky one more thing. If you run the docker instance locally, do you still get the error or is it only docker running on Azure?

@garrensmith This does not appear to happen on a local Docker image. This is what I did to create a local Docker image:
docker build . --tag instrumentation
docker run -p 8080:8090 instrumentation

You will need to provide the appropriate environment variables to the container when it is built (either with the .env.dev file & env-cmd package or by binding the arguments at the time the image is built), but I got Honeycomb data from within the container when I built the image locally.

@SheaBelsky thank you for the detailed help. We will look into it and see what the fix is.

@garrensmith of course! let me know if you need any more information or debugging info from my side!

i am also getting this same error on our production app. does not happen locally

@SheaBelsky Thank you for the replication. I took your docker file and then run the application, sent an HTTP request to /users - No traces in honeycomb plus I don't get any error.
What I did find is that if I use the console exporter from open opentelemetry I do indeed see the Prisma traces. Here is what I changed to see the traces in the console:
import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node";
- import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-proto";
import { PrismaInstrumentation } from "@prisma/instrumentation";
import { registerInstrumentations } from "@opentelemetry/instrumentation";
import { Resource } from "@opentelemetry/resources";
import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions";
- import { SimpleSpanProcessor } from "@opentelemetry/sdk-trace-base";
+ import { SimpleSpanProcessor, ConsoleSpanExporter } from "@opentelemetry/sdk-trace-base";

function setupTelemetry() {
  if (process.env.NODE_ENV !== "production") {
    return;
  }
  const provider = new NodeTracerProvider({
    resource: new Resource({
      [SemanticResourceAttributes.SERVICE_NAME]: "SERVICE_NAME"
    })
  });

  // Setup how spans are processed and exported. In this case we're sending spans
  // as we receive them to an OTLP-compatible collector (e.g. Jaeger).
- provider.addSpanProcessor(new SimpleSpanProcessor(new OTLPTraceExporter()));
+ provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()()));

  // Register your auto-instrumentors
  registerInstrumentations({
    instrumentations: [new PrismaInstrumentation()],
    tracerProvider: provider
  });

  provider.register();
  // eslint-disable-next-line no-console
  console.log("📈 Telemetry set up");
}

export default setupTelemetry;

Can you confirm that if you enable console logging, you see the Prisma traces in the console and you don't get the described error?

@danstarns Did you run the application locally or in an Azure App Service environment?
When I use the Console Span Exporter locally, I get Prisma traces in my console. That's fine!
But I was originally able to receive Honeycomb spans with the local docker image by using the code I provided earlier (using OTLPTraceExporter). Locally, when I use ConsoleSpanExporter, I do not receive any data in Honeycomb. I can't really do anything else without the data being exported - Is ConsoleSpanExporter meant to export data to a collector? I don't think it is to the best of my knowledge

@SheaBelsky I did not use Azure App Service environment, I used the Docker image you provided.
ConsoleSpanExporter is not ment to export data to a collector, I am trying to establish where the issue is - If you see Prisma logs in the console using ConsoleSpanExporter then we know that the issue is at the exporting stage with OTLPTraceExporter.

Still getting the same error in Azure when using ConsoleSpanExporter, and I don't see any emitted traces in the console @danstarns
2022-09-01T13:51:45.139071054Z TypeError: parentTracer.getSpanLimits is not a function
2022-09-01T13:51:45.139088555Z     at new Span (/build/node_modules/@prisma/client/runtime/index.js:21694:37)
2022-09-01T13:51:45.139100956Z     at /build/node_modules/@prisma/client/runtime/index.js:23527:18
2022-09-01T13:51:45.139105557Z     at Array.forEach (<anonymous>)
2022-09-01T13:51:45.139110157Z     at createSpan (/build/node_modules/@prisma/client/runtime/index.js:23511:25)
2022-09-01T13:51:45.139114257Z     at runNextTicks (node:internal/process/task_queues:61:5)
2022-09-01T13:51:45.139131858Z     at listOnTimeout (node:internal/timers:528:9)
2022-09-01T13:51:45.139136359Z     at processTimers (node:internal/timers:502:7)
2022-09-01T13:51:45.291346076Z This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:

Still getting the same error in Azure when using ConsoleSpanExporter, and I don't see any emitted traces in the console @danstarns
2022-09-01T13:51:45.139071054Z TypeError: parentTracer.getSpanLimits is not a function
2022-09-01T13:51:45.139088555Z     at new Span (/build/node_modules/@prisma/client/runtime/index.js:21694:37)
2022-09-01T13:51:45.139100956Z     at /build/node_modules/@prisma/client/runtime/index.js:23527:18
2022-09-01T13:51:45.139105557Z     at Array.forEach (<anonymous>)
2022-09-01T13:51:45.139110157Z     at createSpan (/build/node_modules/@prisma/client/runtime/index.js:23511:25)
2022-09-01T13:51:45.139114257Z     at runNextTicks (node:internal/process/task_queues:61:5)
2022-09-01T13:51:45.139131858Z     at listOnTimeout (node:internal/timers:528:9)
2022-09-01T13:51:45.139136359Z     at processTimers (node:internal/timers:502:7)
2022-09-01T13:51:45.291346076Z This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:

Thank you for trying this, we are looking into it.

hey can we get some sort of update on this? You literally cannot deploy to any azure linux machines.

I don't know if it's relevant, but I starting hitting this error locally when I upgraded Prisma 4.7.1 to 4.14.0. I then upgraded all the opentelemetry libraries and it went away.
@opentelemetry/api                          ^1.3.0  →   ^1.4.1
@opentelemetry/context-async-hooks          ^1.8.0  →  ^1.12.0
@opentelemetry/exporter-trace-otlp-http    ^0.34.0  →  ^0.38.0
@opentelemetry/resources                    ^1.8.0  →  ^1.12.0
@opentelemetry/sdk-trace-base               ^1.8.0  →  ^1.12.0
@opentelemetry/sdk-trace-node               ^1.8.0  →  ^1.12.0
@opentelemetry/semantic-conventions         ^1.8.0  →  ^1.12.0

This problem appeared on my repo because of End to End testing with Playwright on a Github Action. I can't reproduce it locally but with the last Bump @prisma/instrumentation from 4.13.0 to 4.14.1 it exploded. OpenTelemetry is up to date but we can't do the upgrade of @prisma/instrumentation because of that error.

I'm also experiencing this deploying to ECS after upgrading @prisma/* from 5.2.0 to 5.4.1.

Experienced the same error on Prisma >5.4.2 (tried 5.4.2, as well as 5.5). Downgrading to 5.2.0 worked for me

Version 5.5.2 solved for me

Not work:
  const provider = new NodeTracerProvider()
  const exporter = new TraceExporter()

  provider.addSpanProcessor(new SimpleSpanProcessor(exporter))

  registerInstrumentations({
    tracerProvider: provider,
    instrumentations: [
      new PrismaInstrumentation(),
      new HttpInstrumentation(),
      new FastifyInstrumentation(),
    ],
  })

Work fine:

const provider = new NodeTracerProvider()
const exporter = new TraceExporter()
provider.addSpanProcessor(new SimpleSpanProcessor(exporter))
provider.register()
registerInstrumentations({
instrumentations: [
new PrismaInstrumentation(),
new HttpInstrumentation(),
new FastifyInstrumentation(),
],
})

Not work:
  const provider = new NodeTracerProvider()
  const exporter = new TraceExporter()

  provider.addSpanProcessor(new SimpleSpanProcessor(exporter))

  registerInstrumentations({
    tracerProvider: provider,
    instrumentations: [
      new PrismaInstrumentation(),
      new HttpInstrumentation(),
      new FastifyInstrumentation(),
    ],
  })

Work fine:
  const provider = new NodeTracerProvider()
  const exporter = new TraceExporter()

  provider.addSpanProcessor(new SimpleSpanProcessor(exporter))
  provider.register()

  registerInstrumentations({
    instrumentations: [
      new PrismaInstrumentation(),
      new HttpInstrumentation(),
      new FastifyInstrumentation(),
    ],
  })

@jvaczcorporation
This comment is important.  It is the only thing that has worked for me to fix this issue.  I believe I've had this issue for just about a year now.  Thank you!!!  Finally, I can deploy my NestJS API with OTEL instrumentation integrated.  🧪💙🎐
I do believe this information would be useful to the OTEL team managing the respective packages affected.  I don't believe this issue is just specific to Prisma.  It would be nice to link this issue to somewhere the OTEL community could see it.  Anyone know which repo to search for?

I still get the issue even after having installed @opentelemetry/api:
"dependencies": {
    "other": "...",
    "@opentelemetry/api": "^1.8.0",
    "@opentelemetry/exporter-trace-otlp-http": "^0.49.1",
    "@opentelemetry/instrumentation": "^0.49.1",
    "@opentelemetry/resources": "^1.22.0",
    "@opentelemetry/sdk-trace-base": "^1.22.0",
    "@opentelemetry/sdk-trace-node": "^1.22.0",
    "@opentelemetry/semantic-conventions": "^1.22.0",
    "@prisma/client": "^5.10.2",
    "@prisma/instrumentation": "^5.10.2"
},
"devDependencies": {
    "other": "...",
    "prisma": "^5.10.2"
}

TypeError: parentTracer.getSpanLimits is not a function
at new Span (/Users/me/myproject/node_modules/@prisma/instrumentation/node_modules/@opentelemetry/sdk-trace-base/src/Span.ts:122:37)

Simplest way to reproduce:
import { PrismaInstrumentation } from '@prisma/instrumentation';

// =====> TypeError: parentTracer.getSpanLimits is not a function
const prismaInstrumentation = new PrismaInstrumentation();

I've reproduced the issue using the code from @jvaczcorporation.
Internal link.
The culprit seems to be missing provider.register() call. If that's not the case for you, could any of you share a reproduction repo where we could see this happen locally.

On a second thought and a little bit more digging in, it think it is Prisma issue after all.
We should not try to create the spans if there is no active tracer present.

Maybe related: https://github.com/prisma/prisma/issues/24373

https://github.com/prisma/prisma/issues/24373 would have fixed this for me.
The problem was that I had two different @opentelemetry/api libraries in my node_modules.
Playing around with my dependencies until there was only one version of @opentelemetry/api in my pnpm-lock.yaml file fixed the TypeError: parentTracer.getSpanLimits is not a function error for me.

We are facing the same when we try to integrate Prisma OpenTelemetry with Elastic APM. Prisma installs its own version of @opentelemetry/instrumentation, although there is only one version of @opentelemetry/api. I think making it a peer dependency might solve this issue.

Possible cause mentioned in #24715


Some updates to the Dev UI

As discussed, this PR adds:

View the contents of the web libraries
View the contents of the entry points
View the contents of the templates
See the static items

web-deps with directory first

generated entrypoints:

All the output by types:


Fix call to SQS initializer in rake task & remove nonexistent config setter

Do I need to bump a versions number before merging this?


Uncaught TypeError: this.rangeSelectField is null

I've followed the installation instructions and the map partly appears on the form (just the div and controls, not the actual map tiles) and the browser console shows the error "Uncaught TypeError: this.rangeSelectField is null".
Not sure what information you need to help me fix this.
Thanks!

Ok, solved it... after trying different things, I added "afterStateHydrated(function ($state, $record, Set $set): void ..." to the Map::make which gave me an error on "Set", but I just needed to include "use Filament\Forms\Set;" so it works well now...


test_browser should be able to filter easily from CLI

Would be nice to do
ts-node test_browser.ts SomeTest

40259e59b3f26d2887bd98d86b08269d9cd225dd


error: cannot bind non-const lvalue reference of type ‘VulkanCookbook::VkDestroyerVulkanCookbook::VkSemaphoreWrapper&’ to an rvalue of type ‘VulkanCookbook::VkDestroyerVulkanCookbook::VkSemaphoreWrapper’

I'm able to cmake . and make until this error occurs.

error: cannot bind non-const lvalue reference of type ‘VulkanCookbook::VkDestroyerVulkanCookbook::VkSemaphoreWrapper&’ to an rvalue of type ‘VulkanCookbook::VkDestroyerVulkanCookbook::VkSemaphoreWrapper’

Any idea what's going on? I have created one additional file which is the following, and includes all my imports from the sdk. So these are the only ones I have. Here's my_sdk_headers.h
#ifndef MY_SDK_HEADERS
#define MY_SDK_HEADERS

#include "vulkan.h"
#include "vk_platform.h"
#include "vulkan_core.h"
#include "vulkan_xcb.h"

#endif // MY_SDK_HEADERS

And the error
[ 54%] Building CXX object CMakeFiles/13-Enabling_Alpha_Blending.dir/Samples/Common_Files/CookbookSampleFramework.cpp.o
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/c++allocator.h:33:0,
                 from /usr/include/c++/7/bits/allocator.h:46,
                 from /usr/include/c++/7/string:41,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from /home/mies/vulkanpath/Vulkan-Cookbook/Library/Common Files/Common.h:41,
                 from /home/mies/vulkanpath/Vulkan-Cookbook/Library/Source Files/01 Instance and Devices/03 Connecting with a Vulkan Loader library.h:32,
                 from /home/mies/vulkanpath/Vulkan-Cookbook/Library/Common Files/AllHeaders.h:36,
                 from /home/mies/vulkanpath/Vulkan-Cookbook/Samples/Common Files/CookbookSampleFramework.h:36,
                 from /home/mies/vulkanpath/Vulkan-Cookbook/Samples/Common Files/CookbookSampleFramework.cpp:32:
/usr/include/c++/7/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = VulkanCookbook::FrameResources; _Args = {VkCommandBuffer_T*&, VulkanCookbook::VkDestroyer<VulkanCookbook::VkSemaphoreWrapper>, VulkanCookbook::VkDestroyer<VulkanCookbook::VkSemaphoreWrapper>, VulkanCookbook::VkDestroyer<VulkanCookbook::VkFenceWrapper>, VulkanCookbook::VkDestroyer<VulkanCookbook::VkImageViewWrapper>, VulkanCookbook::VkDestroyer<VulkanCookbook::VkFramebufferWrapper>}; _Tp = VulkanCookbook::FrameResources]’:
/usr/include/c++/7/bits/alloc_traits.h:475:4:   required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = VulkanCookbook::FrameResources; _Args = {VkCommandBuffer_T*&, VulkanCookbook::VkDestroyer<VulkanCookbook::VkSemaphoreWrapper>, VulkanCookbook::VkDestroyer<VulkanCookbook::VkSemaphoreWrapper>, VulkanCookbook::VkDestroyer<VulkanCookbook::VkFenceWrapper>, VulkanCookbook::VkDestroyer<VulkanCookbook::VkImageViewWrapper>, VulkanCookbook::VkDestroyer<VulkanCookbook::VkFramebufferWrapper>}; _Tp = VulkanCookbook::FrameResources; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<VulkanCookbook::FrameResources>]’
/usr/include/c++/7/bits/vector.tcc:100:30:   required from ‘void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {VkCommandBuffer_T*&, VulkanCookbook::VkDestroyer<VulkanCookbook::VkSemaphoreWrapper>, VulkanCookbook::VkDestroyer<VulkanCookbook::VkSemaphoreWrapper>, VulkanCookbook::VkDestroyer<VulkanCookbook::VkFenceWrapper>, VulkanCookbook::VkDestroyer<VulkanCookbook::VkImageViewWrapper>, VulkanCookbook::VkDestroyer<VulkanCookbook::VkFramebufferWrapper>}; _Tp = VulkanCookbook::FrameResources; _Alloc = std::allocator<VulkanCookbook::FrameResources>]’
/home/mies/vulkanpath/Vulkan-Cookbook/Samples/Common Files/CookbookSampleFramework.cpp:245:7:   required from here
/usr/include/c++/7/ext/new_allocator.h:136:4: error: cannot bind non-const lvalue reference of type ‘VulkanCookbook::VkDestroyer<VulkanCookbook::VkSemaphoreWrapper>&’ to an rvalue of type ‘VulkanCookbook::VkDestroyer<VulkanCookbook::VkSemaphoreWrapper>’
  { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/mies/vulkanpath/Vulkan-Cookbook/Library/Common Files/AllHeaders.h:195:0,
                 from /home/mies/vulkanpath/Vulkan-Cookbook/Samples/Common Files/CookbookSampleFramework.h:36,
                 from /home/mies/vulkanpath/Vulkan-Cookbook/Samples/Common Files/CookbookSampleFramework.cpp:32:
/home/mies/vulkanpath/Vulkan-Cookbook/Library/Source Files/09 Command Recording and Drawing/19 Increasing the performance through increasing the number of separately rendered frames.h:45:5: note:   initializing argument 2 of ‘VulkanCookbook::FrameResources::FrameResources(VkCommandBuffer_T*&, VulkanCookbook::VkDestroyer<VulkanCookbook::VkSemaphoreWrapper>&, VulkanCookbook::VkDestroyer<VulkanCookbook::VkSemaphoreWrapper>&, VulkanCookbook::VkDestroyer<VulkanCookbook::VkFenceWrapper>&, VulkanCookbook::VkDestroyer<VulkanCookbook::VkImageViewWrapper>&, VulkanCookbook::VkDestroyer<VulkanCookbook::VkFramebufferWrapper>&)’
     FrameResources( VkCommandBuffer            & command_buffer,
     ^~~~~~~~~~~~~~
CMakeFiles/13-Enabling_Alpha_Blending.dir/build.make:86: recipe for target 'CMakeFiles/13-Enabling_Alpha_Blending.dir/Samples/Common_Files/CookbookSampleFramework.cpp.o' failed
make[2]: *** [CMakeFiles/13-Enabling_Alpha_Blending.dir/Samples/Common_Files/CookbookSampleFramework.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/13-Enabling_Alpha_Blending.dir/all' failed
make[1]: *** [CMakeFiles/13-Enabling_Alpha_Blending.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Does the project compile without any modifications (without the added file)? If problem exists also on clean repository, what platform do You compile the project on - what OS and what version of the compilator do You use?

Same issue with clean repo using Ubuntu 18.04 LTS

I had the same problem but was able to fix it. But compiling the repo as-is under Ubuntu doesn't really make sense since there is no WindowFramework implemented for linux yet.
However I also added that in my personal fork, so it does now generate executable files under Ubuntu 18.04. At some point these changes might be implemented in the official repo, but there are still some bugs when compiling on linux.


Bad Licensing

Spectral is released under the Apache License
You have changed this and removed all licensing, trademarks. This has been reported to the company.

I am seeing under the following (https://github.com/postman-solutions-eng/governance-rules-playground/pull/15/commits/85e06f553d31a489be8415b855db50e0abdfcaed) that you declared an 'MIT' license but do not have it declared on the project.
Spectral uses an Apache license and the MIT contributions are compatible with APACHE but this would this would still mean it falls under the Apache license as a whole (with contributions made under MIT License)

Thanks for calling this out - I'll update.


[BUG] Huge difference between Rust optimizer and Python optimizer

The weights generated by Anki are very different from those generated by the python optimizer.

Weights generated by Anki: 1.1408, 2.1175, 9.0984, 90.9615, 4.7957, 1.1697, 1.2771, 0.0010, 1.6411, 0.1000, 1.0769, 2.1627, 0.0928, 0.4849, 1.0269, 0.0000, 3.4083
Weights generated by python optimizer: 1.1366, 1.4954, 20.8954, 41.342, 4.5015, 1.6955, 2.114, 0.0, 1.7707, 0.1551, 1.1898, 1.5944, 0.1889, 0.6854, 0.0115, 0.0, 6.6447
Deck to reproduce: Default.zip (change file extension to .apkg)
Timezone (for Python optimizer): Asia/Calcutta
Other settings are Default

This issue is not caused by the bug where Anki calculates weights for all the reviews (not respecting the preset).
Originally posted by @user1823 in https://github.com/ankitects/anki/issues/2443#issuecomment-1732545574

I forget to remove outliers in the Rust optimizer:
        def remove_outliers(group: pd.DataFrame) -> pd.DataFrame:
            grouped_group = (
                group.groupby(by=["r_history", "delta_t"], group_keys=False)
                .agg({"y": ["mean", "count"]})
                .reset_index()
            )
            sort_index = grouped_group.sort_values(
                by=[("y", "count"), "delta_t"], ascending=[True, False]
            ).index

            total = sum(grouped_group[("y", "count")])
            has_been_removed = 0
            for i in sort_index:
                count = grouped_group.loc[i, ("y", "count")]
                if has_been_removed + count >= total * 0.05:
                    break
                has_been_removed += count
            group = group[
                group["delta_t"].isin(
                    grouped_group[grouped_group[("y", "count")] >= count]["delta_t"]
                )
            ]
            return group

        df[df["i"] == 2] = (
            df[df["i"] == 2]
            .groupby(by=["r_history", "t_history"], as_index=False, group_keys=False)
            .apply(remove_outliers)
        )
        df.dropna(inplace=True)

        def remove_non_continuous_rows(group):
            discontinuity = group["i"].diff().fillna(1).ne(1)
            if not discontinuity.any():
                return group
            else:
                first_non_continuous_index = discontinuity.idxmax()
                return group.loc[: first_non_continuous_index - 1]

        df = df.groupby("card_id", as_index=False, group_keys=False).progress_apply(
            remove_non_continuous_rows
        )

fsrs-rs:

fsrs-py:

To increase num_epochs could reduce the errors. But it also will slow down the the optimization.

The left is generated by Anki. The right is generated by python optimizer.

To increase num_epochs could reduce the errors. But it also will slow down the the optimization.

By the way, how many epochs does the optimizer in the beta version use? Also, does it use splits, with averaging of the parameters afterwards?

By the way, how many epochs does the optimizer in the beta version use? Also, does it use splits, with averaging of the parameters afterwards?

It uses 16 epochs and doesn't have splits because the framework doesn't support splits.

So the code related to removing outliers will be added in the next release?

@asukaminato0721 and I will deal with it.

I implement the outlier filter, but the first four weights are still very different from the Python optimizer. So it's not caused by outlier filter. By the way, I think the weights generated by the Python optimizer doesn't fit the forgetting curve well:

A smaller value of stability would be better:

Maybe RMSE is not a good loss function here. I plan to use log loss.

Maybe RMSE is not a good loss function here. I plan to use log loss.

I would recommend running the benchmark with both RMSE and logloss to determine whether there is a difference in the final RMSE.

I implement the outlier filter, but the first four weights are still very different from the Python optimizer. So it's not caused by outlier filter. By the way, I think the weights generated by the Python optimizer doesn't fit the forgetting curve well:

The supposed poor fitting of weights produced by the Python optimizer is definitely worth investigating. But, for now, the main focus should be on finding out why the first four weights generated by the Rust and the Python optimizer very different.

Maybe RMSE is not a good loss function here. I plan to use log loss.

I know this issue is closed, but I'm curious, did you end up testing RMSE vs logloss in pretrain? If so, which one is better?

I tested it. The log loss is more robust than RMSE in pretrain.


Update scroll link to navigate to about.html

Modified scroll link destination to navigate to the 'about.html' page for a seamless user experience earlier the scroll wasn't working. ( gssoc 23 )

Hello amishawrites
First-time contributor
amishawrites there is conflict in index.html please resolve the comflict then commit it .


[EMB-3] Feature/typescript

Purpose
Initial TypeScript implementation. This PR prepares for the incremental conversion of JavaScript to TypeScript. Follow-up PRs to use TypeScript syntax will be required.
Summary of Changes

Installs ember-cli-typescript and ember-cli-tslint
TSLint only warnings
Rename .js files to .ts

Side Effects / Testing Notes
Functionality should be identical
Ticket
https://openscience.atlassian.net/browse/EMB-3
Reviewer Checklist

[ ] meets requirements
[ ] easy to understand
[ ] DRY
[ ] testable and includes test(s)
[ ] changes described in CHANGELOG.md (don't have initial release yet)

Coverage decreased (-6.5%) to 0.0% when pulling 7347b394f7bedb3b62b8c72f3286a9c4d32aee31 on feature/typescript into 1cf75e13196622a161817444c600a510ba71e24f on develop.

ember-cli-code-coverage appears to be hard-coded for .js files.
https://github.com/kategengler/ember-cli-code-coverage/blob/master/index.js#L198

Harrumph.

So options are:

Ditch coverage reporting;
Find a different coverage tool; or
Test coverage against generated JS.

And potentially something else I'm not thinking of.

I would lean toward ditching coverage for the time being. We have no real tests at the moment. Once we have a suite of tests to use for coverage reporting, forking & PRing ember-cli-code-coverage would be the best solution. If that ends up being not feasible, I'd take settle for 3 then 2 in that order.

:-1: code coverage since its at @ 2%-5% right now

Rebased with just the install and rename commit. Follow-up PR with syntax changes forthcoming. Would like to get this merged ASAP.


remove deprecated patches

I'm not sure will they be reused in the future, but...

Thanks, these just accumulated over time


added aircheck option

Added the functionality to choose the aircheck versions of KK songs.
The random number generation on line 71 of AudioManager.js needs to be adjusted to the correct range of KK song titles. The folder on google drive is missing quite a few.
I changed the path on line 14 of Manifest.JSON. it did not match the actual file name.

Fixes #23, but a very old PR. Will revisit once revamped development is completed.


Bugfix

Coverage remained the same at 97.88% when pulling 30ea4bf60c34c670df69dcc4eeb2827d0baf8beb on chagochkin:master into 4ca42012124dcc361911086bf39b00aeb6f83e61 on onelogin:master.

Thanks for fixing that.


connection refused issue

python train.py --dataset COCO --dataset_root /media/jake/mark-4tb3/input/datasets/coco_2014/coco/annotations
idk but this stop at '

else:
print('elseA',in_channels,v)
conv2d = nn.Conv2d(in_channels, v, kernel_size=3, padding=1)

point its in ssd.py
def vgg(cfg, i, batch_norm=False):
    print('vgg')
    layers = []
    in_channels = i
    for idx,v in enumerate(cfg):
        print(idx)
        if v == 'M':
            print('M')
            layers += [nn.MaxPool2d(kernel_size=2, stride=2)]
        elif v == 'C':
            print('C')
            layers += [nn.MaxPool2d(kernel_size=2, stride=2, ceil_mode=True)]
        else:
            print('elseA',in_channels,v)
            conv2d = nn.Conv2d(in_channels, v, kernel_size=3, padding=1)
            print('elseB')
            if batch_norm:
                print('if batch_norm')
                layers += [conv2d, nn.BatchNorm2d(v), nn.ReLU(inplace=True)]
            else:
                print('if elseC')
                layers += [conv2d, nn.ReLU(inplace=True)]
            in_channels = v
    print('state_pool5')
    pool5 = nn.MaxPool2d(kernel_size=3, stride=1, padding=1)
    conv6 = nn.Conv2d(512, 1024, kernel_size=3, padding=6, dilation=6)
    conv7 = nn.Conv2d(1024, 1024, kernel_size=1)
    layers += [pool5, conv6,
               nn.ReLU(inplace=True), conv7, nn.ReLU(inplace=True)]
    print('return layers')
    return layers

Run visdom before training, you won't get connection refuse error.
python -m visdom.server
then open other tab, must always run visdom during training
python train.py ...


Access/Serve RT View using non-root URI

I used RT View for some days now, server from http://cardano.domain.com. In order to be able to use Let's Encrypt's cerbot for https (which includes serving static "challenge" files to show one is the owner of the domain in question), I want to move RT View from / to /rt-view/ in nginx' configuration (ergo http://cardano.domain.com/rt-view).
Previous nginx config:
location / {
    auth_basic           "Cardano RT View Authorization";
    auth_basic_user_file /etc/nginx/conf.d/.htpasswd-cardano-rt-view;
    proxy_pass           http://<IP_ADDRESS>:8024/;
}

Resulting HTTP headers:
[...]
--> http://cardano.domain.com:80/haskell.js
<-- GET: HTTP/1.1 200 OK
--> ws://cardano.domain.com:80/websocket/
<-- GET: HTTP/1.1 101 WebSocket Protocol Handshake
[...]

Until here everything works as expected.
New nginx config:
root         /srv/www/cardano.domain.com/html;
index        index.html;
location / {
    try_files            $uri $uri/ =404;
}
location /rt-view/ {
    auth_basic           "Cardano RT View Authorization";
    auth_basic_user_file /etc/nginx/conf.d/.htpasswd-cardano-rt-view;
    proxy_pass           http://<IP_ADDRESS>:8024/;
}

HTTP headers:
[...]
--> http://cardano.domain.com:80/rt-view/haskell.js
<-- GET: HTTP/1.1 200 OK
--> ws://cardano.domain.com:80/websocket/
<-- NS_ERROR_CONNECTION_REFUSED
[...]

I've tried quite some configuration work-arounds, rewrites, added the same rules for location /websocket/ etc. but it seems that only a proper request might help here? As I'm no expert in nginx configuration I might be missing sth. as well...
OS:      Fedora 33 Server
RT View: 0.1.0
Nginx:   1.18.0

Thanks in advance

As I'm no expert in nginx configuration...

Sorry, I'm not an expert in nginx as well.

I guess it would be reasonable to assume nginx expects a request of ws://cardano.domain.com:80/rt-view/websocket/. How else is it supposed to know to location this websocket belongs? I guess it is part of the scripts delivered by the internal web server. One cannot really try it out unless fixing them for using the whole URI instead of the hostname only.
Thank you!


Some parts are separated from the vehicle and are floating in the air

I haven't yet been able to figure out exactly in which configuration bring ouit this issue.
I used synchronous mode and set the fixed delta seconds to 0.0005.

Hi @bpoebiapl,
Sorry, for the answer late.  Yes, we will check it and fix it for the next release. Thank you for notifying us.
@gsmario could you look into it.


The training notebook should allow resuming from an already created branch

Context: The training notebook assumes all the necessary data is available on the master branch. Thereby a new branch is created to push the model to Github.
Issue: In many cases, when new labeled data is added it makes sense to train the model right away. New data is added on a separate branch. So for the training notebook, the user must switch to the branch with the newly added data before training, and avoid creating another new branch. This is confusing.
Potential solution: Have a python widget in the training notebook specifying whether to create a new branch for training a model or for using an existing branch. A similar setup is already implemented here: https://github.com/nasaharvest/crop-mask/blob/namibia-data/notebooks/new_data.ipynb

@evamutz formalized our discussion yesterday into an issue. Let me know if this accurately reflects the issue at hand!

Stale


SPARKC-448: Fixed connector behaviour when connection.local_dc param is specified (1.5)

Build against Scala 2.10 finished with success

Build against Scala 2.11 finished with success


yoda

Current dependencies on/for this PR:

main

PR #154   👈

This comment was auto-generated by Graphite.


Task output is sometimes broken up unnecessarily

Sometimes task output is broken up unnecessarily with an extra header:
> Task :cleanUpCaches
Removing scripts cache directory : /Users/adam/gradle/projects/gradle-release/intTestHomeDir/worker-1/caches/4.8-20180510140000+0000/gradle-kotlin-dsl

> Task :cleanUpCaches
Removing scripts cache directory : /Users/adam/gradle/projects/gradle-release/intTestHomeDir/worker-1/caches/4.7/scripts-remapped
Removing scripts cache directory : /Users/adam/gradle/projects/gradle-release/intTestHomeDir/worker-1/caches/4.7/gradle-kotlin-dsl

We should figure out what's causing this and fix it.

This often happens for me when other tasks start and complete while some long running task is the "owner" of the console and those tasks do not produce any output.

You can see here that the "owner" is reset when any task finishes, regardless of whether the task wrote anything on completion: https://github.com/gradle/gradle/blob/a6730976b560d752184bfd90bf669f94be80fb88/subprojects/logging/src/main/java/org/gradle/internal/logging/sink/GroupingProgressLogEventGenerator.java#L129
This means that the next time the long running task writes something, we will write the header again.

PR: https://github.com/gradle/gradle/pull/5464


Redhat Open Shift

Create an account on open shift and deploy yappy.  This will use the databases on mongolab.

Created application yappy-makaretu.rhcloud.com


Fix bare_trait_objects warning

This fixes the bare_trait_objects warning by using &dyn error::Error instead of just &error::Error

Will make another pull request with a migration to the 2018 edition


cannot install to external ssd

Please paste the output of the following command here: sudo edit-chroot -all

not installed
Please describe your issue:
tried installing to external ssd but i get the nosymfollow error, but when i try to remount with symfollow i get mount point doesn't exist right after i created it

mount | grep Linux
/dev/sdb3 on /media/removable/Linux type ext4 (rw,nosuid,nodev,noexec,relatime,nosymfollow,dirsync,seclabel,stripe=8191,data=ordered)
If known, describe the steps to reproduce the issue:

Just remove the backsplash (\) between two folder paths from the remount command (with the \ character, bash will think that it is a directory named /media/removable/"Linux /media"/...)
And also, the mount command might not work with two paths provided, so pass one path per mount

When I do that I get /media/removable/Linux is not a block device

I found a way around this. lookup filetransfer.io to transfer files. Literally just had this exact problem.


[Question] Would you be interested in adding dungeon master tools?

I just stumbled across this, and couldn't believe how awesome it looks. I'm new to Pathfinder myself, but my DM has been looking for a tool kind of like this for a while now, and he just recently settled on roll20. While it's very full featured, it's a pretty terrible system (very slow, doesn't work on phones, ugly design).
I'd love to convince him to switch to this, but a big part of why he's using roll20 is their DM-ing tools. I know this is likely out of the scope of this particular project, but what would you think about building some form of companion app for the DM side of the game?
We haven't really started using roll20 yet, but from my limited experience, and poking around their website, I think this should cover a good portion of the features provided:

Private and group messaging
Sharing documents (including transcriptions)
Displaying maps, moving characters and NPCs around them, and showing/hiding sections based on a lighting model
Viewing/editing player character sheets (and keeping them in sync real-time)

I'm probably missing a lot of major features, I'll come back after I speak with him with more information.
I'm a professional web developer myself, and I'd be happy to work with you to build this. Granted, I mostly work on WordPress sites, but I'm semi-capable with JavaScript & Node, and I'm definitely open to learning more in order to get this thing up and running.
I may be getting ahead of myself, but I have some ideas floating around as to how this companion app could work in conjunction with awesomeSheet, and I'm just going to throw down some notes here:

Build with Node JS, allow serving either locally or via custom hosting
Authenticate with OAuth, prevents issues with storing usernames/password securely
Use Socket.io for a chat system and keeping character sheets in sync
Tweak save function to save to a database if configured to do so (for example, if a file database.json exists, save to the configured database as well as locally (keeping data in sync may be tricky), otherwise, continue to function exactly as it does)

Let me know what you think! I'll report back later this week with more information from my DM!

After talking with my DM last week, I think that recreating roll20 would be quite ambitious, and not something an individual or small team could likely take on on their own. Closing for now, but maybe at some point in the future it'll be worth reconsidering.

Hi, I'm happy you like using awesomeSheet, the project has been in development for a long time and I'm glad to see it being received well.
The ideas you have listed are very exciting and ambitious. I can see these and tools features would bring a lot of value to DM's and players alike. That being said my ability to realistically build and deliver them might not be as straight forward. I have limited time to commit to work like this and tend to only spend some free time outside of work developing awesomeSheet. Another tool/project would not be something I could commit to right now, especially as some of the ideas above very large in scope. I am familiar with roll20 and know that many of the skills needed to build something similar would be outside of my understanding and skill set.
That is not to say I wouldn't be very happy to contribute to a project of this type should you decide to begin work on it. I will happily commit to helping a new project with user experience and interface input, as these are my primary skills.
Some of the points you've listed have been said by others however, specifically the possible scope of viewing and editing character sheets within a group. This could be a small and more realistic step towards bringing value to users. Would having private and sharable sheets be something you might be interested in helping develop? A rough outline of scope would be:

user accounts with oAuth services (log in with fb / google etc. accounts)
view / editing sheets once logged in
associate a sheet with group (read, edit)
availability to save sheets to DB (maybe with versioning)
within a group, DM can edit other players sheets (maybe with versioning)
shared with groups or individuals

A lot of the above is, again, outside of my knowledge so would be a learning exercise but something I would be happy to commit it for long term development/additions.


In Keysanity, it would be useful to tell Tracker to mark unknown key, map, etc.

I noticed while playing Keysanity yesterday and while watching PKR play Keysanity today that it would be helpful to be able to tell Tracker that "a key", "a map", "a big key", or "a compass" is at a visible location like Lumberjack Cave or Spectacle Rock. Currently, I think she only marks it if you say the actual dungeon name, which you don't know yet.
If we end up allowing Tracker to mark things when the player uses a generic term for them, we could extend this to marking "a bottle" when the player sees a bottle with something in it.

Huh. I'm actually a bit surprised it doesn't already work because I thought I've seen generic small keys, boss keys, etc. in the item types. But maybe we don't have them specified in the configs they won't work.
That being said, even if we were to add them to the configs, we'd probably need to do something to avoid tracker complaining about it being something else.

This goes for bottles, too.

It's possible they're in there, but neither Pink nor I knew the right phrasing. I'll take a peek tomorrow.

Okay, yeah, ItemType does have values for generic keys, etc., but since they're not in the item pool, Tracker doesn't listen for them.


Exception Uncaught TypeError: Cannot read property 'location' of undefined

I tried to implement the code in another Angular 2 project. Although I think I included all the necessary code I get 'Uncaught TypeError: Cannot read property 'location' of undefined' in chrome console when HMR tries to check/update the code.
Stacktrace:
webpack-hmr.js:73 Uncaught TypeError: Cannot read property 'location' of undefined(anonymous function) @ webpack-hmr.js:73
hotApply @ bootstrap 1406622…:456
hotUpdateDownloaded @ bootstrap 1406622…:326
hotAddUpdateChunk @ bootstrap 1406622…:306webpack
HotUpdateCallback @ bootstrap 1406622…:2
(anonymous function) @ VM1024 0.1406622….hot-update.js:1
Any ideas?

what version of Angular 2 are you using?

RC1 with the deprecated router (from the beta).

are you returning the bootstrap function in your main function
function main(initialHMRstate) {
  // you must return
  return bootstrap(App, []);
}
/*
 * Hot Module Reload
 * experimental version by @gdi2290
 */
if (isDevelopment) {
  // activate hot module reload
  let ngHmr = require('angular2-hmr');
  ngHmr.hotModuleReplacement(main, module); // pass the main function
} else {
  // bootstrap when document is ready
  document.addEventListener('DOMContentLoaded', () => main());
}

Jep, I'll copy some of the code below:
in main.ts:
const providers: any[] = [
AUTH_PROVIDERS,
FIREBASE_APP_PROVIDERS,
ROUTER_PROVIDERS,
TASK_PROVIDERS,
APP_PROVIDERS
];
/* ORIGINAL
bootstrap(App, providers)
.then((appRef: ComponentRef) => {
AuthRouteHelper.injector(appRef.injector as ReflectiveInjector);
})
.catch((error: Error) => console.error(error));
*/
/WITH HMR/
export function main(initialHmrState?: any): Promise {
return bootstrap(App, providers)
.then((appRef: ComponentRef) => {
AuthRouteHelper.injector(appRef.injector as ReflectiveInjector);
})
.catch(err => console.error(err));
}
/*

Hot Module Reload
experimental version by @gdi2290
*/
let ngHmr = require('angular2-hmr');
ngHmr.hotModuleReplacement(main, module);

in package.json:
"dev": "cross-env NODE_ENV=development webpack-dev-server --progress --hot --inline --watch",

If you want I can provide a zip from the project...

you should always return in promises
you have a .then so you need to return the componentRef

Indeed, that solved the problem. Thanks!


Bug fix/optimizations 210918

improve arangorestore progress reporting a bit
rename MMFiles-specific test accordingly (test is not supposed to work with RocksDB at all)
speed up restoring of documents with primary key conflicts (fixes issue #6379)
changed some instances of !res.ok() to res.fail()
reuse existing ManagedDocumentResult instances, simplify its API a bit

http://jenkins01.arangodb.biz:8080/view/PR/job/arangodb-matrix-pr/1235/


python3Packages.skodaconnect: 1.1.18 -> 1.1.19

Motivation for this change
https://github.com/lendy007/skodaconnect/releases/tag/1.1.19
Things done

Built on platform(s)

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

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

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

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

2 packages built:

python310Packages.skodaconnect
python39Packages.skodaconnect


 I have been practicing rust for 4 months and wanted to be involved in the development. I know that writing a framework is not an easy task, but I could do assignments that fit the experience))) If you don't mind, please answer me

Thank you for the interest, but unfortunately, the API is probably still too unstable for code contributions.


ai-proxy nil error with bedrock misconfiguration

Is there an existing issue for this?

[X] I have searched the existing issues

Kong version ($ kong version)
Kong <IP_ADDRESS>
Current Behavior
nil error happen when aws_region is missing.
[kong] init.lua:427 [ai-proxy] /usr/local/share/lua/5.1/kong/llm/proxy/handler.lua:471: attempt to call field 'set_response_transformer_skipped' (a nil value)
Expected Behavior
Error detail on AWS auth config such as error authenticating with cloud-provider, AWS region not specified anywhere
Steps To Reproduce

in docker environment

with config of a route like plugins:
- name: ai-proxy
config:
route_type: llm/v1/chat
auth:
aws_access_key_id: MYKEY
aws_secret_access_key: MYSECRET
model:
provider: bedrock
name: anthropic.claude-3-haiku-20240307-v1:0
#options: # NO AWS_REGION CONFIG
#  bedrock: {"aws_region": "ap-northeast-1"}

call the route

Anything else?
I think https://github.com/Kong/kong/blob/c983384fb1aa96e0fe4774a31f7b363dcf185368/kong/llm/proxy/handler.lua#L461 should use disable_ai_proxy_response_transform

hi @t-yuki thanks for report, it seems a function typo here. I think your advice might be right.
Could you open a pull request for this? We warmly welcome community users to submit PRs to us, and we are also happy to help with reviews.


Typo in weffe script

In line 70 the modprobe parameters contain exlusive_caps - instead of exclusive_caps.

Thanks for pointing this out! It's pretty late where I live and I can take care of it tomorrow. If you'd like though, you're more than welcome to make a pull request with the change.


Question: How to write UINT32 bit register?

Hey guys I need to send UINT32 value to an address. How do I do that? I see that WriteSingleRegister and all other writing methods accept ushort which is UINT16

see extension methods in namespace Modbus.Extensions.Enron

Awesome!


Can't go to definition when trying to go to function in other module

Hi! I'm trying out this plugin, but I can't seem to do vim.lsp.buf.definition() to jump to functions in other modules.
To reproduce,

Clone https://github.com/robsonpeixoto/elixir-ls-go-to-definition-bug.

Open lib/bug.ex  with the config below

In lib/bug.ex, move your scursor to ModA.say_hi() and call :=vim.lsp.buf.definition(). Here's what the file looks like:
defmodule Bug do
  use MacroA

  def hello do
    ModA.say_hi()
  end
end

Nothing happens

Here's the minimal config that I'm using:

Click to expand
local root = vim.fn.fnamemodify("./.repro", ":p")
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

local plugins = {
  {
    "elixir-tools/elixir-tools.nvim",
    version = "*",
    event = { "BufReadPre", "BufNewFile" },
    config = function()
      local elixir = require("elixir")
      local elixirls = require("elixir.elixirls")

      elixir.setup {
        projectionist = {
          enable = false
        }
      }
    end,
    dependencies = {
      "nvim-lua/plenary.nvim",
    },
  }
}

require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

It does however work when navigating to symbols in the same file, like if I would try to go to hello() in that file.

@mhanberg The output of :ElixirOutputPanel contains this:
[Warning] error: module MacroA is not loaded and could not be found
└─ nofile: Bug (module)

Here's the full log:

Click to expand
[Info] Started ElixirLS v0.22.0
[Info] Running in /home/melker/code/elixir-ls-go-to-definition-bug
[Info] ElixirLS built with elixir "1.17.3" on OTP "27"
[Info] Running on elixir "1.17.3 (compiled with Erlang/OTP 27)" on OTP "27"
[Info] Protocols are not consolidated
[Info] Elixir sources not found (checking in /build/elixir/src/elixir-1.17.3). Code navigation to Elixir modules disabled.
[Info] Received client configuration via workspace/configuration
%{"dialyzerEnabled" => true, "enableTestLenses" => false, "fetchDeps" => false, "suggestSpecs" => false}
[Info] Client does not support workspace/didChangeConfiguration dynamic registration
[Info] Client does not support workspace/didChangeWatchedFiles dynamic registration
[Info] Received workspace/didChangeConfiguration
[Info] Received client configuration via workspace/didChangeConfiguration
%{"dialyzerEnabled" => true, "enableTestLenses" => false, "fetchDeps" => false, "suggestSpecs" => false}
[Info] Starting build with MIX_ENV: test MIX_TARGET: host
[Info] Loaded DETS databases in 23ms
[Warning] error: module MacroA is not loaded and could not be found
└─ nofile: Bug (module)

[Info] Loaded DETS databases in 1ms
[Warning] ** (ErlangError) Erlang error: "CompileError during metadata build pre:\nnofile: cannot compile file (errors have been logged)\nast node: {:use, [end_of_expression: [newlines: 2, line: 2, column: 13], line: 2, column: 3], [{:__aliases__, [last: [line: 2, column: 7], line: 2, column: 7], [:MacroA]}]}"
    (elixir 1.17.3) src/elixir_expand.erl:102: :elixir_expand.expand/3
    (elixir 1.17.3) src/elixir_expand.erl:579: :elixir_expand.expand_block/5
    (elixir 1.17.3) src/elixir_expand.erl:46: :elixir_expand.expand/3
    (elixir 1.17.3) src/elixir.erl:455: :elixir.quoted_to_erl/4
    (elixir 1.17.3) src/elixir.erl:332: :elixir.eval_forms/4
    (elixir 1.17.3) lib/module/parallel_checker.ex:112: Module.ParallelChecker.verify/1
    (elixir 1.17.3) lib/code.ex:572: Code.validated_eval_string/3
    (elixir_sense 2.0.0) lib/elixir_sense/core/macro_expander.ex:24: ElixirSense.Core.MacroExpander.require_and_expand/2
    (elixir 1.17.3) lib/macro.ex:639: anonymous fn/4 in Macro.do_traverse_args/4
    (stdlib 6.0.1) lists.erl:2343: :lists.mapfoldl_1/3
    (elixir 1.17.3) lib/macro.ex:604: Macro.do_traverse/4
    (stdlib 6.0.1) lists.erl:2343: :lists.mapfoldl_1/3
    (elixir 1.17.3) lib/macro.ex:604: Macro.do_traverse/4
    (elixir_sense 2.0.0) lib/elixir_sense/core/macro_expander.ex:18: ElixirSense.Core.MacroExpander.expand_use/4
    (elixir_sense 2.0.0) lib/elixir_sense/core/state.ex:1690: ElixirSense.Core.State.expand/3

[Log] Compiling 3 files (.ex)
[Log] Generated bug app
[Info] Compile took 107 milliseconds
[Info] Starting build with MIX_ENV: test MIX_TARGET: host
[Info] [ElixirLS WorkspaceSymbols] Indexing...
[Info] [ElixirLS WorkspaceSymbols] Module discovery complete
[Info] [ElixirLS WorkspaceSymbols] 0 symbols added to index in 0ms
[Info] Compile took 58 milliseconds
[Info] Updating incremental PLT
[Info] Incremental PLT updated in 1273ms, changed 0 modules, analyzed 0, 0 warnings found
[Info] Loaded PLT info in 1377ms
[Info] Dialyzer analysis is up to date

I apologize if I'm doing something dumb here, I just started using Elixir, so I'm a complete novice.

I see, you might want to take this to the ElixirLS repo to ask.
This plugin merely handles starting and configuring it for you.
But, as a community we are starting a new LSP initiative and are working on a new official one, so support on the existing ones is reduced as we push forward.


Fix fragment links in testing stores page

Tested with deploy preview
Issue

JFYI: you can link a PR to an issue by using GitHub keywords, so that the issue will be closed automatically when the PR is merged, and authros don't have to manage their association manually.

JFYI: you can link a PR to an issue by using GitHub keywords, so that the issue will be closed automatically when the PR is merged, and authors don't have to manage their association manually.

Thanks for the tip. I know I can do it, but i was in hurry and I'm more familiar with gitlab.


No 1.3.1 JAR File on Maven Repository

I am unable to download the necessary dependencies for Version 1.3.1 because there is no JAR file for the same on Maven Repository. I have it downloaded through Maven on my Macbook but am unable to repeat the same process on a Linux machine. Any help would be appreciated.

Thanks for bringing this to our attention; not sure why or how this happened.  We are in the process of putting together a 1.3.2 release and hopefully that will resolve this.

Any update on this?

We've had some internal build pipeline issues that we're still working through.  Hoping to have the source pushed this week and the maven push ironed out early next week.

1.3.2 should be in maven central now.


refactor: implement shared behaviors between program calls

This PR uses a macro to implement shared behaviors between ScriptCalls and ContractCalls.
This is dependent on #781.

I agree with your point about the macro not being necessary. My design process was: trying to use compositon, realizing it would be hard, implementing a trait, implementing the macro, removing the trait. Now I'll try composition again, I didn't think of making it a component of ContractCall directly, I was trying to compose inside of ContractCallHandler.


New arch: Solved jetson problem. memory leak, and changed the architecture a little

Hi,
I solved the problem with jetson - cuda context and related stuff was messed up, needed architecture to be changed a little bit to solve (Thread related stuff). There was also some problems with freeing pycuda driver in the correct moment to let objects be destroyed in the right place (It caused some memory leaks that are fixed now). I have tested all the docker files except for coral-dev-board.
I also removed RESTART from api and commands in core, as now the engine is built only when needed, while processing the video. I have not tested API's set for changing the video path but it should work.
Let me know if there was any problems.

Thanks for your PR @JsonSadler


Additional flake8 checks

Adds checks for whitespace after commas and around operators.
Adds check for import * module imports.
Cleans up all instances of import *.
Removes doc/source/examples directory from flake8 check, since this is .gitignore as well.

Curious, ci-build isn't showing up here.

@akaszynski any idea what the issue is with the doc build?

Sphinx parallel build error:
NameError: name 'warnings' is not defined
make: *** [Makefile:25: html] Error 2
make: Leaving directory '/home/runner/work/PyAEDT/PyAEDT/doc'

It is most likely a module import issue from something I changed, but it isn't clear to me where the module is trying to be imported from.

Documentation build is on Linux and it seems that the module can't be imported within Linux.  I'm pushing a minor change that checks to see if we can first import the module to make the docbuild easier to debug.