WebpackError: ReferenceError: window is not defined

Bug Report
Describe the bug
Not able to generate build. Trying to deploy documentaiton live
A clear and concise description of what the bug is.
To Reproduce

docz build

FOR BUGS: Insert debug trace
 ERROR #95312

"window" is not available during server side rendering.

See our docs page for more info on this error: https://gatsby.dev/debug-html

  21 |  // to operate correctly into non-standard environments
  22 |  // @see https://github.com/webpack-contrib/style-loader/issues/177
> 23 |  return window && document && document.all && !window.atob;
     | ^
  24 | });
  25 |
  26 | var getTarget = function (target, parent) {

  WebpackError: ReferenceError: window is not defined

  - addStyles.js:23
    node_modules/style-loader/lib/addStyles.js:23:1

  - addStyles.js:12
    node_modules/style-loader/lib/addStyles.js:12:1

  - addStyles.js:80 ./node_modules/style-loader/lib/addStyles.js.module.exports
    node_modules/style-loader/lib/addStyles.js:80:1

  - buttons.scss?d045:16 Object.../src/components/Button/buttons.scss
    src/components/Button/buttons.scss?d045:16:82

  - index.js:1 Module.../src/components/Button/index.js
    src/components/Button/index.js:1:1

⠋ Building static HTML for pages
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

In order to allow us to quickly reproduce you issue please include a link to a reproduction repository.
Expected behavior
sucessful build
A clear and concise description of what you expected to happen..
Environment

OS: [e.g. OSX 10.13.4]
Node/npm version: [e.g. Node v10.15.3/npm 6.4.1]

This looks like one of your dependencies is expecting window to be there. However Gatsby renders your app using node to generate the markup and you can't expect window to be defined at all times.
More info here.

@BTARPAR Can you supply us with some more information about your project? Do you have a link to your project?
Looks like you are using sass, are you using some custom webpack config for it or are you running create-react-app?

@jesperorb  Yes I am using sass and for sass, I am using webpack loaders
{
test: /.(scss|css)$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
modules: {
mode: 'local',
localIdentName: 'my-app__[local]'
}
}
},
'sass-loader'
]
}

I'm running into a similar problem. Here's a barebones repo with instructions on how to reproduce the error. Adding style-loader (in order to compile .scss files) seems to be the problem.
https://github.com/deammer/docz-test

Thank you @deammer 🙂
Try installing isomorphic-style-loader
yarn add isomorphic-style-loader --dev

And exchanging style-loader to isomorphic-style-loader in gastby-node.js:
exports.onCreateWebpackConfig = ({ actions }) => {
  const extraConfig = {
    module: {
      rules: [
        {
          test: /\.(scss)$/,
          use: ['isomorphic-style-loader', "css-loader", "sass-loader"]
        }
      ]
    }
  };

  actions.setWebpackConfig(extraConfig);
};

Not ideal but seems to work.

I replaced all my style-loader in webpack , and gatsby-node.js but still giving me the same error

Did you try removing .docz-folder after you installed the new package and replaces your webpack config?
That package worked in @deammer repo so I thought it would work for you. You can try if this works (i haven't tried it):
Install gatsby-plugin-sass
yarn add node-sass gatsby-plugin-sass

Create a gatsby-config.js in your root with the following:
module.exports = {
 plugins: [`gatsby-plugin-sass`]
}

And remove your your rules for scss in your webpack config.

@jesperorb  I've tried the way you mentioned in the previous comment. But I am getting GRAPHQL ERROR

Same error on the when I do docz dev

@BTARPAR Check this issue and see if any solutions in the issue helps: https://github.com/doczjs/docz/issues/1007

@jesperorb thank you for your help! I didn't like the isomorphic-style-loader because it required extra code to work properly. Using gatsby-plugin-sass worked best.

@jesperorb  I've tried to follow that issue but still, no luck  getting the same error with the 404 page

Is this success build?

I was able to do docz dev  "docz": "^2.0.0-rc.42" but when I upgrade it to "docz": "^2.0.0-rc.53", I am not able to docz dev and also got GRAPHQL ERROR

Hey @BTARPAR
Does "docz": "^2.0.0-rc.52" work ?
Also can you copy the output of the command below
rm -rf node_modules yarn.lock .docz && yarn add docz@next && yarn docz dev

I've checked 42,44 to 53 with below command non of them worked. (I'll try one more time with your command)
rm -rf node_modules yarn.lock .docz &&  yarn docz dev

@rakannimer I've tried your command with "docz": "^2.0.0-rc.52" but did not work have the same error GRAPHQL (https://github.com/doczjs/docz/issues/1118#issuecomment-539160355)

can you copy the output here of the command below

rm -rf node_modules yarn.lock .docz && yarn add docz@next && yarn docz dev

I think we need more information to be able to properly help instead of guessing.
Could you provide a repository with a minimal reproduction of your problem and we can continue working from there ?

@rakannimer sure, I'll do that this weekend and let you know

@rakannimer @jesperorb here is a repo, where u was able to reproduce the error
https://github.com/BTARPAR/DOCZ

@BTARPAR can you please check https://github.com/BTARPAR/DOCZ/pull/1
It fixes the GraphQL error you referenced. After that the build fails because of some directories you did not include in the demo like config.

@rakannimer updated the repo you can find the missing file now

Your repo is working correctly on my side after removing gatsby-theme-docz 1.2.0
What's the error you're getting ?

Ii am getting the error mentioned on the top

Did you try the PR I referenced : BTARPAR/DOCZ#1 ?

docz dev this worked for me as well try to do docz build

I tried @jesperorb's solution of replacing style-loader with isomorphic-style-loader and building using it works.

Merge https://github.com/BTARPAR/DOCZ/pull/2
pull from master
rm -rf .docz && yarn docz build

Yes, it worked for me as well let me see how it goes on my main project. Since this project works with docz I'll try to move my old stuff here and see how it goes. Wish me luck @rakannimer

Hey @BTARPAR
Did you get the chance to confirm docz works with your codebase ?

Good News latest version worked guys. It still has the issue but that definitely looks like on my side but build worked and dev also worked. I am closing this issue for now. If anything come up I'll let you know guys.
Thank You @rakannimer @jesperorb  for this

Same error, I have components using window, I cannot import them because of the SSR done by gatsby, I've tried their workaround in the documentation, nothing has worked so far.

I'm also in a situation like this, I want to use cytoscape-dagre and having an import error:
   8 | 	else
   9 | 		root["cytoscapeDagre"] = factory(root["dagre"]);
> 10 | })(window, function(__WEBPACK_EXTERNAL_MODULE__4__) {
     |  ^
  11 | return /******/ (function(modules) { // webpackBootstrap
  12 | /******/ 	// The module cache
  13 | /******/ 	var installedModules = {};

  WebpackError: ReferenceError: window is not defined

  - cytoscape-dagre.js:10
    node_modules/cytoscape-dagre/cytoscape-dagre.js:10:2

I'm also in a situation like this, I want to use cytoscape-dagre and having an import error:
   8 | 	else
   9 | 		root["cytoscapeDagre"] = factory(root["dagre"]);
> 10 | })(window, function(__WEBPACK_EXTERNAL_MODULE__4__) {
     |  ^
  11 | return /******/ (function(modules) { // webpackBootstrap
  12 | /******/ 	// The module cache
  13 | /******/ 	var installedModules = {};

  WebpackError: ReferenceError: window is not defined

  - cytoscape-dagre.js:10
    node_modules/cytoscape-dagre/cytoscape-dagre.js:10:2

in my case: https://www.gatsbyjs.com/docs/debugging-html-builds/#fixing-third-party-modules works.

Working Solution after spending 3 hours
"dependencies": {
"docz": "^2.3.1",
"gatsby-plugin-sass": "^3.2.0",
........
},
// gatsby-config.js
module.exports = {
// To fix the SCSS Errors
plugins: [gatsby-plugin-sass],
// This has impressed me a lot
flags:{
DEV_SSR:false
}
}


Makefile: fix src path for local pandoc builds

found that the the / redundant, and makes the path /header.html for local pandoc builds.
Signed-off-by: Vincent Batts<EMAIL_ADDRESS>

LGTM ok mr batts

LGTM


Read the docs

Migrate README to https://readthedocs.org/

Coverage remained the same when pulling ce6276617f2639d46b979767c82962adfc37f6b4 on krismolendyke:readthedocs into fa0f36436d16f9b6e1b76b0f907aed45a5dadfa8 on monetate:master.

Coverage remained the same when pulling 60cc63096e62b8578203cd67e7b5208cf96589cf on krismolendyke:readthedocs into fa0f36436d16f9b6e1b76b0f907aed45a5dadfa8 on monetate:master.

Coverage remained the same when pulling 62cd9adde7c4745c1f6595f88b46ce8d48891933 on krismolendyke:readthedocs into fa0f36436d16f9b6e1b76b0f907aed45a5dadfa8 on monetate:master.


apollo-fullstack-react-postgres-ts template project error

Module:
Version:
Node.js / npm versions:
Example/snippet of the model that is causing issue

Straight out of the box, using 'apollo-fullstack-react-postgres-ts' project template, you can't create Notes using the example Create Note form, since datamodel.graphql uses "_id: ID!"
However according to 'isAutoPrimaryKey' an auto primary key can only be called "_id" if its GraphbackObjectID type, other it needs to be "id" if its "ID".
Modifying the schema to use "id: ID!" and regenerating fixes the issue.
For reference, upon the 'Add Note' button click, you get
'Unhandled Rejection (Error): Response not successful: Received status code 400'
and the stack trace in the Response, in Web Developer is
{
"stacktrace": [
"GraphQLError: Variable "$input" got invalid value { title: "fdujifdhiu", description: "985478975498745" }; Field "_id" of required type "ID!" was not provided.",
"    at /home/andy/src/fas-app/node_modules/graphql/execution/values.js:116:15",
"    at coerceInputValueImpl (/home/andy/src/fas-app/node_modules/graphql/utilities/coerceInputValue.js:100:11)",
"    at coerceInputValueImpl (/home/andy/src/fas-app/node_modules/graphql/utilities/coerceInputValue.js:56:14)",
"    at coerceInputValue (/home/andy/src/fas-app/node_modules/graphql/utilities/coerceInputValue.js:39:10)",
"    at _loop (/home/andy/src/fas-app/node_modules/graphql/execution/values.js:109:69)",
"    at coerceVariableValues (/home/andy/src/fas-app/node_modules/graphql/execution/values.js:121:16)",
"    at getVariableValues (/home/andy/src/fas-app/node_modules/graphql/execution/values.js:50:19)",
"    at buildExecutionContext (/home/andy/src/fas-app/node_modules/graphql/execution/execute.js:206:61)",
"    at executeImpl (/home/andy/src/fas-app/node_modules/graphql/execution/execute.js:104:20)",
"    at Object.execute (/home/andy/src/fas-app/node_modules/graphql/execution/execute.js:63:35)"
]
}
Install log was:::
andy@andy-ThinkPad-X1-Carbon-4th:~/src$ npx create-graphback fas-app
npx: installed 134 in 6.341s

/ |  _ __    __ _   _ __   | |   | |_     __ _    ___  | | __
| |  _  | '|  /  | | '_ \  | '_ \  | '_ \   / _ |  / __| | |/ /
| || | | |    | (| | | |) | | | | | | |) | | (| | | (  |   <
_| ||     _,| | ./  || || |_./   _,|  ___| ||_
||
create-graphback can create your app from following templates:
apollo-fullstack-react-postgres-ts:
Apollo GraphQL Server connecting to Postgres database and React client using TypeScript
apollo-fullstack-react-mongo-ts:
Apollo GraphQL Server connecting to Mongo database and React client using TypeScript
apollo-mongo-server-ts:
Apollo GraphQL Server connecting to Mongo database using TypeScript
apollo-mongo-datasync-server-ts:
Apollo GraphQL Server connecting to Mongo database using TypeScript. Contains Data Synchronization features.
apollo-postgres-server-ts:
Apollo GraphQL Server connecting to Postgres database using TypeScript
[PREVIEW] apollo-mongo-apache-kafka-server-ts:
Apollo GraphQL server connecting to MongoDB database with Apache Kafka for subscriptions. This is a preview template - we are continuing to enhance it - we welcome your feedback.
? Choose a template to bootstrap apollo-fullstack-react-postgres-ts
Bootstraping graphql server 💫 ✨
✔ Downloading starter from https://api.github.com/repos/aerogear/graphback/tarball/templates-1.0.0
✔ Extracting content to /home/andy/src/fas-app/client
✔ Downloading starter from https://api.github.com/repos/aerogear/graphback/tarball/templates-1.0.0
✔ Extracting content to /home/andy/src/fas-app/
GraphQL server successfully bootstrapped 🚀
Next Steps:

Change directory into project folder - cd fas-app
Follow template README.md to start server

Can I fix this bug with your permission?

Can I fix this bug with your permission?

I though I left comment here. Issue is that we use single client app for mongo and postgress. For mongo we use more specialized scalar for data and it looks like package bump introduced some coupling.

I though I left comment here. Issue is that we use single client app for mongo and postgress. For mongo we use more specialized scalar for data and it looks like package bump introduced some coupling.

Modifying the schema to use "id: ID!" and regenerating fixes the issue.

Do you mean the datamodel? Cause I changed _id to id in the datamodel and starting the server after running yarn generate gave me this error:
npm run develop

><EMAIL_ADDRESS>develop /home/arsh/PracticeProjects/postgres-test/postgres-test-2
> ts-node src/index.ts

🚀  Server ready at http://localhost:4000/graphql
(node:44594) UnhandledPromiseRejectionWarning: error: ALTER TABLE "public"."note" DROP CONSTRAINT "note_pkey" - cannot drop constraint note_pkey on table note because other objects depend on it
    at Parser.parseErrorMessage (/home/arsh/PracticeProjects/postgres-test/postgres-test-2/node_modules/pg-protocol/src/parser.ts:357:11)
    at Parser.handlePacket (/home/arsh/PracticeProjects/postgres-test/postgres-test-2/node_modules/pg-protocol/src/parser.ts:186:21)
    at Parser.parse (/home/arsh/PracticeProjects/postgres-test/postgres-test-2/node_modules/pg-protocol/src/parser.ts:101:30)
    at Socket.<anonymous> (/home/arsh/PracticeProjects/postgres-test/postgres-test-2/node_modules/pg-protocol/src/index.ts:7:48)
    at Socket.emit (events.js:314:20)
    at Socket.EventEmitter.emit (domain.js:483:12)
    at addChunk (_stream_readable.js:297:12)
    at readableAddChunk (_stream_readable.js:272:9)
    at Socket.Readable.push (_stream_readable.js:213:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
(node:44594) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:44594) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:44594) UnhandledPromiseRejectionWarning: error: alter table "public"."comment" drop constraint "comment_noteid_foreign" - current transaction is aborted, commands ignored until end of transaction block
    at Parser.parseErrorMessage (/home/arsh/PracticeProjects/postgres-test/postgres-test-2/node_modules/pg-protocol/src/parser.ts:357:11)
    at Parser.handlePacket (/home/arsh/PracticeProjects/postgres-test/postgres-test-2/node_modules/pg-protocol/src/parser.ts:186:21)
    at Parser.parse (/home/arsh/PracticeProjects/postgres-test/postgres-test-2/node_modules/pg-protocol/src/parser.ts:101:30)
    at Socket.<anonymous> (/home/arsh/PracticeProjects/postgres-test/postgres-test-2/node_modules/pg-protocol/src/index.ts:7:48)
    at Socket.emit (events.js:314:20)
    at Socket.EventEmitter.emit (domain.js:483:12)
    at addChunk (_stream_readable.js:297:12)
    at readableAddChunk (_stream_readable.js:272:9)
    at Socket.Readable.push (_stream_readable.js:213:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
(node:44594) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
^C

This means simply changing _id to id in the datamodel for the postgres template would not work. Also creating notes works when done using graphql playground so I guess something needs to be changed in the client template right @wtrocki?

Modifying the schema to use "id: ID!" and regenerating fixes the issue.

Do you mean the datamodel? Cause I changed _id to id in the datamodel and starting the server after running yarn generate gave me this error:
npm run develop

><EMAIL_ADDRESS>develop /home/arsh/PracticeProjects/postgres-test/postgres-test-2
> ts-node src/index.ts

🚀  Server ready at http://localhost:4000/graphql
(node:44594) UnhandledPromiseRejectionWarning: error: ALTER TABLE "public"."note" DROP CONSTRAINT "note_pkey" - cannot drop constraint note_pkey on table note because other objects depend on it
    at Parser.parseErrorMessage (/home/arsh/PracticeProjects/postgres-test/postgres-test-2/node_modules/pg-protocol/src/parser.ts:357:11)
    at Parser.handlePacket (/home/arsh/PracticeProjects/postgres-test/postgres-test-2/node_modules/pg-protocol/src/parser.ts:186:21)
    at Parser.parse (/home/arsh/PracticeProjects/postgres-test/postgres-test-2/node_modules/pg-protocol/src/parser.ts:101:30)
    at Socket.<anonymous> (/home/arsh/PracticeProjects/postgres-test/postgres-test-2/node_modules/pg-protocol/src/index.ts:7:48)
    at Socket.emit (events.js:314:20)
    at Socket.EventEmitter.emit (domain.js:483:12)
    at addChunk (_stream_readable.js:297:12)
    at readableAddChunk (_stream_readable.js:272:9)
    at Socket.Readable.push (_stream_readable.js:213:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
(node:44594) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:44594) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:44594) UnhandledPromiseRejectionWarning: error: alter table "public"."comment" drop constraint "comment_noteid_foreign" - current transaction is aborted, commands ignored until end of transaction block
    at Parser.parseErrorMessage (/home/arsh/PracticeProjects/postgres-test/postgres-test-2/node_modules/pg-protocol/src/parser.ts:357:11)
    at Parser.handlePacket (/home/arsh/PracticeProjects/postgres-test/postgres-test-2/node_modules/pg-protocol/src/parser.ts:186:21)
    at Parser.parse (/home/arsh/PracticeProjects/postgres-test/postgres-test-2/node_modules/pg-protocol/src/parser.ts:101:30)
    at Socket.<anonymous> (/home/arsh/PracticeProjects/postgres-test/postgres-test-2/node_modules/pg-protocol/src/index.ts:7:48)
    at Socket.emit (events.js:314:20)
    at Socket.EventEmitter.emit (domain.js:483:12)
    at addChunk (_stream_readable.js:297:12)
    at readableAddChunk (_stream_readable.js:272:9)
    at Socket.Readable.push (_stream_readable.js:213:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
(node:44594) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
^C

This means simply changing _id to id in the datamodel for the postgres template would not work. Also creating notes works when done using graphql playground so I guess something needs to be changed in the client template right @wtrocki?

@RinkiyaKeDad problem is related to the UI/client application - server will work fine.
Client app uses schema and generates queries. Etc.

@RinkiyaKeDad problem is related to the UI/client application - server will work fine.
Client app uses schema and generates queries. Etc.

@RinkiyaKeDad , yes you need to make some minor fixes in the client. Changing from _id to id.
client/src/components/notes/
client/src/components/comments/
etc
The console will tell you.
You also should not rely on trying to get auto-migration working with the primary key changing. Blow the db away and start again. Much easier.
I could upload my changes @wtrocki  ? Should i issue a pull ?

@RinkiyaKeDad , yes you need to make some minor fixes in the client. Changing from _id to id.
client/src/components/notes/
client/src/components/comments/
etc
The console will tell you.
You also should not rely on trying to get auto-migration working with the primary key changing. Blow the db away and start again. Much easier.
I could upload my changes @wtrocki  ? Should i issue a pull ?

I got little bit confused so I would really appreciate PullRequest

I got little bit confused so I would really appreciate PullRequest

@RinkiyaKeDad problem is related to the UI/client application - server will work fine.

So should I replace _id with id in the client template? But that would make it stop working with MongoDB no?

@RinkiyaKeDad problem is related to the UI/client application - server will work fine.

So should I replace _id with id in the client template? But that would make it stop working with MongoDB no?

The same client is used in mongodb and postgress backend. Thus _id is needed.
This might be confusing for postgres devs who use id but that is just example app limitation - developers can use any schema they want. We still wanted to keep some client APP but I would also think if there is value in maintaining this considering it put some requirements to keep the same schema and it will break if schema is changed even slightly.
CC @craicoverflow WDYT?

The same client is used in mongodb and postgress backend. Thus _id is needed.
This might be confusing for postgres devs who use id but that is just example app limitation - developers can use any schema they want. We still wanted to keep some client APP but I would also think if there is value in maintaining this considering it put some requirements to keep the same schema and it will break if schema is changed even slightly.
CC @craicoverflow WDYT?

What about having two separate client templates based on the database? We would just need to replace _id in one and then none should break regardless of schema changes.

What about having two separate client templates based on the database? We would just need to replace _id in one and then none should break regardless of schema changes.

My thought was also to have 2 separate clients. The problem with that is it multiples the maintenance burden. Both clients will be exactly the same except for the ID, so both will need to be kept in sync manually.

My thought was also to have 2 separate clients. The problem with that is it multiples the maintenance burden. Both clients will be exactly the same except for the ID, so both will need to be kept in sync manually.

How about using the same client but replacing instances of _id with an environment variable and we'll provide a different .env file for mongodb and postgres? That way we won't have to maintain two clients.

How about using the same client but replacing instances of _id with an environment variable and we'll provide a different .env file for mongodb and postgres? That way we won't have to maintain two clients.

How about using the same client but replacing instances of _id with an environment variable and we'll provide a different .env file for mongodb and postgres? That way we won't have to maintain two clients.

This won't work as environment variables cannot be used inside a GraphQL schema file.
What could work for this is adding a @autoIncrements annotation to Graphback which is a way to explicitly say this field should be an auto-incrementing field.
Although I feel that this is us treating a symptom of the design instead of a solution.
Have a think about other ideas and feel free to share them here so we can discuss @RinkiyaKeDad :)

How about using the same client but replacing instances of _id with an environment variable and we'll provide a different .env file for mongodb and postgres? That way we won't have to maintain two clients.

This won't work as environment variables cannot be used inside a GraphQL schema file.
What could work for this is adding a @autoIncrements annotation to Graphback which is a way to explicitly say this field should be an auto-incrementing field.
Although I feel that this is us treating a symptom of the design instead of a solution.
Have a think about other ideas and feel free to share them here so we can discuss @RinkiyaKeDad :)

After discussion on discord we've decided to have the client app working with postgres only (and not mongo) since we will still have client-side queries for testing. Will be raising a PR for the same.

After discussion on discord we've decided to have the client app working with postgres only (and not mongo) since we will still have client-side queries for testing. Will be raising a PR for the same.


Use strict mode

Codecov Report

Merging #196 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master    #196   +/-   ##
======================================
  Coverage    98.3%   98.3%
======================================
  Files           5       5
  Lines         471     471
======================================
  Hits          463     463
  Misses          8       8

Impacted Files
Coverage Δ

lib/manager.js
96.55% <ø> (ø)
:arrow_up:

lib/collection.js
98.69% <ø> (ø)
:arrow_up:

lib/helpers.js
100% <ø> (ø)
:arrow_up:

lib/monk.js
100% <ø> (ø)
:arrow_up:

lib/util.js
100% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


Italic text versus width

Looking at tag 0200, you see (at least in Chrome, on a laptop) that the "may" is cut off in the middle of the y, and that it is possible to wiggle around an epsilon amount by scrolling the tag display. Neither should happen in this example.
@chngr mentioned this problem before, but I forgot about this. Sorry!

Adding some padding might do the trick according to some googling, will try later.

This is done in af3f046. At least all the text I see now is on the screen!


New version available only links to next version not latest version

It only shows 2.1.1 instead of 2.2.1( latest version )

I have reset the version number, should be ok now.


Works with StaggeredGridLayoutManager?

Can't see anything that says it does or does not work.
Would appreciate confirmation so I don't spend days trying to get it to work if it simply is not possible.
Dragging seems to currently work, it just won't drop.
Thank you.

Hi. Thank you for good question.
This library does not support drag&drop feature for now, but I guess that feature can be implemented because Google's Keep app implement it based on RecyclerView (maybe). I will try it on this weekend.

Hi @kuffs. I have just pushed an experimental branch which supports StaggeredGridLayoutManager.

https://github.com/h6ah4i/android-advancedrecyclerview/tree/feature/support_staggered_grid_drag_drop

You can try the latest library through JitPack:
repositories {
    maven { url "https://jitpack.io" }
}

dependencies {
    compile 'com.github.h6ah4i:android-advancedrecyclerview:d9264bb4e992762c2ce90a6a2f99c4d3228add40'
}

I'll give that a try. Thank you.


--standalone does not appear to work

I am compiling my Imba code using watch --standalone, but the Imba runtime is not being embedded. You can see that tag$ and q$$ are not defined in this script.

If I just use require "imba" at the top that works. Is this flag deprecated, perhaps?


Allow u8 and u16 to be used as the length of Vec-based containers (3rd time's the charm)

Same PR as #206, targeting the master branch. Still addresses #139.

Hi @YuhanLiin, thank you for the PR!
Great work, but unfortunately I have to say that I cannot merge this.
I cannot motivate the code complexity vs the very small memory gain for a Vec, or containers based on it.
The use-case where one is dependent on this optimization is only if you have an enormous amount of Vecs, and for this use-case I'd recommend to make a special implementation for this specific use-case.
Thank you again for your hard work!

Would it be possible to close #139 as well since that's the issue this PR is addressing? It would prevent future maintainers from attempting a similar patch.

Absolutely, thanks for pointing that out!


Adding a first version for the terminology page!

See #52!

Warning, there may be conflicts to fix between this branch and fix/#23 on the index.md page!

Hop! Ready for merge!


Higher dimensional data leads to exploding likelihood

Hey,
while playing around I stumbled upon some behavior that I can't quite explain to myself. I implemented the flow
from nflows import transforms, distributions, flows
from nflows.transforms.autoregressive import MaskedPiecewiseRationalQuadraticAutoregressiveTransform as AutoregRQS

modules = []
for i in range(n_layers):
	modules.extend([AutoregRQS(features=24, num_bins=10, hidden_features=8, tails='linear', tail_bound=5),
	transforms.LULinear(24)])
modules.pop()
transform = transforms.CompositeTransform(modules)
base_distribution = nflows.distributions.StandardNormal(shape=[24])
flow = flows.Flow(transform=transform, distribution=base_distribution)

and used the negative log likelihood loss
def nll(batch, model):
    log_prob = -1 * model.log_prob(batch).mean(0)
    return log_prob

to train it on this dataset from the planar_datasets.py:
training_dataset = FourCircles(50000).data
training_dataset = target_dataset.repeat(1, 12)

As you can see, I repeated the dataset on purpose to blow up the dimensionality of the problem. When I keep the dataset in its regular 2-D form, everything works fine. But in this version, after training for 2 epochs (Adam optimizer, lr 0.001, cosine annealing, batch size 64), my loss goes down to as low as -45. It goes even lower if I train longer. That means my likelihood must be > e^45, which should not happen.
The reason might be a conceptual misunderstanding on my side, as I also ran into this issue with a custom implemented Masked Autoregressive Flow. I hoped I have a bug and using the nflows framework to implement my model and log_prob() computation eradicates this issue, but unfortunately this did not happen.
Any ideas how this can be explained?
Cheers :)
EDIT:
I made some more observations that might help to clearify this: In such a high dimensional space, the density of the base distribution is embedded in a larger volume and hence the likelihoods of noise points becomes very small everywhere. This leads to a greater influence of the jacobian determinant on the negative log likelihood and ultimately to it blowing up.

Consider a 2D density, where x₁ comes from a standard normal and x₂=x₁. What is the true density? It's zero everywhere, except on the line x₁=x₂. That line has zero area, so the true density on that line must be infinite for the density to integrate to one. The same will happen for any density confined to a lower-dimensional manifold than your full input space. While there is work on flows on manifolds, the standard flows in this package (so far) assume you are modelling a finite density.

Thanks for your answer. But I'm confused, my base density and output distribution both are 24 dimensional.

In my example the dataset is 2D, but all the data happens to be on a 1D line. In your example the dataset is 24D, but all the data happens to be on a 2D manifold. The true density is zero "almost everywhere". Any point that doesn't look like it's a 2D point that's been duplicated 12 times (which is almost every point in the 24D space) has zero density under your true generative process.

Ok, I see what you mean. I wasn't aware of this 'issue'. In fact, I built this toy example for testing purposes after I hit the same problem with a different dataset in an applied domain. Its very likely such centering issues you describe are the reason for this problem with the other dataset as well. I will look into this again, maybe I find a solution. Thank you!

If you have zero-mean data vectors, an easy fix is to discard one of the features. You can perfectly reconstruct any feature from all of the others, so don't need to model it.
If you have quantized data (e.g., discrete pixel values in 0..255), you can add noise to it, or read the more recent literature on dequantization.
If your data contains "atoms", special values that correspond to spikes of infinite density, you'll need to remove these, or model them outside of a flow.

If it turns out that your data lies on a non-trivial lower-dimensional manifold, both [1] and [2] propose methods for learning the lower-dimensional manifold and the density on it simultaneously. The code for [1] is based on nflows and is readily available.
[1]: Flows for simultaneous manifold learning and density estimation by Brehmer & Cranmer
[2]: Regularized Autoencoders via Relaxed Injective Probability Flow by Kumar et. al

Thank you both again so much! Your answers save me a lot of time and frustration :).
It turns out, my problem was very similar to your zero mean example:
I work with some type of time series, to illustrate this, lets take as an example a scalar series [x_1, x_2, ... , x_n]. Interpreted as a data point / vector of n dimensions, this is what I train a flow on. To make my data more 'homogeneous', I subtracted from each x_i the value of x_(-1). I believe this had a similar effect as zero-centering, because x_(-1) can potentially be very close to x_1. I will now just try to normalize the dataset as a whole with a constant instead.

It doesn't makes sense to me, no. If sometimes one time step is an exact copy of the previous one, you have infinite densities with or without taking differences. If your data is quantized (and you don't do anything about it), exact duplicates in the time series are especially likely to be a problem.
If each time step is just very close, then the pre-processing that you've been doing (modelling the differences) is likely to make things numerically better though. You're removing really strong covariances.
Obvious linear dependencies (for example, from making each time-series zero mean) would be caught by fitting a multivariate Gaussian baseline. That is, check that the covariance of your data is full rank.  Maybe start with an autoregressive model and look at the predictions for each element of your time-series given the previous ones.

Yes, you are right. I investigated further and it often happens that adjacent timesteps in a series have the same values, i.e. the series is temporarily plateauing.

I suppose this issue is not the right place for such discussions. But if you don't mind, I have one more practical question:
In the timeseries I described, each sequence has n steps. But sometimes my data is incomplete, i.e. some tail steps n-m to n are missing. In my training I discard these partial samples so far, as I really want to learn the distribution over all timesteps. Another way to handle this would be that I impute the missing timesteps, but this imputation would always contain errors that the model picks up.
Ideally, I would like to mask out these missing timesteps to use incomplete samples for training anyways. For example, for  the concerned samples I could set the jacobian diagonal for the missing dimensions to 1 and work with a lower dimensional gaussian to compute the noise likelihood. So my model would be trained on a n-m dimensional subspace for some samples. But would my model then still learn a proper density over all n dimensions?

I'm bowing out of supervising your research here, sorry. I'll repeat my suggestion to consider an autoregressive model though: easy to marginalize out the end of a time series by just not predicting it.

I understand, thanks anyways!


BlockPermutation

Applies the KECCAK block permutation function to a segment of memory.
Reference: https://github.com/starkware-libs/cairo-lang/blob/efa9648f57568aad8f8a13fbf027d2de7c63c2c0/src/starkware/cairo/common/cairo_keccak/keccak.cairo#L293

@rodrigo-pino  may i be assigned?


Add percona PerconaXtraDBBackup CR example

This is taken directly from https://github.com/Percona-Lab/percona-xtradb-cluster-operator/blob/openshift-4.0/deploy/backup/cr.yaml It seems like that differs from master so pinging @delgod to confirm this is a good example.
cc @dmesser

/cc @robszumski

/lgtm


[Hero System 6e Heroic]: Bug fix.

Changes / Comments
Wrong variable corrected.
Roll20 Requests
Comments are very helpful for reviewing the code changes. Please answer the relevant questions below in your comment.

[X] Does the pull request title have the sheet name(s)? Include each sheet name.
[X] Is this a bug fix?
[ ] Does this add functional enhancements (new features or extending existing features) ?
[ ] Does this add or change functional aesthetics (such as layout or color scheme) ?
[ ] If changing or removing attributes, what steps have you taken, if any, to preserve player data ?
[ ] If this is a new sheet, did you follow Building Character Sheets standards ?

If you do not know English. Please leave a comment in your native language.

Character Sheet Info Roll20 Internal Use only.


remove the "list-group-item" class in  tags

Prerequisites

[X] I have searched for duplicate or closed feature requests
[x] I have read the contributing guidelines

Proposal
I hate this feature, because it gives my work. harder. please instead of using
.list-group-item {
  ...
}

please use
.list-group > li {
  ...
}

so we can save much time, thanks!
Motivation and context
it's help a lot, like you don't need to add a class manually.

That would significantly limit possibilities of list group. With class names you can use list group with any tag - li, div, span etc. You can also use list group item separately with no relation to direct parent

No changes happening here—we use classes to avoid requiring specific HTML whenever possible.


Upgrade Lodash to v4

Continuing the work started at https://github.com/AmpersandJS/ampersand-events/pull/15
I set lodash to ^4.6.1 since that's what the above PR had.
has minimal changes except where needed to reflect the new methods in v4 changelog:

lodash no longer has indexBy, it's been renamed to keyBy
rest in v4 has an entirely new & incompatible behaviour.  I substituted tail for it and removed rest
invoke no longer builds an array of the returned values.  I added invokeMap to so that'll still be possible.

Am open to suggestions on adding additional methods if anyone would like 'em.

You need to camelCase Lodash imports, some OSes are case sensitive

Thank you!
There seem to be some problems with the CI, otherwise this looks good. This would need a semver major release, correct?

@pgilad Thanks for pointing out the camelCase issue.  I'm going through the PR's and testing on an Ubuntu VM to make sure I catch them all.
@klaemo Yes, this one will require a server bump.  rest has been replaced by tail and indexBy is now keyBy.

@AmpersandJS/community-leaders could anyone set up/fix the sauce labs credentials?

@pgilad do you know how to fix Travis? It complains about missing Saucelabs credentials.

@nathanstitt LGTM. Tests are passing locally. I'm willing to merge it, but would like to get the CI situation sorted out. Thanks for you work :)

Closed in favor of #11

Why was  #11 chosen? It keeps rest, but I think that's a mistake since it's semantics has completely changed. I'd rather have code cause an explicit method doesn't exist error rather than a failure in unrelated code when it does something unexpected.
Wish we'd had some discussion on which approach to choose before merge.

I was working in a bunch of repos today and went with all the ones listed in a different issue.
That being said, I didn't look at this one closely enough and I think you're right. Really sorry about that. Since there will be a major version bump anyway (#12) I agree that the old methods should be removed. I'll do that before #12 happens.
Sorry again for the lack of discussion. I had a little time today so I was trying to get All The Lodash Things™  done today, but ended up rushing a bit.

I went ahead and reverted the other one, and merged this instead. Thanks @nathanstitt! While I was typing up that last comment, v3 was published with the previous PR. I'm going to publish v4 now because  of the breaking changes, and chalk v3 up to a failed release on my part.


Lebih cantik pakai logo komunitas di section komunitas? 😁

Not all those community have logo I think

Hmm yeah, you're right 🤔

Mungkin minimal link ke meetup.com, medium, atau group. Kalau ada yang mo ubah comment di sini dulu aja biar ga overlapping.

Anyone mau update link ke group masing?

Close #7 and move to #33 for better tracking


📄 Guide for static extraction without any frameworks or build tools

What is the improvement or update you wish to see?
Currently, https://rc.css.master.co/guide/installation provides documentation for using Master CSS with various frameworks and build tools (Next.js, Svelte, Vite, etc.).
However, there is no documentation on how to use the static extraction feature without any frameworks or build tools; i.e. it is not clear how to just run Master CSS on a list of HTML files and statically extract CSS files from them.
My use case is a static website with pure HTML/CSS and no or very minimal JS - I don't need any UI frameworks or build tools for this. Something simple that lets me convert HTML files with Master CSS syntax and statically generate CSS is more than enough.
I did find an example on static extraction without using any frameworks or build tools. However, this example mentions the use of an mcss CLI tool, and there is no documentation about such a tool or how to install/use it.
There is also a docs page on static extraction in general, but this is unfinished and contains practically no information.
As such, it would be nice to have some documentation on static extraction (eg. using an mcss CLI tool that generates CSS provided some HTML files) without any frameworks or build tools.
Does the docs page already exist? Please link to it.
https://rc.css.master.co/guide/rendering-modes/static-extraction

Hey, see: https://stackblitz.com/edit/mastercss-hybrid-rendering?file=pages%2F_document.tsx
Reference from: https://css.master.co/docs/hybrid-rendering


suggestion: replace question ID with a link

Feature request for replacing the question ID below the question with a permalink to /question/view/<question-id>, so that users can more easily copy the link to the question.

I could get to work on this, if you aren't currently in the process of implementing it right now. In any case, expect something from me regarding this eventually.


New tutorial and completed descriptions

plus some bug fix

I'll merge this in and then fix potential issues


[BUG] useScrollLock locks scroll forever in development (React Strict mode)

Describe the bug
Minor bug, but useScrollLock will forever lock in development mode, due to strict mode rerendering useScrollLock, and therefore setting the original state to the body's styling, and then overwriting it to the locking style.
To Reproduce

Create a Next.js project with strict mode on

Use const { lock, unlock } = useScrollLock({ autoLock: false }) in some component like this:
export default function Test() {
  const { lock, unlock } = useScrollLock({ autoLock: false })

  const toggleMenu = () => {
    setIsMenuOpen((value) => {
      if (value) unlock()
      else lock()
      return !value
    })
  }

  useEffect(() => {
    function handleKey(event: KeyboardEvent) {
      if (event.key === 'm') toggleMenu()
    }
    document.addEventListener('keyup', handleKey)
    return () => {
      document.addEventListener('keyup', handleKey)
    }
  }, [])
}

Run next dev, and try pressing the m key to toggle the menu.

Expected behavior
For useScrollLock to not lock the scroll in Strict mode.
Additional context
Used Next.js 15.0.0-rc.1, although I don't see Next.js 14 changing this behavior. EDIT: nope it goes away in Next.js v14 even with Strict mode.

I use<EMAIL_ADDRESS>and the problem persists when using React.StrictMode. If I turn it off, the problem goes away.


shows wrong balance (zero balance) sometime

This is not the first time user open this account.
Maybe there's cache logic on balance and it's broken.

video
1590464178472853.mp4.zip

related to https://github.com/Conflux-Chain/conflux-rust/issues/1486

resolved in v0.2.2


Proposed penumbra-crypto code reorganization

This is a more detailed proposal for the final item in #2288.  The scope of this ticket is to:

Rehome the various modules of penumbra-crypto to existing crates that make sense, or create new crates if needed,
Remove code in penumbra-crypto we're not using, i.e. stuff that was originally targeted for Penumbra mainnet but will end up going into PenumbraV2, possibly with significant changes.

Concrete steps
Note that the following paths refer to the various modules in penumbra-crypto in crates/core/crypto.

[x] Move SwapFlow (in flow.rs) to the penumbra-dex component. Remove MockFlowCiphertext and instead just use Amounts. This removes flow.rs. - #2766
[x] Remove eddy.rs for now - we'll bring it back in the appropriate place if needed for PenumbraV2. - #2766
[x] Move code in governance* to the penumbra-governance crate. Currently this crate doesn't exist, so in the meantime we could move it alongside where the governance component lives. Then this governance code would all be moved together to the penumbra-governance crate, as described/tracked in #2288. - https://github.com/penumbra-zone/penumbra/pull/2776
[x] Move code in stake* to the penumbra-stake crate. - https://github.com/penumbra-zone/penumbra/pull/2770
[x] Move memo.rs to the penumbra-transaction crate, since as of #1222 the memo is at the transaction level. - https://github.com/penumbra-zone/penumbra/pull/2773
[x] Move effect_hash.rs and transaction.rs to the penumbra-component crate (we need to implement EffectingHash for component-specific actions in the component crates). - an attempt in #2779 that is failing CI, next attempt in #2798
[x] Create new crate penumbra-num for Amount and U128x128 types. - #2781
[x] Move asset* to a new penumbra-asset crate, along with Value and Balance - #2781
[x] Move note_payload.rs, rseed.rs, to penumbra-shielded-pool - #2795
[x] For the proofs, we'll move each of the proofs to the appropriate component crate, as was already done for the SwapProof and SwapClaimProof. Specifically:

[x] UndelegateClaim goes to penumbra-stake, - https://github.com/penumbra-zone/penumbra/pull/2769
[x] Output, Spend, NullifierDerivation goes to penumbra-shielded-pool, - #2792
[x] DelegatorVote goes to penumbra-governance - #2792

[x] The proof traits should go into penumbra-proof-params. The traits are used by the component crates, which already require the penumbra-proof-params to do proving and verification. - #2792
[x] #2774
[x] nullifier.rs would move to the penumbra-sct crate. - #2795
[x] Create new crate penumbra-keys for the key hierarchy (keys*), addresses (address*), prf.rs (used for key derivation, and also by Rseed so we'd need to expose it), this requires some API changes: https://github.com/penumbra-zone/penumbra/pull/2791
[x] Move symmetric keys to penumbra-keys - symmetric.rs operates on notes and memos, might need API changes here - #2795
[x] At this point, penumbra-crypto should be empty, so we'd delete it. As a final step, the re-exported types Fr, Fq and rdsa will need to be imported directly from decaf377 and decaf377-rdsa. - #2798

Ticket still open to track cleanup, but we've largely achieved the reorg we wanted in advance of pending security audits. :tada:


fix: add required parameter to fix build breakage.

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

[ ] Make sure to open an issue as a bug/issue before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
[ ] Ensure the tests and linter pass
[ ] Code coverage does not decrease (if any source code was changed)
[ ] Appropriate docs were updated (if necessary)

Fixes #926 🦕

@mctavish this looks like a bug with Windows coverage, in the codecov.io system, I think it's okay.


Create a record parser

Build a parser that collects all the data from the  search results page on OJCIN that builds a list of cases. Each row in the results page would be a case.

Can I work on this??


Window Close Behaviour

Really awesome for the close button feature! Thanks!
I strongly recommend to add an example of how to properly use the IsOpen (close button) for the Window API in the wiki.
First I've tried this
local test = true
--in update
if test then
  Slab.BeginWindow("Test", {Title = "Test", IsOpen = test})
  Slab.EndWindow()
end

which shows properly the close open, but clicking it still shows the window, and printing the value of test results to always being true. Now the reason for this is simple, because if we pass a value like boolean in a function, the value is passed as a copy instead of a reference.
Second, I've tried passing a table so as an alternative to Lua pass by reference
local test = {Title = "Test", IsOpen = true}
--in update
if test then
  Slab.BeginWindow("Test", test)
  Slab.EndWindow()
end

This works, but somehow counter intuitive for me having to define the options table outside.
Perhaps, just like in the love-bindings for DearImGui, the BeginWindow returns a boolean value.
The usage would be
local test = true
--in update
if test then
  test = Slab.BeginWindow("Test, {Title = "Test", IsOpen = test})
  Slab.EndWindow()
end

This is a reference to the love-imgui binding I mentioned
https://github.com/slages/love-imgui
    if showAnotherWindow then
        imgui.SetNextWindowPos(50, 50, "ImGuiCond_FirstUseEver")
        showAnotherWindow = imgui.Begin("Another Window", true, { "ImGuiWindowFlags_AlwaysAutoResize", "ImGuiWindowFlags_NoTitleBar" });
        imgui.Text("Hello");
        -- Input text
        textValue = imgui.InputTextMultiline("InputText", textValue, 200, 300, 200);
        imgui.End();
    end

Thanks for the feedback! I have updated the wiki to provide some example code on usage for IsOpen.
I will also look at implementing the return value for the open state of the window. It seems like love-imgui makes use of this among other uses of return values. Thanks for linking the example.


replace elastic search logging with app insights

I think that'll make it easier for debugging issues rather than using elasticsearch like we do now.

+1 . Makes sense.
There is still a small gradual resourcegroup leak even after the last fix I made. May have been exacerbated by the sql outage issues yesterday. But debugging those issues would be a breeze with AppInsights


Password Security

Storing passwords as simple hashes without salting leaves them vulnerable to various attacks, such as dictionary attacks and rainbow table attacks. Consider adding a salt to enhance security.
Using a more secure hashing algorithm, such as bcrypt or Argon2, is recommended for password hashing.

Implementation will take time, so sha256 for now. Added configuration option for hashing algorithms, though redundant for now.


add the new solarwind CRD to istio-mixer template

/assign @geeknoid

/lgtm

@jmuk: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-unit-tests.sh
23c9e00017e75276f17071d74ab4cea239f25401
link
/test istio-unit-tests

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@jmuk: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-unit-tests.sh
23c9e00017e75276f17071d74ab4cea239f25401
link
/test istio-unit-tests

prow/istio-pilot-e2e.sh
23c9e00017e75276f17071d74ab4cea239f25401
link
/test istio-pilot-e2e

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/test istio-unit-tests
/test istio-pilot-e2e

@jmuk: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-pilot-e2e.sh
23c9e00017e75276f17071d74ab4cea239f25401
link
/test istio-pilot-e2e

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/test istio-pilot-e2e

@jmuk: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-pilot-e2e.sh
23c9e00017e75276f17071d74ab4cea239f25401
link
/test istio-pilot-e2e

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/test istio-pilot-e2e


Multiple Libreoffice windows still cause problems with registering keys

Unfortunately I prematurely concluded that everything works now with multiple-window applications over in the Hotswitch issues.
Here's Hotswitch-HS showing, among others, two LibreOffice Windows.

I highlighted the first LibreOffice Window (Untitled 1), hit space and 1, and 1 was registered for the other window.

But it gets weirder. If I try the same again (highlight Untitled 1, hit space and then 1), both windows now have the 1 key registered.

At first I thought this may be a feature, but key 1 only brings one of them to the front, not both.
If I now try to register a different key (2 in this case) for one of the two windows. both are switched to the new key.

I can switch both windows back to auto-assigned keys by registering key 2 for a window of a different application.

At this point, when I first tried it out, I could not assign keys to any of the two LibreOffice windows any more. The space+key input was just ignored. I had to assign the auto-assigned keys to a different window first, then it worked again. But I could not reproduce this for screenshots.
I have not tried this with other applications apart from LibreOffice yet.
Apart from all this: thanks for taking the time to port HotSwitch to Hammerspoon (and thus making me discover Hammerspoon in the first place!).

Thanks!
Anyway, I fixed the registration when the specified key is already registered on the same app window. https://github.com/oniatsu/HotSwitch-HS/commit/25ec0e189e5d76aa7a4a8e8c73d038a420e6e9ba
The registration way is difficult to understand easily.

For example, a difficult case is these. Eash windows are on same app.

win A (index 1 (created first) ) key: undefined
win B (index 2 (created second) ) key: undefined
win C (index 3 (created third) ) If you register a key to this, HotSwitch-HS save the key to index 1. Because HotSwitch-HS saves the array of keys for simple order.


Display list of versions when using "switch"

A detailed description of the proposed feature
It could be great by doing brew switch name-of-the-formula, it displays the list of versions available.
The motivation for the feature
Sometimes, homebrew tells me to switch to another version but I really do not know what it is installed. I would like to know what versions are installed like for instance pyenv does.
How the feature would be relevant to at least 90% of Homebrew users
People want to know what versions they've got!
What alternatives to the feature have been considered
I've tried to do brew info name-of-the-formula to see what it's installed, but nope. The only solution was to go to /Cellar/ and see the folders.

Duplicate of https://github.com/Homebrew/brew/issues/7329.


jq: fix darwin build

Motivation for this change
One of the tests failed on my builder but not locally because of some kind of timezone issue, hopefully this isn't also a problem on hydra.
/cc @Mic92
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[x] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Fits CONTRIBUTING.md.

Success on aarch64-linux (full log)
Attempted: jq
Partial log (click to expand)
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
make[3]: Leaving directory '/build/jq-1.5'
make[2]: Leaving directory '/build/jq-1.5'
make[1]: Leaving directory '/build/jq-1.5'
/nix/store/lqj8gylg4sajwbxjkf0c6z243nxb8pyj-jq-1.5

Success on x86_64-linux (full log)
Attempted: jq
Partial log (click to expand)
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
make[3]: Leaving directory '/build/jq-1.5'
make[2]: Leaving directory '/build/jq-1.5'
make[1]: Leaving directory '/build/jq-1.5'
/nix/store/wx62bn48vc9n65l7k6wcj5apmnyysjjy-jq-1.5

Success on x86_64-darwin (full log)
Attempted: jq
Partial log (click to expand)
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
make[3]: Leaving directory '/private/tmp/nix-build-jq-1.5.drv-0/jq-1.5'
make[2]: Leaving directory '/private/tmp/nix-build-jq-1.5.drv-0/jq-1.5'
make[1]: Leaving directory '/private/tmp/nix-build-jq-1.5.drv-0/jq-1.5'
/nix/store/mh9f4wjwq9y6sdlxkqv8db367v1hvnfm-jq-1.5


feat: Document animation guidelines

Reintroduces motion guidelines as documented in our previous styleguide.

Så fint ut det her!


According to RFC5849 port number must be excluded from base string if it is the default

<IP_ADDRESS>.  Base String URI
(...)
3.  The port MUST be included if it is not the default port for the
scheme, and MUST be excluded if it is the default.  Specifically,
the port MUST be excluded when making an HTTP request [RFC2616]
to port 80 or when making an HTTPS request [RFC2818] to port 443.
All other non-default port numbers MUST be included.

you have issues with custom port (not 80 and 443) ?

Since the default ports aren't stripped for the signature computation, the
signature is wrong when the url co'tains ports
--
Matthias
Le 13 sept. 2017 08:51, "Ddo"<EMAIL_ADDRESS>a écrit :

you have issues with custom port (not 80 and 443) ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ddo/oauth-1.0a/issues/59#issuecomment-329075625, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AB-GIk1Zb1NGyfmCV-qDCxS-vtZQuwvJks5sh3tlgaJpZM4PVZ4P
.

so if you input http://example.com:80 or https://example.com:443 it gonna be an issue?

That's it.
--
Matthias
Le 13 sept. 2017 09:55, "Ddo"<EMAIL_ADDRESS>a écrit :
so if you input http://example.com:80 or https://example.com:443 it gonna
be an issue?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ddo/oauth-1.0a/issues/59#issuecomment-329088648, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AB-GIuLCO-uzn2lkOPLqCS_CWBPMnyBeks5sh4pkgaJpZM4PVZ4P
.


Marker-based zip file creation pipeline

Can someone look over my code?
I was able to get the zip file with the files in the right format, but I couldn't get it to work on my phone.
const {
    MarkerModule,
    ASSET_IMAGE,
    ZipProvider,
    ENC_BASE64,
} = ARjsStudioBackend;

// Init zip
const zip = new ZipProvider();

// Get image to be used for marker
const img = new Image();
img.src = imageData;

// Create canvas
const canvas = document.createElement("canvas");
canvas.width = img.width;
canvas.height = img.width;

// Draw image on canvas
const ctx = canvas.getContext("2d");
ctx.drawImage(img, 0, 0);

// Get data URI
const imageDataURI = canvas.toDataURL();

// Set up promises for full marker image, marker pattern, and content html
const getFullMarker = MarkerModule.getFullMarkerImage(
    imageDataURI,
    1.0,
    100,
    "black"
);

const getPattFile = MarkerModule.getMarkerPattern(imageDataURI);

const getContent = MarkerModule.generatePatternHtml(
    ASSET_IMAGE,
    "marker.patt",
    "assets/image.jpg"
);

// Wait for all promises
Promise.all([getFullMarker, getPattFile, getContent])
    .then((res) => {
        const fullMarker = res[0].replace("data:image/png;base64,", ""); // Clean up data tag.
        const pattFile = res[1];
        const content = res[2];

        zip.addFile("images/img.jpg", fullMarker, ENC_BASE64);
        zip.addFile("assets/image.jpg", contentFile); // contentFile is an image in this case.
        zip.addFile("marker.patt", pattFile);
        zip.addFile("index.html", content);
        return zip.serveFiles({ compress: 9 });
    })
    .then((base64) => {
        // trigger download
        window.location = `data:application/zip;base64,${base64}`;
    });

I can not see where is filled/defined contentFile ... or maybe i miss something?

@kalwalt It's not define in this scope, but I'm getting the file once the user upload it.

I'm closing this issue because it's no longer relevant.


structuredClone is not defined

Duplicates

[X] I have searched the existing issues

Latest version

[x] I have tested the latest version

Steps to reproduce 🕹
Steps:

yarn create toolpad-app my-toolpad-app
cd my-toolpad-app
yarn dev

Current behavior 😯
When accessing editor at localhost:3000 error apears "structuredClone is not defined"
Expected behavior 🤔
No response
Context 🔦
Seems like canvas issue
Your environment 🌎
Edition Windows 11 Pro
Version 22H2
OS build 22621.1992
Experience Windows Feature Experience Pack 1000.22644.1000.0
Latest MUI Toolpad

im using v20.4.0

same on 18.17.1

this is error message

Thanks! Maybe the canvas is using an old Node version, we'll look into it, thanks for reporting the issue.

Hi @koolschool935 , can you please run npx @mui/envinfo and tell me the output + which browser you use?
Maybe the browser you're using does not support structuredClone? https://caniuse.com/?search=structuredClone

Hey,
I'd been using an old version of Firefox for like a year because I really liked its UI. Tried it on Chrome and it worked fine there.
Realized it was my bad for not checking in a different browser earlier. Thanks for asking, "Which browser do you use?" That simple question actually solved my issue. 🤦♂
Thanks a lot for your help!

Hey,
I'd been using an old version of Firefox for like a year because I really liked its UI. Tried it on Chrome and it worked fine there.
Realized it was my bad for not checking in a different browser earlier. Thanks for asking, "Which browser do you use?" That simple question actually solved my issue. 🤦♂
Thanks a lot for your help!

No worries, glad we figured it out! :)


Use rest server simulation query to estimate gas

There is some way for a query to do a dry run and return expected gas needed. This is used by the wasmdcli
Not high priority but it would be a nice feature

From my experience, the gas simulation doesn't work and usually needs a high factor to not cause some txs to run out of gas.

From my experience, the gas simulation doesn't work and usually needs a high factor to not cause some txs to run out of gas.

Thank you for sharing. What's Lunie's strategy to set gas values?

We use high fixed values for the gas estimate and adjust the gas price to not cause mega high fees.

Thanks for chiming in @faboweb This is indeed the experience with many other apps. Simulate doesn't really simulate it all too well :(
I made this comment, hoping to improve the case for launchpad https://github.com/cosmos/cosmos-sdk/issues/6522#issuecomment-652051823 but it looks like it was tentatively rejected https://github.com/cosmos/cosmos-sdk/issues/6522#issuecomment-652410557
That said, they did decide to make launchpad 0.39, so maybe there is the chance to get the improved simulation estimate inside the launchpad release so it makes sense

This seems a key issue that would lead to better estimates: https://github.com/cosmos/cosmos-sdk/issues/4938

This is now tracked in #828


Need help in setting up coap server

Hello,
I am trying to use CoAPthon to open a server and client with port 5683 simultaneously. The idea is CoAPthon server to receive any instantaneous request from external coap client. CoAPthon client is sending ping request to external soap server. All coap transactions are on port 5683. CoAPthon client is able to ping external coap server, but external coap client is not able request CoAPthon server.
When I start the server by running cia-server.py script, I see the server started with device ip address and port 5683. But when I am sending request from external server I don't see any message received by CoAPthon server.
Is there something I am missing. Any help is appreciated
Thanks,
Prasant

Hi, it really depends on the ip address of the server. I mean, if you use <IP_ADDRESS> it will not receive any message except the one generated on the localhost. Can you paste the message written on server's startup?
BR,
Giacomo

Hi, Am working on Raspberry Pi 3 board communicating with Raspberry Pi camera which helps to capturing real time images. Therefore, I want to implement CoAP protocol. As I tried to implement your code and it works but when I try to display it on Web Browser it takes either invalid IP address or google search. Can you help me out to fix this issue.
Or If any other way to implement it then also it will be fine..
Thanks
Raj

I am working on IoT. With help on Raspberry pi 3. So server will be pi3 board and IoT device will be Camera which will capture images. Client will ask for required images. So our aim is to implement CoAP Protocol between client and server. So I tried to implement your code without IOT to check weather its working or not. So I tried with IP <IP_ADDRESS>:5683/basics . I tried to run on crome  and Firefox but it shows error.
As I am searching how to implement if  you have any idea please share

Pardon what do you mean for "So I tried to implement your code without IOT " ? Moreover <IP_ADDRESS> is localhost, you cannot send messages to the <IP_ADDRESS> from one machine to the other : https://en.wikipedia.org/wiki/Localhost


Sileo or Cydia

Hi everyone ! I’ve a question, is it possible to get sileo after a jailbreak with Unc0ver and Conversely ? I'm afraid that cydia disappears slowly and that sileo controls the "market"? I don’t know... Sileo of cydia ( Uncover or chimera ) ?

iam not sure if this discussion should take place on the issues page of unc0ver.
One problem is, that sileo was made with anti-unc0ver features by the dev team, so in the first place, its not so easy to integrate it in unc0ver.

iam not sure if this discussion should take place on the issues page of unc0ver.
Agreed. This can be closed.
Sileo can't be installed on unc0ver because they put code in place that prevents it from running properly on non-substitute platforms. You can install any of Cydia, Installer5, Zebra, etc. on unc0ver and use those. So you do have choice in the matter.

what were you thinking when you tagged this as a bug. this is just a simple question (with many answers already present on the web)

You can try unc0ver dark


Blog code snippets don't scroll on mobile

I was just reading https://www.cockroachlabs.com/blog/running-cockroachdb-on-kubernetes/ and I noticed that you can't scroll the code segments on mobile leading to not being able to read them.
Might be a good idea to enable scrolling or wrapping on small screens.
Not sure if this is the correct place since the blog isn't actually docs.
Might be related to #593.

@jess-edwards, who's in charge of the blog.

@d4l3k @jseldess
Thanks for flagging. I'll see if that's a quick fix.

@d4l3k @jseldess
Line wrapping enabled - in all cases. I couldn't find a setting for just mobile. What do you think?

Horizontal scrolling might keep the blocks cleaner visually. The wrapping makes them quite hard to read on a small screen. Just my 2 cents.
If you want to try scrolling instead, I think it would just be a CSS change, but @mjibson or @sploiselle would be able to say for sure.

Thought through this with @jseldess a little and think we could "fix" the issue with a best practice:
Code comments should be manually line-broken at 35 characters (which is where wrapping happens on mobile on the blog). Words that would break the 35th character get moved to the next line.
For example, that would turn the existing post into:
# This service is meant to be used
# by clients of the database.
# It exposes an IP address and DNS
# name within the cluster that will
# automatically load balance
# connections to the different
# database pods.

# This service only exists to
# create DNS entries for each pet
# in the petset such that they can
# resolve each other's IP
# addresses.
# It does not create a
# load-balanced ClusterIP and
# should not be used
# directly by clients in most
# circumstances.

Far from perfect, but solves the problem in a LCD kind of way.

Alright, let me take a look at how some other tech blogs and docs sites approach this. I'd prefer to not permanently alter all views of the code snippets to serve the few who read them on the blog.
It looks like the docs site allows for horizontal scroll. Let me see if crayon (the code snippet highlighter) allows for horizontal scrolling on mobile.

@sploiselle @jseldess
Horizontal scroll added; forced line wrap removed. Works on mobile.


[WiP] Area support

Issue type

Feature

Summary

I have created a new PR to merge it with the latest master and add some additional tests. You can find more about the original PR here #24
The original description is

I've added Area functionality, since I need it in my project.
I have no idea what am I doing, since I'm working with overpass API for like a day.
No tests included (sorry), but general usage for finding areas works for my purpose.
Please add tests.
references: #19

Coverage decreased (-7.7%) to 86.451% when pulling 4a9ce421d3625b1334cd7d4048f3163c5c568617 on area_support into 2961bb9f50939e3a0dddedcda4fa110b2ee0117c on master.

Coverage decreased (-0.8%) to 93.373% when pulling 38848f98ff1c774ec5e91a0ee7c9c756a2477c41 on area_support into 2961bb9f50939e3a0dddedcda4fa110b2ee0117c on master.

Coverage decreased (-0.7%) to 93.52% when pulling 7efdae7fde8f593f0ed57418ed98947b0a7addfb on area_support into 2961bb9f50939e3a0dddedcda4fa110b2ee0117c on master.


feature: add poetry

This PR aims at using poetry as a dependency manager
Checklist:

[x] I've added Google style docstrings to my code.
[x] I've used pydantic for typing when/where necessary.
[x] I have linted my code
[x] I have added tests to cover my changes.

@ArshaanNazir @chakravarthik27 this will be tackled in a separate PR if we agree but how do you feel with moving the package build and push to poetry as well and have it part of the CI?

have it part of the CI?

It's looking good to use poetry.


Patch 2 changes "" to also emit lets to be emitted as boxes like vars.
Patch 3 changes "" to emit owned arguments again as boxed.
Part 4 implements on top of this escaping closure semantics.

This basically required me to rewrite a large part of SILGen for non copyable types and redesign parts of the checker as well. I also had to do a bunch of work in alloc box to stack to massage its output since it semantically is what controls whether we use non-escaping or escaping semantics when we emit these errors.

@swift-ci smoke test

@swift-ci smoke test

@swift-ci build toolchain

Linux failure was unrelated problem in dispatch.

@swift-ci smoke test linux platform

Windows failed b/c I left in some optnone by mistake from when I was debugging

@swift-ci smoke test

@swift-ci build toolchain

@swift-ci clean smoke test linux platform


Certificates: Make files private and move imports to init

Can one of the admins verify this patch?

/azp run python - keyvault - ci


Fix build command for gradle 2.2.1

Build failed with gradle 2.2.1:
./gradlew clean build :lint
FAILURE: Build failed with an exception.
What went wrong: Task 'lint' not found in root project 'xxx'. Some candidates are: 'init'.
BUILD FAILED

the idea for this is to run lint from gradle, not to remove it to make the build work. try running lint separately http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Lint-support and if it works run the resource remover.


Blocking 12 mirror websites

These IP addresses are mirroring news sites, gaming sites, and a couple of apps.

What fascinates me is the websites they choose to mirror — ebaumsworld? Really?

What fascinates me is the websites they choose to mirror — ebaumsworld? Really?

Yeah, that one was mirrored by 22 IP addresses so far. Maybe it's someone trying to derank them on Google by copying their content all over the place? I don't know.
By the way, has all this blocking had an impact on freeing up resources at all?

By the way, has all this blocking had an impact on freeing up resources at all?

No appreciable difference. My servers are receiving an aggregate of 368 queries per second, and that seems what it was before all the blocks.


Use replication controllers in e2e cluster upgrade tests

ref #8081
cc @mbforbes @davidopp

Ugh, maybe we should have made issues for the remaining work. I commented there that I was working on this. I've implemented this, but I also switched the services test to use RCs instead of pods as well, and hooked it into the validation provided in resize_nodes.go.


fix: export lib for umd

Now UMD should work 😉

This works in browser, but will fail in NodeJS, let me to add some fixes !

Nah, we can't have a separate entry, also we really need to have window.sprae as a function.
Thanks for the PR but we'll stick to sprae.auto.js for now

with this PR window.sprae works as a function.
What do you mean by "separate entry" ?
with this UMD output you can run your app in any JavaScript runtime:

from global scope ("windows", "globalThis", "self")
with an AMD loader like RequireJS
or with require()

What do you mean by "separate entry"

I mean the proposed sprae.umd.cjs at the root - the top level entries are importable. I was hoping it's possible to be done via footer in build options. Do you think if that's possible?

with this UMD output you can run your app in any JavaScript runtime

Would be nice improvement, I sort-of gave up on UMD, it seems like investing into obsolete tech.

@dy

I was hoping it's possible to be done via footer in build options. Do you think if that's possible?

its possible to completely get ride of sprae.umd.cjs file using esbuild's stdin  option.

Would be nice improvement, but I sort-of gave up on CJS/AMD, it seems like investing into obsolete tech.

Agree, it could still be relevant depending on target browser.
Personally and professionally I never use or promote UMD.
my understanding of your UMD usage is:

if sprae runs in browser, attach sprae to window
then launch the "auto-init" feature

Correct me if I'm wrong but if this is the only use case, then there's a much easier way to achieve your needs, let me know if you need help

// Standalone build
await esbuild.build({
  stdin: {
    contents: `import sprae from "./sprae.js";
// standalone run
if (typeof document != "undefined" && document?.currentScript) {
  window.sprae = sprae
  if (document.currentScript.hasAttribute('init')) sprae(document.documentElement);
}`,
    resolveDir: "./",
    sourcefile: "auto-init"
  },
  outfile: "dist/sprae.auto.js",
  bundle: true,
  target: 'es2020',
  sourcemap: 'external',
  format: "iife"
})
esbuild.build({
  entryPoints: ['dist/sprae.auto.js'],
  outfile: "dist/sprae.auto.min.js",
  sourcemap: 'external',
  minify: true
})

Giving it a second thought

.

.

.

Giving it a second thought. If you'd like to reopen that PR I can merge it.
Maybe sprae.auto.js root entry would make sense.

@Inqnuam thanks, in fact you were right, I should've taken your PR. I've incorporated change anyways.


using same credentials for render_site

doing it like the pull_request workflow which  has been working

also updating checkout for pull_request workflow to reduce warnings

I know this just ran successfully for the pull_request.yml so I am going to yolo add this.


2_2 Autoencoder typing error

p13.
Because it is Encoder, I think "What if we expand the input size?" should be "What if we squeeze the input size?".

p.33
Also becuase it is Decoder, I think  "Then, how to expand the feature dimension?" should be "Then, how to expand the feature size?"

@haeun0814
Thank you for the detailed comment! :)
As you commented,
n the encoder (p13) , In encoder, the convolutional layers squeezes the feature map size (width and height).
in the decoder (p33) , they expand the feature (feature map) size (exactly, the width and height).


Update the Section Thumbnail to a new design referring to Mobile

Update the Flow Mobile section logo, and other icons to the new design below:
https://www.figma.com/file/Ug5QlSD3uPxg5MHFwbApVe/Flow-Dev-Portal?node-id=116%3A44384

done


[SPT 3.7] Bot gear generation leaves bots with no spare magazines if they have drum magazine equiped in gun

General information:
Project issue is for: SPT 3.7
Expected result:
Bots should have magazines with lower capacity e.g. 40, 45, 60, shotgun 10 round magazines if they have drum mag equipped in their gun
Actual result:
Bots don't have spare magazines if they have drum mag equipped in their gun
(Add a description of the issue here)
How to reproduce:

Find a bot with drum mag in their gun e.g. Killa or Tagilla
Check their pockets or chest rig
They won't have spare magazines

Originally written by Armanello

This is surprising as there's code to handle when bots have a drum mag but no space in rig for another drum: https://dev.sp-tarkov.com/SPT-AKI/Server/src/branch/master/project/src/generators/weapongen/implementations/ExternalInventoryMagGen.ts#L57
Needs some investigation

Originally written by chomp

I've ran some bot generation tests with a bear PMC + RPK:

It appears to generate correctly, do you have any screenshots of bots without magazines + a drum mag in the weapon?

Attachments

image.png (68 KiB)

Originally written by chomp

The typical case I could recall is scav with SKS drum mag. They never seems to have a vest that can host a spare mag, but, I think it would be surffice.

Originally written by ioulaum

I can see how that would be a problem. Say the SKS gets a drum mag, server tries to add additional mags for it and can't fit any more so it finds the default magazine for an SKS. That being a 10 cartridge internal magazine.
We can't add those as magazines to the bot inventory obviously so the code stops trying to add mags. Leaving the bot with only one drum mag.

Originally written by chomp

Spent a few hours reworking how weapons with internal mags as a default are handled:
https://dev.sp-tarkov.com/SPT-AKI/Server/commit/3c0e6a34f2bf3e360bd8c33f21ce7da521e9dedc
it did mean some rework of addItemWithChildrenToEquipmentSlot() but i think its worth it.

Originally written by chomp


Support external SSLContext

In our particular case, we need to use SSL but bypass the certificate check. When TcpSyslogMessageSender is set to use SSL it creates a secure socket using default SSLSocketFactory. It could be better if I can provide a custom SSLContext and that is used to open the socket.
In TcpSyslogMessageSender:
ensureSyslogServerConnection(){
...
    if(sslContext == null) {
        socket = SSLSocketFactory.getDefault().createSocket();
    } else {
        socket = sslContext.getSocketFactory().createSocket();
    }
...
}

...

public synchronized void setSSLContext(SSLContext sslContext) {
    this.sslContext = sslContext;
}
public synchronized SSLContext getSSLContext() {
    return this.sslContext;
}

I'll second that.
This would be very useful to have.
For my usecase, I need to add my own Keystore / Certificate to the sslContext.

@KevUKHD This is available since 1.1.7


fix: fix validation

Tested out the recent validation feature in a live project and found a few bugs.
Class validator expects a single instance of the package to be installed to collect validation metadata, so it should be a peer dependency to allow FireORM to use the version specified by the user rather than providing our own.
Validation also wasn't working for subcollections, as the parent entity remains the same (and this doesn't have the correct validation decorators on). So I've moved things around to allow for the entity to be found when the subColName prop is available.

Hmm, leaving it in devDependencies seems like a code smell to me, especially as its used in the non-dev code. optionalPeerDependencies does seem like what this needs, but if it's only yarn then that would pose a problem too.
I'm not entirely sure this is an issue that can be solved with the tools available right now, but might require some more research on my part

https://www.npmjs.com/package/codependency this might help? But does it make sense to install a dependency to prevent installing a dependency?...

https://www.npmjs.com/package/codependency this might help?

I think using the runtime check (or codependency) + adding the lib to devDependencies should fix it.

At development time we would have it installed (because is in devDependencies)
At runtime we don't need the typing information, so the library would only be needed if some validations are triggered

Why not adding directly as a peerDependency? I don't want to force everyone to install the library even if they don't need it
What do I call  runtime check? Something like this:
// AbstractFirestoreRepository.ts

/**
   * Uses class-validator to validate an entity using decorators set in the collection class
   *
   * @param item class or object representing an entity
   * @returns {Promise<ValidationError[]>} An array of class-validator errors
   */
  async validate(item: T): Promise<ValidationError[]> {
    let classValidator; //It would be awesome to have some types here but I don't see how without copypasting the types

    try {
        classValidator  = await import('class-validator');
    }
    catch(err) {
        const error = err instanceof ModuleNotFoundError ?
         new Error('You must install class-validator library to be able to run validations in models') :
         err;

        throw error;
    }

    const { entity: Entity } = this.colMetadata;

    /**
     * Instantiate plain objects into an entity class
     */
    const entity = item instanceof Entity
        ? item
        : Object.assign(new Entity(), item);

    return classValidator.validate(entity);
  }

Note: I didn't run this piece of code hence it might have errors, wrote it entirely in this comment.

@wovalle I'll take a look at this over lunch, shouldn't be too hard to implement :)

@wovalle I added in the runtime check like you suggested. I couldn't seem to get codependency to work.
It might be nice to add a semver check in, but I think for now this will be fine. The functionality we depend on from class-validator has been present since the start of the project, it just may pose an issue if they release any breaking changes in the future.

I'm currently looking into a minor issue that seems to be squashing any custom validation messages set by the user, but I can confirm that this PR works in a real project 👌

@wovalle all done. Removed the dependency on chai-as-promised too 👍

Yeah, skipping the semver is ok for now! Thanks!


Project name is clunky & misleading

go-mysql-server is a bit of a clunky name and import path, when I first saw the project appear in Go news feeds I thought it was another mysql driver.
However this is a really cool project! A Go SQL engine for testing, data interfaces etc
Perhaps a name-change could reflect this?
ie

mysqlingo
sqlingo
sqle
liquidsql

Hmm, interesting idea!
We'll shop this around the team.

Thanks for the suggestion, but after discussion with the team we've decided to keep the name as is and work on improving our docs to make the purpose of the project clearer.


docs: include information that simulators are not supported

It would be helpful to point out in the README that the simulator is not a supported platform and will not send data to Mixpanel (at least on iOS).

hi @danallen88 , the simulator should work just fine, are you sure your simulator has internet access?

Ah, I wonder if the traffic is being blocked by an aggressive corporate firewall. My apologies, I'll close the issue.