added export_geojson docstring

Description
Please include a summary of the change and which issue is fixed. Please also include
relevant motivation and context. List any dependencies that are required for this
change.
Fixes #30
Type of change

[ ] New feature (non-breaking change which adds functionality)
[ ] Optimization (back-end change that speeds up the code)
[ ] Bug fix (non-breaking change which fixes an issue)

Key checklist

[ ] Make sure you've run the pre-commit checks: $ pre-commit run -a
[ ] All tests pass: $ poetry run pytest

Further checks

[x] Code is commented, particularly in hard-to-understand areas
[ ] Tests added that prove fix is effective or that feature works

Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Ideally you want to replace this with your own text.

Fixes #30
Type of change

[ ]  New feature (non-breaking change which adds functionality)
[ ]  Optimization (back-end change that speeds up the code)
[ ]  Bug fix (non-breaking change which fixes an issue)
I'd choose one of these or put N/A

Key checklist

[ ]  Make sure you've run the pre-commit checks: $ pre-commit run -a
[ ]  All tests pass: $ poetry run pytest

Check these boxes or put N/A

Further checks

[x]  Code is commented, particularly in hard-to-understand areas
[ ]  Tests added that prove fix is effective or that feature works


socat: Address already in use

$ bundle exec aptible db:dump <db-name>
(8ミ | INFO: Connecting to database...

2014/08/05 20:28:29 socat[1012] E bind(3, {AF=2 <IP_ADDRESS>:8080}, 16): Address already in use

Hi ,
I recently downloaded aptible and when I ran aptible db:tunnel sqldb-dev , I still see the same error issue . I installed the aptible-toolkit for Ubuntu-64 .
This is the error -
nandy@NAMRATHA:~$ aptible db:tunnel sqldb-dev
Creating tunnel...
/opt/aptible-toolbelt/embedded/lib/ruby/gems/2.2.0/gems/aptible-cli-0.7.3/lib/aptible/cli/helpers/tunnel.rb:53:in rescue in start': Tunnel did not come up, is something else listening on port 60387? (RuntimeError) bind: Address already in use (8ミ | INFO: Connecting to database... (8ミ | ERROR: 403 (access_denied)         from /opt/aptible-toolbelt/embedded/lib/ruby/gems/2.2.0/gems/aptible-cli-0.7.3/lib/aptible/cli/helpers/tunnel.rb:56:in start'

Hi ,
Wondering if anyone got a chance to look into my previous message ?
Your help would be greatly appreciated .
Thanks

@nandusiyer these two issues have nothing to do with one another;  this issue is about a server-side problem, yours is about a client-side problem.
I've already answered in https://github.com/aptible/aptible-cli/issues/198: this isn't something we're able to reproduce, and while we're happy to try and help, Windows isn't a supported platform for the CLI at this point, so we recommend you set up a VM.

I am facing the same issue mentioned by @nandusiyer. I have been using this command to connect to my database without any problems on my mac. It doesn't work anymore and this is the error I get.
aptible/cli/helpers/tunnel.rb:56:in `rescue in start': Tunnel did not come up, is something else listening on port 56247? (RuntimeError)
Bad local forwarding specification '56247:/var/run/port-forward/132fb914-a35f-4df9-808d-fc3477d49515'

@niyando Versions 0.8 and up of the Aptible CLI require using a recent enough version of OpenSSH (>= 6.7) for database tunnels (this requirement is here to make DB tunnels more secure).
To fix this issue, you could ensure you're using a newer version of OpenSSH, but we'd recommend using the Aptible Toolbelt instead: https://www.aptible.com/support/toolbelt/
The Toolbelt is a packaged version of the Aptible CLI, which includes necessary support software, including a recent version of OpenSSH.


Free memory used by UstringTable on exit

Previously values of this map were only allocated in make_unique()
and never freed afterwards. This isn't harmful, but makes it much
more difficult to troubleshoot possible leaks in software which
uses OpenImageIO,
Added a destructor to UstringTable now which frees memory used
by map values.

Have you measured the difference in shutdown time with this added? I am actually in the process of making a new implementation of ustring and I found that I can make it quite a bit faster by just letting memory leak (since by definition there is no way to free a ustring).
Would you be willing to wrap the code in #ifndef NDEBUG so that it only gets executed on debug builds?

For our case of blender it's nearly unmeasurable difference of 0.00001s. But we're using jemalloc, which si a good idea on linux for us because of much less memory fragmentation.
I'll be fine if the code is wrapped with either NDEBUG check. Also just throwing an idea: could be a cmake option disabled by default?
Also, if the speed is critical, could worth using memory pool/arena?

Yes speed is critical, you would be surprised how much memory we spend on strings in our renderer :) Of course its only going to be noticeable for cases with multiple millions of strings added. For example try doing:
ustring_test --threads 24 --trials 1 --iters 100000000
This will create 100M strings which is a good stress test. In the current implementation, this take a long time to shutdown after the benchmark is over.
My new implementation does use memory pools, but simply throws away the old pointers when allocating new blocks. I'm not sure its worth the overhead of tracking them just so they can be released.
The other problem with releasing ustrings on shutdown is the old "destruction order fiasco", any global destructors that happen to run ''after'' the global ustring one but access a ustring in some way could trigger a very sneaky crash.

How about instead, add an explicit clear() method, whose dangerous use is only for apps that want to reclaim all memory at shutdown? Another use is for benchmarks that want to do multiple time trials and have every one do the same series of allocations.

That's actually a good point of destructor order fiasco. We're just lucky enough not to use ustring from any destructors.
An explicit clear() method would be like the only reliable way to deal with this. It'll totally work for us, so if it also doesn't cause troubles from your side then would consider this approach having lest degree of "suckness" :)

Forgot to ask, how to process with the change? I'm totally up to updating patch so it'll introduce a dedicated clear() callback. But should i do it against master, or the ustring refactor branch is published somewhere so i can create patch against it or i'd need to wait for the ustring refactor to be merged to master?

Maybe your existing patch is appropriate against RB-1.5 if you want the current release to have this feature, but for master, wait until Chris submits his patch because he has totally overhauled the internals and almost certainly your patch will be entirely wrong for the new implementation.

I am just polishing up the new implementation now, I will post a pull request against master.
I would recommend waiting for that patch to land in master, and then implementing clear() on top of that one.

I'm not inclined to backport Chris's total internal ustring overhaul to any release branch (at least, not without some time passing to make sure it's well exercised in a production environment). So if you want the ability to free the table in RB-1.5, you may want to keep the patch you've already written against the "old" implementation and submit a PR for it against RB-1.5.
But if you're only concerned with the future, then just re-implement it atop Chris's forthcoming patch.

New patch was just reviewed and pushed to master. It should be self-explanatory, it just drops most malloc() calls without worrying about freeing them. At the same time, it shouldn't be too hard to maintain a short stack of allocated pools so you can free them in a clear() method.

Closing. I think Chris' work a few years ago superseded this. I don't think there is any harm in just dropping the allocations when the app exists.


Anyone seeing odd display issues?

Have the countdown running on a site and two users have had issues with scrolling where their entire screen or half of their screen will blink black when the seconds tick. Have not been able to reproduce it on any browser/OS combo, so I am thinking it is likely an LCD display or graphic chipset problem. However, there is no common element.
Anyone else seen/heard anything like this?

Do you mean  #72 issue?

Thanks. I missed that when I searched the issues. I'm not sure it's the same problem, but we'll try it out. Closing this thread in the meantime.


Window is not defined

Hi.
I'm trying to make my SSR build work.
I followed the docs, and i'm able to make the build.
But, when I try to run on the server I receive the error.
ReferenceError: window is not defined
coming from thie line
	var jsonpArray = window["__LOADABLE_LOADED_CHUNKS__"] = window["__LOADABLE_LOADED_CHUNKS__"] || [];
Here is my webpack config (nothing special in it)
var webpack = require('webpack')
var externals = require('./externals.js')
var path = require('path')
var stylesLoaders = require('./stylesLoaders')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const LoadablePlugin = require('@loadable/webpack-plugin')
const externalsSsr = {
  ...externals,
  pikaday: 'pikaday',
  'vanilla-lazyload': 'vanilla-lazyload',
  'vanilla-lazyload/dist/lazyload.min.js':
    'vanilla-lazyload/dist/lazyload.min.js'
}
module.exports = {
  cache: false,
  entry: {
    apps: [path.resolve(__dirname, '../js/server-side-app/apps.js')]
  },
  optimization: {
    splitChunks: {
      chunks: 'initial',
      minSize: 100000
    }
  },
  // this will create a library that will create an object CityWonders.Apps to this.
  // If imported inside the DOM, it will add it to the window object
  output: {
    library: ['CityWonders'],
    path: path.resolve(__dirname, '../js/server-side-app/'),
    filename: '[name].min.js',
    libraryTarget: 'this'
  },
  mode: 'development',
  plugins: [
    new webpack.IgnorePlugin(/moment/),
    new MiniCssExtractPlugin({}),
    new LoadablePlugin(),
    new webpack.optimize.LimitChunkCountPlugin({
      maxChunks: 1
    })
  ],

  externals: externalsSsr,
  module: {
    rules: [
      {
        test: /\.(js|jsx)?$/,
        loader: 'babel-loader',
        include: [path.resolve(__dirname, '../js')],
        exclude: /(node_modules|bower_components)/
      },
      {
        test: /\.svg$/,
        loader: 'svg-inline-loader'
      },
      {
        // css without modules. Has sideeffect
        test: /\.scss$/,
        exclude: /\.module\.scss$/,
        sideEffects: true,
        use: [
          MiniCssExtractPlugin.loader,
          stylesLoaders.CSSLoader,
          stylesLoaders.sassLoader
        ]
      },
      {
        test: /\.module\.scss$/,
        use: [
          MiniCssExtractPlugin.loader,
          stylesLoaders.CSSModuleLoader,
          stylesLoaders.sassLoader
        ]
      }
    ]
  },
  resolve: {
    modules: ['node_modules', path.resolve('.')]
  },
  node: {
    net: 'empty',
    tls: 'empty',
    dns: 'empty',
    fs: 'empty'
  }
}

and my .babelrc
"production": {
      "presets": [
        [
          "@babel/preset-env",
          {
            "targets": {
              "safari": 10,
              "ie": 11
            },
            "loose": true,
            "useBuiltIns": "entry",
            "corejs": 3
          }
        ],
        "@babel/preset-react"
      ],
      "plugins": [
        "@babel/plugin-transform-object-assign",
        "@babel/plugin-transform-react-inline-elements",
        "@babel/plugin-transform-regenerator",
        "@babel/plugin-syntax-dynamic-import",
        "@babel/plugin-syntax-import-meta",
        "@babel/plugin-proposal-class-properties",
        "@babel/plugin-proposal-json-strings",
        // "css-modules-transform",
        [
          "@babel/plugin-proposal-decorators",
          {
            "legacy": true
          }
        ],
        "@babel/plugin-proposal-function-sent",
        "@babel/plugin-proposal-export-namespace-from",
        "@babel/plugin-proposal-numeric-separator",
        "@babel/plugin-proposal-throw-expressions",
        "@loadable/babel-plugin"
      ]
    }

Thank you for the help.
I really want to use loadable-components

I was actually able to solve that adding this option in webpack config
output.globalObject: 'this'

Thanks for updating with your solution @felipetoffolo1!

Didn't work for me.
I don't know if it's NextJS not setting Webpack or if the solution doesn't work


Add a mention of the possibility of using with nuxt3

Is your feature request related to a problem? Please describe.
No implementation for nuxt3
Describe the solution you'd like
I implemented my solution to use this package in nuxt3 environment. Could add a link to README.MD for people who want to use this with nuxt3.
Additional context
My contacts:
telegram
My package:
npmjs
github

thanks
its helpful


Error parsing forward channel RangeError: port should be >= 0 and < 65536: NaN

Hi there,
Hitting this bug. :(
Error parsing forward channel RangeError: port should be >= 0 and < 65536: NaN
    at Socket.connect (net.js:917:13)
    at Object.exports.connect.exports.createConnection (net.js:92:35)
    at Connection.start (/Users/pedrosanta/git/editor/node_modules/livedb-mongo/node_modules/mongodb/lib/mongodb/connection/connection.js:173:29)
    at _connect (/Users/pedrosanta/git/editor/node_modules/livedb-mongo/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:211:16)
    at ConnectionPool.start (/Users/pedrosanta/git/editor/node_modules/livedb-mongo/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:231:3)
    at Server.connect (/Users/pedrosanta/git/editor/node_modules/livedb-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:709:18)
    at Db.open (/Users/pedrosanta/git/editor/node_modules/livedb-mongo/node_modules/mongodb/lib/mongodb/db.js:281:23)
    at connectFunction (/Users/pedrosanta/git/editor/node_modules/livedb-mongo/node_modules/mongodb/lib/mongodb/mongo_client.js:275:67)
    at Function.MongoClient.connect (/Users/pedrosanta/git/editor/node_modules/livedb-mongo/node_modules/mongodb/lib/mongodb/mongo_client.js:345:5)
    at SkinClass.SkinDb._open (/Users/pedrosanta/git/editor/node_modules/livedb-mongo/node_modules/mongoskin/lib/db.js:36:25)
    at SkinClass.open (/Users/pedrosanta/git/editor/node_modules/livedb-mongo/node_modules/mongoskin/lib/utils.js:162:14)
    at SkinClass.SkinCollection._open (/Users/pedrosanta/git/editor/node_modules/livedb-mongo/node_modules/mongoskin/lib/collection.js:49:17)
    at SkinClass.open (/Users/pedrosanta/git/editor/node_modules/livedb-mongo/node_modules/mongoskin/lib/utils.js:162:14)
    at SkinClass.(anonymous function) [as findOne] (/Users/pedrosanta/git/editor/node_modules/livedb-mongo/node_modules/mongoskin/lib/utils.js:116:14)
    at LiveDbMongo.getSnapshot (/Users/pedrosanta/git/editor/node_modules/livedb-mongo/mongo.js:100:32)
    at Livedb._getSnapshot (/Users/pedrosanta/git/editor/node_modules/livedb/lib/index.js:613:21)

Using livedb 0.5.12 and livedb-mongo 0.4.1.
Any hints on what it might be?
Cheers.

Sorry, my bad, bad Mongo URI because of bad config. :) Plainly stated on the error, port was NaN. Closing this.


[Fix] bbox_nms function

Description
According to the documentation of batched_nms, the second argument should the scores for each one of the boxes but in the current implementation valid_cls is used which is a tensor of class indexes. I believe valid_con should be used instead. I tried to update the tests to exhibit the issue.
Type of Change
Bug fix (non-breaking change which fixes an issue)
Checklist:

[x] The code follows the Python style guide.
[x] Code and files are well organized.
[x] All tests pass.
[x] New code is covered by tests.
[x] The pull request is directed to the corresponding topic branch.

Licensing:
By submitting this pull request, I confirm that:

[x] My contribution is made under the MIT License.
[x] I have not included any code from questionable or non-compliant sources (GPL, AGPL, ... etc).
[x] I understand that all contributions to this repository must comply with the MIT License, and I promise that my contributions do not violate this license.
[x] I have not used any code or content from sources that conflict with the MIT License or are otherwise legally questionable.

Hi,
Thank you for your pull request! That was indeed a mistake on my part, and I will merge this PR as soon as possible. However, could you please submit your PR to the DEPLOY branch instead of the main branch?
Thank you!
Best regards,
Henry Tsui

Thank you @henrytsui000. I rebased my PR on the DEPLOY branch.


A more general solution to model answer extraction instead of output_regex

Hi there!
Here is the PR for model answer extraction. Currently,  we have output_regex and this PR attempts to replace it with a more general solution.
By the way, our current output_regex seems to be broken as it's not fed into apply_generative_metric in Pipeline._compute_metrics
Fixes #360

Hi Sadra,
Sorry if I missed it, but did you discuss this PR in an issue before adding it?

Hi! We removed output_regex a couple PRs ago, and it's likely we would want this answer extraction step to happen at the metric stage and not in the task itself, so I'm going to close this PR.
Please start by discussing next features you want to add in issues first, and once we approve feel free to go for them


Fix a delayed resource deallocation

One of the fault injection tests was failing on weave-ping in a case
where a WRMP echo request was responded to but not acknowledged.  The
proper behavior for the echo client is to abort the exchange (which
implies not worrying about the pending retransmissions) when the valid
echo response was received and there is no pending action on a WRMP
ack.

Codecov Report

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

@@            Coverage Diff             @@
##           master     #253      +/-   ##
==========================================
+ Coverage   54.22%   54.23%   +<.01%
==========================================
  Files         332      332
  Lines       56403    56403
==========================================
+ Hits        30586    30589       +3
+ Misses      25817    25814       -3

Impacted Files
Coverage Δ

src/test-apps/TestCASE.cpp
96.1% <0%> (+0.22%)
:arrow_up:

src/lib/profiles/security/WeaveCert.cpp
84.41% <0%> (+0.64%)
: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 0666493...3d9f89e. Read the comment docs.


Delete the Loris caches

AIUI, Loris has three caches:

Cache of the full-size original files from S3, in case you want to redraw new derivatives
Cache of the info.json files (small, probably not great for NFS performance)
Cache of the derived image files served to users (which are already cached by CloudFront)

Right now Loris only has a binary enable_caching config option – it would be nice to disable the latter two and see if that improves performance. Will likely require upstream changes.

Gatling tests showed that the EFS cache wasn’t helping performance – rescoping this ticket to track deleting that old config when we have a few more runs under our belts.

Closed by #758.

Apropos, where is the info.json cache stored? I did some apache configurations to change the URL pattern of Loris, but a few of the info.json files still contain the old URI.

@ewg118 If you look in your Loris configuration, under [img_info.InfoCache], it’s the cache_dp key.
For example:
https://github.com/wellcometrust/platform-api/blob/master/terraform/services/config/templates/loris.ini.template#L58-L59


settings: Fix simplebar overflow in settings sidebar.

The settings sidebar scrolls into the "Profile/Organisation" header when there are several options in the menu, overlapping with the text in the header. This can been reproduced when in the organisation settings menu, the "show more" option is selected to expand the list. The ideal behaviour should be a scroll-able content below the header, which separates the menu contents from the "Profile/Organisation" header.
Additional info: CZO discussion.

GIFs or screenshots:

Before
After

@timabbott  I have updated the description with the reasoning behind this change, thank you.

I played with the PR, and it looks good. Excited to see this fixed!

@sayamsamal can you try splitting this into a few commits for readability? I see you're adding a wrapper div, but I don't know why that's required, and also what changes are conceptually just executing that vs. the other pieces, and so it's hard to review carefully.

@sayamsamal just a bump on this PR, whenever you get a chance.

@alya thank you for the trusty remainder, very much appreciated. I'll be following up really soon.

This is great, thanks for the explanation @sayamsamal! I merged this, with a bonus commit to further reduce magic numbers by using variables for the common values that need to be equal for this to look good.
There's probably a lot more cleanup that can be done in that direction in that CSS file, but at least this detail should now be a lot more readable.


An event should become a “past event” when its end date is in the past (not its start date)

The MA starts tomorrow and continues until the 11th. But on the 11th, it will be shown as a “past event” on the website, because its start date will be in the past. Obviously it’s not an “upcoming event” either (its an “ongoing event”!) But I think I would expect to find it at http://iatistandard.org/en/events/
Obviously this is a bit edge-case, and would only really be an issue for longer running events. But it’s a bug, and the fix is super easy.

Oh, I see – date_end is nullable, and if it’s null in the database it’s assumed to be the same as date_start. So filtering on date_end__lte won’t work (which is probably the reason it’s not done that way currently.)
Okay, well the fix isn’t as easy as I thought, so perhaps it’s not worth it.
If it were me, I’d sort this out with a clean_ function that forces date_end to be populated, and then a data migration to apply that retrospectively, and then a migration to make date_end not nullable.


Allow disabling output of dative bonds to SMILES

Also adds the option to write dative bonds to SMILES as coordinate bonds.
Fixes #7372
Still needs:

[ ] add support to SMARTS/CXSMARTS
[ ] add support to reaction SMILES/SMARTS writers

Why not off by default?

Why not off by default?

Firstly because that would be serious change in behavior. Secondly because I believe that it, like the other SMILES and SMARTS extensions the RDKit supports, are valuable and useful additions.

@bp-kelley do you have time to finish this review so that we can get this on in next week's release?

@bp-kelley do you have time to finish this review so that we can get this one in next week's release?

@bp-kelley : @ptosco did a review, so don't worry about this one.


Update bootstrap.sh to use HTTPS instead of Git protocol

Update Git repositories to use HTTPS protocol instead of git:// because bootstrap.sh won't clone the repos (not sure why the git protocol does not work with GitHub)
APPSCALE_REPO="https://github.com/AppScale/appscale.git"
APPSCALE_TOOLS_REPO="https://github.com/AppScale/appscale-tools.git"
AGENTS_REPO="https://github.com/AppScale/appscale-agents.git"
THIRDPARTIES_REPO="https://github.com/AppScale/appscale-thirdparties.git"

Also, the tag last does not work, I had to add 3.8.1


Fix namespace flag position in kubectl gs get apps

Please remember to

[x] Give the PR a meaningful title -- it will be shown in the release notes
[ ] Add (or remove) user questions associated with any updated docs

Going with a ping.


Can't preload resource uid for PackedScene.

Godot version
v4.1.1.stable.mono.official [bd6af8e0e]
System information
Godot v4.1.1.stable.mono - Ubuntu 20.04.2 LTS (Focal Fossa) - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1050 Ti (nvidia; 525.125.06) - Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz (8 Threads)
Issue description
In an attempt to learn how loading differing scenes work, I attempted to load/preload a PackedScene from a simple gdscript. Loading things seems to work fine regardless of whether or not I use a path like "res://whatever", or a resource uid such as "uid://clm7c2mtievx2".
The same does not appear to be true for preloading which only can seem to take "res://whatever", and not the resource uid. Instead we get errors such as:
"Condition "nc == 0" is true. Returning nullptr",
"Parameter "p_child" is null".
As I could not figure out what was causing this, I took to discord asking for help. Someone kindly helped me out, and found that the problem code seems to be here and recommended I make an issue.
Steps to reproduce
Create an empty project. Create a main scene with a Node called Main, and attach a script to it containing the following:
extends Node
var loadGame = load("UIDHERE")
func _ready():
    var game = loadGame.instantiate()
    self.add_child(game)
Now create another packed scene, and save it. Right click this packed scene to "Copy UID", and replace "UIDHERE" in the script we just made a moment ago with the UID we just copied. Observe that upon playing the game, it works fine. Now change load("uid://...") out with preload("uid://..."). You should now receive the errors mentioned above.
Minimal reproduction project
PreloadUIDPackedSceneBug.zip

Looks like a bug in ResourceLoader. It assigns UID as path.


German Translation

Hi!
I would like to contribute to the german translation, can you please accept my request on transifex?
Thanks,
Damian

@dkbast Sure, just accepted!
I may need to update translation files before, so I keep this issue open for a while.
Thank you!

@dkbast Thank you!
I just released new version 0.8.5 with new translations files added (German as well!)

@dkbast https://github.com/inoks/django-classified/blob/master/django_classified/locale/de/LC_MESSAGES/django.po#L6


toMap() should take optional key/value selector functions

Common use case for easily indexing a sequence of data. It would basically work like this:
let data = Immutable.List.of(
    { id:1, value:"value 1" },
    { id:2, value:"value 2" },
    { id:3, value:"value 3" }
);

let mappedObjects = data.toMap((item) => item.id);
let mappedValues = data.toMap((item) => item.id, (item) => item.value);

Currently you would probably use reduce:
let data = Immutable.List.of(
    { id:1, value:"value 1" },
    { id:2, value:"value 2" },
    { id:3, value:"value 3" }
);

let mappedObjects = data.reduce((map, item) => map.set(item.id, item), Immutable.Map());
let mappedValues = data.reduce((map, item) => map.set(item.id, item.value), Immutable.Map());

Related: #600

I started making a pull request, but there appear to be failing tests on master at the moment. This is the code I came up with to replace toMap().
toMap(keySelector, valueSelector) {
  // Use Late Binding here to solve the circular dependency.

  // build a reducer that takes selector functions into account
  var reducer = null;
  if (keySelector && valueSelector)
    reducer = (m, v, k) => m.set(keySelector(v, k), valueSelector(v, k));
  else if (keySelector)
    reducer = (m, v, k) => m.set(keySelector(v, k), v);
  else if (valueSelector)
    reducer = (m, v, k) => m.set(k, valueSelector(v, k));

  // reduce required?
  if (reducer === null)
    return Map(this.toKeyedSeq());

  // apply selector functions via reducer
  return this.reduce(reducer, Map());
}

This convenience method is going to be removed in a future version of Immutable as it can be confusing and currently restricts the ability to do incremental builds of Immutable. e.g. instead of doing: myThing.toMap() you would write Map(myThing)
This also means if you would like a mapping function to construct the Map, you could write: Map(myThing.map(a => [b, c]))

Does Map(myThing.map(a => [b, c])) work currently?
I don't see how toMap is confusing, although I can see how it presents a problem for modularity. If all the transform functions (ie map()) returned a generic Seq or Iterable like they used to, this wouldn't be a problem at all. The Map module could have easily extended the prototype of Seq to include a definition for toMap().
Removing toMap() and family hurts chainability, since the constructor must come first. Thus, if you have a longer chain of transformations with a concrete data type in the middle, you have to bounce back and forth as you read the code, leading to reduced readability and comprehension.

Yep, I agree with you. What we're looking at is a tradeoff between chainability and modularity. Currently the library optimizes for chainability, but that means modularity isn't possible. As there's simultaneous demand for adding new kinds of data structures while also reducing the size of the library, we're stuck until the modularity problem is solved, and unfortunately that means giving up some chainability.
Luckily, after surveying a large body of code that uses Immutable, conversion between different types is far from the most common of operations, so this should have relatively small impact on code quality and readability.

Does Map(myThing.map(a => [b, c])) work currently?

It does!
var list = Immutable.List([ 1, 2, 3 ]);
var map = Immutable.Map(list.map(v => [ v, v ]));
map.toString();
"Map { 1: 1, 2: 2, 3: 3 }"

I think there is something wrong with the map() function then. This is what I tried before:
var m = Immutable.Map({ "10":100, "20":200 }).map((v, k) => [parseInt(k), v]);
m.toString();
// "Map { "10": 10,100, "20": 20,200 }"

Luckily, after surveying a large body of code that uses Immutable, conversion between different types is far from the most common of operations, so this should have relatively small impact on code quality and readability.

This issue and issues like it show we think converting between data types should less painful, but it looks like the project is going in the opposite direction.

I'm sorry you feel that way @dubrowgn, my hope is to balance lots of different concerns for a best possible outcome. I understand that means tradeoffs in some places in order to accomplish other things. I certainly am not trying to actively move in a direction opposite from where issues are trying to highlight, on the contrary I'm trying to move in a direction that can satisfy as many as possible.
Here I'm just trying to highlight that it's good news that your proposed code:
data.toMap((item) => item.id, (item) => item.value);

Can be written today as:
Map(data.map((item) => [ item.id, item.value ]));

And that is both compatible with where the library's API is going in the future, and I hope is also not too detrimental to code legibility.

I think there is something wrong with the map() function then. This is what I tried before:
var m = Immutable.Map({ "10":100, "20":200 }).map((v, k) => [parseInt(k), v]);
m.toString();
// "Map { "10": 10,100, "20": 20,200 }"

My assumption with the example code above was that you were converting from a List to a Map. If you already have a Map, then at least we're beyond the question of conversion.
The .map() function on a Map type maps over the values, maintaining keys. If you want to map over each entry as a separate element, then you should check out .mapEntries() which let's you write:
var m = Immutable.Map({ "10":100, "20":200 }).mapEntries(([k, v]) => [parseInt(k), v]);
m.toString();
// "Map { 10: 100, 20: 200 }"

Good to know, thanks!
When using JSON to encode maps, int keys always come out as strings, so this kind of Map to Map conversion happens pretty regularly in the project I am working on.
It seems strange that map() would behave differently depending on the source data type. The docs for map() don't mention this either. Given that map() always provides a key-value pair to the mapper function anyway, the distinction between Iterable.map and KeyedIterable.map is surprising to me.


dotnet-sdk_6: 6.0.414 -> 6.0.416, dotnet-sdk: 7.0.401 -> 7.0.403, dotnet-sdk_8: 8.0.100-rc.1.23455.8 -> 8.0.100-rc.2.23502.2

Description of changes
Standard version update
https://github.com/dotnet/core/releases/tag/v6.0.23
https://github.com/dotnet/core/releases/tag/v6.0.24
https://github.com/dotnet/core/releases/tag/v7.0.12
https://github.com/dotnet/core/releases/tag/v7.0.13
https://github.com/dotnet/core/releases/tag/v8.0.0-rc.2

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)
[x] 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

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

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

[x] Fits CONTRIBUTING.md.

@NixOS/dotnet

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/2782

Bumping since versions for 6.0 and 7.0 with security fixes were released

nixpkgs-review reveals no new failures for me, macos 10.15 & nixos x86_64.


Update outdated packages

FYI: @eerhardt
Looks like dependabot has been broken for a while, and @eerhardt brought that to our attention. Given it hasn't run in a couple months now, doing a bulk update manually of all dependencies that are no longer up-to-date.
Microsoft Reviewers: Open in CodeFlow

My latest commit will fail the build as some packages are missing from the feeds. I have manually mirrored them and it will take a bit for them to show up, so I'll re-kick the build once it's ready.

I suppose we could have a GitHub action that runs this tool..

If we did that, we would need to fix it to query nuget.org, and not our configured feeds.

yeah. The way I did it locally was by:

Restore the solution build.cmd -restore
reset NuGet config to point to nuget.org by running: dotnet new nugetconfig --force from the root of the repo, which replaces our checked in nuget.config with the default one that o nly has nuget.org.
ran the tool and enabling the no-restore option with -n since removing the other feeds would otherwise cause the build to fail: dotnet-outdated -n -u .\Aspire.sln


Switch RP NSG from using rpNsgSourceAddressPrefixes to static GenevaActions service tag

Which issue this PR addresses:
Fixes https://msazure.visualstudio.com/AzureRedHatOpenShift/_workitems/edit/14930561/
What this PR does / why we need it:
Geneva Actions added support for service tags earlier this year. As a result, Microsoft has requested we stop using fixed lists of IPs in our NSGs and instead use the GenevaActions service tag. This PR removes support for the rpNsgSourceAddressPrefixes key from the deploy configuration and instead adds an NSG allowing GenevaActions the same  way we currently allow AzureResourceManager.
There will be two corresponding PRs for the RP-Config repo, one updating the INT and FF INT configuration for testing, and one updating Prod.
Test plan for issue:
We will deploy these changes to INT/FF INT and confirm that Geneva Actions works there.
Is there any documentation that needs to be updated for this PR?
There is no documentation for rpNsgSourceAddressPrefixes.

/azp run e2e

Do not merge. Need review and testing.

/azp run OneBranch - Build and Publish Binary and Container - PullRequest

Test failed.
2022-08-19 21:47:02.361339: time="2022-08-19T21:47:02Z" level=fatal msg="features.DeploymentsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code=\"InvalidTemplateDeployment\" Message=\"The template deployment 'rp-production-predeploy' is not valid according to the validation procedure. The tracking id is '11097388-19a9-4865-9d7c-c5306dd80860'. See inner errors for details.\" Details=[{\"code\":\"SecurityRuleParameterContainsUnsupportedValue\",\"details\":[],\"message\":\"Security rule parameter SourceAddressPrefix for rule with Id /subscriptions/0cc1cafa-578f-4fa5-8d6b-ddfd8d82e6ea/resourceGroups/aro-int-eastus/providers/Microsoft.Network/networkSecurityGroups/rp-nsg/securityRules/rp_in_geneva cannot specify existing VIRTUALNETWORK, INTERNET, AZURELOADBALANCER, '*' or system tags. Unsupported value used: GenevaActions.\"}]" func="main.main()" file="cmd/aro/main.go:88"

Tested successfully in public int; confirmed Geneva Actions can still talk to the RP after updating the NSG.

Another thing too:
We probably want to ensure this works in Fairfax, just to make sure the service tag exists.  If you wanted to kick off a deploy to FF INT that would confirm everything works as expected.

/azp run e2e


deals: include DealID and ActivationEpoch

Include DealID and ActivationEpoch information to successful deal results.
The DealID is an identifier of the Deal to be used as a reference in other APIs.
The ActivationEpoch is the epoch in which the Deal became fully active on-chain, which only the chain knows when the miner provides the first proof that it's storing the data properly. This precise information is needed to correctly run the deal-renewal algorithm since we need the ActivationEpoch plus the Duration to take appropriate actions.

A PR was merged to allow part of this to be done: https://github.com/filecoin-project/lotus/pull/1392


The null list is () not 0. Fixes jaseemabid/micromanual#5 again with …

…better formatting.

Including the built pdf file this time

Thank you :)


mockRestore does not restore original function

Describe the bug
On previous versions and as stated on documentation mockRestore should restore original function:
https://vitest.dev/api/mock.html#mockrestore:~:text=restores inner implementation to the original function
Although on this PR: https://github.com/vitest-dev/vitest/pull/3518 this behaviour was changed in order for mocked function return undefined instead of original function.
I would expect mockRestore to keep restoring the original function since it is what documentation states plus this is now breaking some of our tests and there's no breaking change report.
Reproduction
import { example } from './example.js';
...
vi.mock('./example.js');
...
test(
...
  example(); // Expected mock function to be called
  vi.mocked(example).mockRestore();
  example(); // Expected original function to be called
...

System Info
npmPackages:
    @vitest/coverage-c8: ^0.23.4 => 0.23.4
    vite: ^4.4.9 => 4.4.9
    vitest: ^0.34.5 => 0.34.5

As workaround I am now doing the following (but it's quite verbose):
vi.mocked(example)
 .mockReset()
 // @ts-ignore
 .mockImplementation(undefined);

Used Package Manager
pnpm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

Technically automocking doesn't wrap your module. It recreates a similarly shaped object and shouldn't hold the reference to the original method.

Humm, interesting.
If we want to check how many times the function was called but also want to call the real function, what would be the recommended way to achieve that?
mockImplementation(undefined) restores function to call the real one, but not sure if that's the best way to do so.

If we want to check how many times the function was called but also want to call the real function, what would be the recommended way to achieve that?

I would recommend using vi.spyOn instead:
import * as example from './example.js'
const spyExample = vi.spyOn(example, 'example').mockImplementation(() => true)
spyExample.mockRestore()

Thank you. I finally had the opportunity to test this way and it solved.


Latest rpm release seems bad

$ rpm -i elassandra-<IP_ADDRESS>.rpm
error: elassandra-<IP_ADDRESS>.rpm: tag[46]: BAD, tag 1096 type 5 offset 34256 count 332 len 1328
error: elassandra-<IP_ADDRESS>.rpm cannot be installed

The rpm release based on Cassandra 3.11.3 is having the same issue. Looks damaged.

The rpm release based on Cassandra 3.11.3 is having the same issue. Looks damaged.


[T5A2][T13-B1] Nathan Ohun Kwon

@kwonn
Some comments added. Please ack & close the PR after reading comments.

Thank you!


SQLfmt not found but it is installed

Expected behavior
I expect the format on save behavior to work with my power user plug-in when working with jinja SQL files.
Actual behavior

When I run the same node command that checks for sqlfmt in the node repl in my terminal using the same python environment as the power-user plugin I get the correct location.
await which.default('sqlfmt')
>> '/Users/me/.pyenv/shims/sqlfmt'

Steps To Reproduce
pyenv install 3.8.10
pyenv virtualenv 3.8.10 dbt
pyenv local dbt
pyenv activate dbt
pip install dbt-bigquery==1.2.0
pip install "shandy-sqlfmt[jinjasql]"

Then select the dbt virtual env for the python environment and try to save a file
Log output/Screenshots

Operating System
13.0.1 (22A400)
dbt version
1.2.0
dbt Adapter
bigquery
dbt Power User version
v0.10.1
Are you willing to submit PR?

[X] Yes I am willing to submit a PR!

Currently we only support a global installation (available on $PATH).
I see that you are willing to submit a PR. Please contact me if you need help implementing this!

I am having the same issue even if I have install the package on my base installation. Here is the message i am getting: Could not run sqlfmt. Did you install sqlfmt? Detailed error: Error: Illegal value for line

I am having the same issue even if I have install the package on my base installation. Here is the message i am getting: Could not run sqlfmt. Did you install sqlfmt? Detailed error: Error: Illegal value for line

@jlpjavi : as discussed, please provide a pr for this specific issue

It simply does not work for me. Followed the instructions step-by-step, and still get this error message:

Tried conda and .venv and nothing.

Had trouble getting this to work. Installed on Windows 10 using pipx which put the executable in ~/.local/bin. Even after I added that to my PATH, I kept getting the above error (Illegal value for 'line'). I could run sqlfmt from my command line.
I solved it by moving the sqlfmt.exe file into another directory that is also on my path (~/bin, in my case). Weird!

Had trouble getting this to work. Installed on Windows 10 using pipx which put the executable in ~/.local/bin. Even after I added that to my PATH, I kept getting the above error (Illegal value for 'line'). I could run sqlfmt from my command line.
I solved it by moving the sqlfmt.exe file into another directory that is also on my path (~/bin, in my case). Weird!

I'm having the same issue on MacOS.

Same issue on Mac

For anyone who is using VS Code, sqlfmt's documentation shows how you can do it without dbt-power-user extension.

First, install Run on Save
Configure "Run on Save" to run sqlfmt

Hi, @mdesmet.

Currently we only support a global installation (available on $PATH).

If I am use windows, do I need to add it to Windows $PATH? I tried adding to $PATH in my .bashrc file (I am using git bash), so now it works in terminal, but the VS extension does not.
In case somebody else has the same issue, I found my executable file under "C:\Users[USER_NAME]\AppData\Roaming\Python\Python310\Scripts"

@ezk84,  @pebabion,
The illegal value for 'line' bug is happening after dbt Power User has already identified sqlfmt, and has to do with the length of the formatted document being longer than the original document.
This has been solved in #387
@mdesmet,@jlpjavi looking at the number of issues with finding the sqlfmt does it make sense to add a setting field where users can define the path to their installation of sqlfmt?
So in the dbtDocumentFormattingEditProvider.ts first look for the sqlfmt path defined in settings, if empty check  $PATH

Resolved by https://github.com/innoverio/vscode-dbt-power-user/commit/b21ea11c3d32b4d94bd4e45e4455bc2ef7b0ee2c


Update to Nielsen usability heuristics: Initial commit

Partial update of Nielsen Heuristics page, including citations and additional context. Work in progress.

Overall, really good initial commit.  I love how citations are embedded in the markdown file.

Finish the other sections.

I will be sure to complete the document, following the same pattern as before.


Fix typo in core/index.md

fix typo (i with diaeresis)

This doesn't seem like an error: naive and naïve are both OK, no? In fact, naïve is slightly move accurate, since this French-originating word isn't pronounced according to standard rules (that would sound like knave).


Add workflow for Minimum Rust Version badge

Resolves #525
This CI is very slow, taking about 15 minutes to complete. To help reduced conflicts, I added a git pull to the script that commits the badge.
However, this slowness might be something to consider for the workflow triggers. Perhaps the trigger should be on release instead?

Perhaps the trigger should be on release instead?

Agreed :+1:
I took care of it in e42dbb4 among other minor changes.
If the PR is good for you I'll let you trigger the workflow  to generate a new badge before merging.

Changes look good! My only change after those was changing the literal + in the shields.io URL to be percent-encoded.
Badge generated.


[feature]Whether the Maven version can be supported

Describe your idea:
When I come down and try to convert it into Maven build, a lot of errors, can u support a maven

Why do you try to build Jadx with maven. Jadx uses gradle. I like Maven, too even if it is a bit old-fashioned but gradle as the newer tool has a much higher flexibility and therefore projects that are gradle based  are unlikely to switch back to maven.

OK, I've found a way to solve it. Thank you


Fix getTransactionHash to use un-decorated function for better tree shaking

Not using the functions extended from client allows for bundlers to tree shake more effectively

@kyscott18 good call, thanks for this!

Lint error, also if you don't mind, could you run pnpm changeset and make it a patch change


Add functionality to connect a concrete game and questions taken from the API

Done:

questions are stored in an array (attribute of a game);
questions are put into an array when a game is created (questions depend on a game mode and a number of questions in a game);
questions are checked on equality (questions are equal if either a link or an image is the same);
no separate database for questions is created (not needed);
questions are sent to the front-end one by one, the back-end counts rounds of a game.

To do:

hash method (otherwise, Sonar reports a bug)

2c4a8b6


Show .dev sub-packages in search

Introduce your stance
Was trying to figure out why xcbutilkeysyms doesn't register itself in pkg-config. Thought it could be a package issue, but then discovered that "xcbutilkeysyms.dev" contains the pkg-config script. Was confused as to why https://search.nixos.org/ didn't show the dev package to me.
Describe the issue
Dev sub-packages are a bit of a magic. It would be great if https://search.nixos.org/ assisted in discovering them.
Page links
https://search.nixos.org/packages?channel=21.11&show=xorg.xcbutilkeysyms&from=0&size=50&sort=relevance&type=packages&query=xcbutilkeysyms
Additional context

Technically speaking that's not a package, it's an output of the xcbutilkeysyms package. In particular it shares all of its metadata, so I don't think it should be listed separately. We could display the outputs for each package though (maybe unless there's only out), flake-info already exports a package_outputs field so this should only require a change to the frontend.

Something doesn't match up. If it's just one of the outputs, I'd expect xcbutilkeysyms to work as a superset of xcbutilkeysyms.dev. But in my case I think xcbutilkeysyms.dev contained things not included in xcbutilkeysyms (the pkg-config stuff).

xcbutilkeysyms refers to the default out output. Outputs are separate directories and need not be included in one another. See https://nixos.org/manual/nixpkgs/unstable/#chap-multiple-output

An additional problem is that even if we list the outputs, it's not clear what these include. In fact derivation authors could add outputs for anything and even a dev output doesn't imply specific contents.

Ah, it's not as simple as I thought because nix-env -qa doesn't expose outputs, only meta.outputsToInstall. We'd need to find another way to get a flat list of nixpkgs packages.

Actually this is fixed in Nix 2.6! https://github.com/NixOS/nix/pull/5878


Build/migration problem

Describe the Bug
I found an interesting gridlock in attempting to upgrade for v1 to v2 .
I did this basically:
I did a full git pull first.
Then and install:
$ sudo -u umami yarn install
yarn install v1.22.19
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
warning<EMAIL_ADDRESS>The engine "pnpm" appears to be invalid.
[3/4] Linking dependencies...
warning " ><EMAIL_ADDRESS>has incorrect peer dependency "<EMAIL_ADDRESS>warning " ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>warning "react-spring ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>warning "react-spring ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>|| ^16.8.7-0 || ^16.9.0-0 || ^16.10.1-0 || ^16.12.0-0 || ^16.13.0-0 || ^17.0.0-0 || ^17.0.1-0 || ^17.0.2-0 || ^18.0.0-0".
warning "react-spring ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>warning "react-spring ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>warning "react-spring ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>warning "react-spring ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>warning "react-spring ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>warning " ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>|| 17.x".
warning " ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>|| 17.x".
warning " ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>warning " ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>warning " ><EMAIL_ADDRESS>has incorrect peer dependency "stylelint@>= 11.x < 15".
warning " ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>warning " ><EMAIL_ADDRESS>has unmet peer dependency "@types/node@*".
warning Workspaces can only be enabled in private projects.
[4/4] Building fresh packages...
$ node -e "if (process.env.NODE_ENV !== 'production'){process.exit(1)} " || husky install
husky - Git hooks installed
Done in 121.33s.

Some warnings there.
So I tried a build:
$ sudo -u umami yarn build
yarn run v1.22.19
$ npm-run-all check-env build-db check-db build-tracker build-geo build-app
$ node scripts/check-env.js
$ npm-run-all copy-db-files build-db-client
$ node scripts/copy-db-files.js
Database type detected: postgresql
Copied /home/umami/umami/db/postgresql to /home/umami/umami/prisma
$ prisma generate
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma

✔ Generated Prisma Client (5.0.0 | library) to ./node_modules/@prisma/client in 371ms
You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client

import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()

$ node scripts/check-db.js
✓ DATABASE_URL is defined.
✓ Database connection successful.
✓ Database version check successful.
✗ Umami v1 tables detected. For how to upgrade from v1 to v2 go to https://umami.is/docs/migrate-v1-v2.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "check-db" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

But I had already backed up my database and done a migration so no surprise that wehn i try it again:
$ sudo -u umami npx @umami/migrate-v1-v2@latest
Running v0.15.0
✓ DATABASE_URL is defined.
✓ Database connection successful.
✗ Database v1 tables have not been detected.

As I'm not sure by eye how to tell the difference, here's what the database has:
$ psql -U umami -d umami
psql (12.15 (Ubuntu 12.15-0ubuntu<IP_ADDRESS>))
Type "help" for help.

umami=> \dt
              List of relations
 Schema |        Name        | Type  | Owner
--------+--------------------+-------+-------
 public | _event_old         | table | umami
 public | _prisma_migrations | table | umami
 public | account            | table | umami
 public | event              | table | umami
 public | event_data         | table | umami
 public | pageview           | table | umami
 public | session            | table | umami
 public | website            | table | umami
(8 rows)

umami=>

I don't know if that's v1 or v2.
Database
PostgreSQL
Relevant log output
No response
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response

Sorry for the late reply. It looks like your db is still on v1. The migration checks to see if you have the latest prisma migration before running. Can you the your _prisma_migrations table and see if you have a record for 04_add_uuid.  If its not there you need to follow the steps below.

Change to the v1 branch and apply the latest migrations with yarn install, yarn build.
Verify 04_add_uuid is there.
Run npx @umami/migrate-v1-v2@latest on your v1 database.
Change to master branch and run same yarn commands.

Thanks for dropping a line. Will have to check this when I get home. But to clarify I'd be looking at the _prisma_migrations table for and 04_add_uuid. In a nutshell: SELECT * FROM _prisma_migrations and check for a 04_add_uuid entry (I can't access the database here, or could suggest SELECT * FROM _prisma_migrations WHERE some_column = '04_add_uuid' .

migration_name is the column, but yes either of those queries would work

Well it's there all right, but unfinished with a log column that reads:
A migration failed to apply. New migrations cannot be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve
Migration name: 04_add_uuid

Database error code: 42501

Database error:
ERROR: permission denied to create extension "pgcrypto"
HINT: Must be superuser to create this extension.

DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState(E42501), message: "permission denied to create extension \"pgcrypto\"", detail: None, hint: Some("Must be superuser to create this extension."), position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("extension.c"), line: Some(806), routine: Some("execute_extension_script") }

   0: sql_migration_connector::apply_migration::apply_script
           with migration_name="04_add_uuid"
             at migration-engine/connectors/sql-migration-connector/src/apply_migration.rs:105
   1: migration_core::commands::apply_migrations::Applying migration
           with migration_name="04_add_uuid"
             at migration-engine/core/src/commands/apply_migrations.rs:91
   2: migration_core::state::ApplyMigrations
             at migration-engine/core/src/state.rs:200

doh! You see I run all these things as the user umami, not as root, and also in the database with the user umami, not with a database superuser. So I istalle d the pgcrypto extension manualy and did as you've suggested, checked out v1, install and build and migrate, and all looked great. here's the log, I see no issues:
$ sudo -u umami git checkout v1
branch 'v1' set up to track 'upstream/v1'.
Switched to a new branch 'v1'

$ sudo -u umami yarn install
yarn install v1.22.19
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>warning " ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>warning "react-spring ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>warning "react-spring ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>|| ^17.0.0".
warning "react-spring ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>warning "react-spring ><EMAIL_ADDRESS>has unmet peer dependency "<EMAIL_ADDRESS>warning "react-spring ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>warning "react-spring ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>warning "react-spring ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>warning "eslint-config-next > @typescript-eslint/parser > @typescript-eslint/typescript-estree ><EMAIL_ADDRESS>has unmet peer dependency<EMAIL_ADDRESS>|| >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] Building fresh packages...
$ node -e "if (process.env.NODE_ENV !== 'production'){process.exit(1)} " || husky install
husky - Git hooks installed
Done in 66.36s.

$ sudo -u umami yarn build
yarn run v1.22.19
$ npm-run-all build-db check-db build-tracker build-geo build-app
$ npm-run-all copy-db-files build-db-client
$ node scripts/copy-db-files.js
Database type detected: postgresql
Copied /home/umami/umami/db/postgresql to /home/umami/umami/prisma
$ prisma generate
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma

✔ Generated Prisma Client (4.9.0 | library) to ./node_modules/@prisma/client in 265ms
You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
'''
import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()
'''
$ node scripts/check-db.js
✓ DATABASE_URL is defined.
✓ Database connection successful.
✓ Database tables found.
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "umami", schema "public" at "localhost:5432"

4 migrations found in prisma/migrations

✓ Database is up to date.
$ rollup -c rollup.tracker.config.js

tracker/index.js → public/umami.js...
created public/umami.js in 626ms
$ node scripts/build-geo.js
Saved geo database: /home/umami/umami/node_modules/.geo/GeoLite2-Country.mmdb
$ next build
info  - Loaded env from /home/umami/umami/.env
info  - Skipping linting
info  - Checking validity of types
Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
info  - Creating an optimized production build
warn  - Compiled with warnings

./lib/lang.js
Attempted import error: 'si' is not exported from 'date-fns/locale' (imported as 'si').

Import trace for requested module:
./lib/lang.js
./hooks/useLocale.js

info  - Collecting page data
info  - Generating static pages (11/11)
info  - Finalizing page optimization

Route (pages)                              Size     First Load JS
┌ ○ /                                      296 B           311 kB
├   /_app                                  0 B             311 kB
├ ○ /404                                   369 B           364 kB
├   └ css/ce16c43b6179ab29.css             1.98 kB
├ λ /api/accounts                          0 B             311 kB
├ λ /api/accounts/[id]                     0 B             311 kB
├ λ /api/accounts/[id]/password            0 B             311 kB
├ λ /api/auth/login                        0 B             311 kB
├ λ /api/auth/verify                       0 B             311 kB
├ λ /api/collect                           0 B             311 kB
├ λ /api/config                            0 B             311 kB
├ λ /api/heartbeat                         0 B             311 kB
├ λ /api/realtime/init                     0 B             311 kB
├ λ /api/realtime/update                   0 B             311 kB
├ λ /api/scripts/telemetry                 0 B             311 kB
├ λ /api/share/[id]                        0 B             311 kB
├ λ /api/websites                          0 B             311 kB
├ λ /api/websites/[id]                     0 B             311 kB
├ λ /api/websites/[id]/active              0 B             311 kB
├ λ /api/websites/[id]/eventdata           0 B             311 kB
├ λ /api/websites/[id]/events              0 B             311 kB
├ λ /api/websites/[id]/metrics             0 B             311 kB
├ λ /api/websites/[id]/pageviews           0 B             311 kB
├ λ /api/websites/[id]/reset               0 B             311 kB
├ λ /api/websites/[id]/stats               0 B             311 kB
├ λ /console/[[...id]]                     4.21 kB         511 kB
├   └ css/5ff21287358ee8a0.css             4.44 kB
├ ○ /dashboard/[[...id]]                   36.8 kB         544 kB
├   └ css/2d17464bab882d6e.css             4.63 kB
├ λ /login                                 1.52 kB         376 kB
├   └ css/e549ee379a621660.css             2.39 kB
├ ○ /logout                                336 B           311 kB
├ ○ /realtime                              7.19 kB         536 kB
├   └ css/63071d6b18fa70b9.css             3.66 kB
├ ○ /settings                              228 B           490 kB
├ ○ /settings/accounts                     268 B           491 kB
├ ○ /settings/profile                      267 B           491 kB
├ ○ /share/[...id]                         612 B           562 kB
└ ○ /websites/[...id]                      706 B           562 kB
+ First Load JS shared by all              320 kB
  ├ chunks/framework-5f4595e5518b5600.js   42 kB
  ├ chunks/main-af7420747e3d718a.js        34.9 kB
  ├ chunks/pages/_app-9ea546e914edd572.js  233 kB
  ├ chunks/webpack-55d518a34a9b7add.js     891 B
  └ css/b5f00b05e234f532.css               9.42 kB

ƒ Middleware                               20.9 kB

λ  (Server)  server-side renders at runtime (uses getInitialProps or getServerSideProps)
○  (Static)  automatically rendered as static HTML (uses no initial props)

$ node scripts/postbuild.js
Done in 43.05s.

$ sudo -u umami npx @umami/migrate-v1-v2@latest
Running v0.15.0
✓ DATABASE_URL is defined.
✓ Database connection successful.
✗ Database v1 tables have not been detected.

BUT alas in the table still has a bad log:
$ psql -U umami -d umami -c "SELECT logs FROM public._prisma_migrations WHERE migration_name LIKE '04%'"
                                                                                logs
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 A migration failed to apply. New migrations cannot be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve                                                                                +
                                                                                +
 Migration name: 04_add_uuid                                                                                +
                                                                                +
 Database error code: 42501                                                                                +
                                                                                +
 Database error:                                                                                +
 ERROR: permission denied to create extension "pgcrypto"                                                                                +
 HINT: Must be superuser to create this extension.                                                                                +
                                                                                +
 DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState(E42501), message: "permission denied to create extension \"pgcrypto\"", detail: None, hint: Some("Must be superuser to create this extension."), position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("extension.c"), line: Some(806), routine: Some("execute_extension_script") }+
                                                                                +
    0: sql_migration_connector::apply_migration::apply_script                                                                                +
            with migration_name="04_add_uuid"                                                                                +
              at migration-engine/connectors/sql-migration-connector/src/apply_migration.rs:105                                                                                +
    1: migration_core::commands::apply_migrations::Applying migration                                                                                +
            with migration_name="04_add_uuid"                                                                                +
              at migration-engine/core/src/commands/apply_migrations.rs:91                                                                                +
    2: migration_core::state::ApplyMigrations                                                                                +
              at migration-engine/core/src/state.rs:200
(1 row)

and no  finished time:
$ psql -U umami -d umami -c "SELECT finished_at FROM public._prisma_migrations WHERE migration_name LIKE '04%'"
 finished_at
-------------

(1 row)

I am tempted to dropt hat row from the table and try migrating again. But hesitant to do so without a recommendation ;-) So I made a backup of the database again, and tried deleting it:
$ psql -U umami -d umami -c "DELETE FROM public._prisma_migrations WHERE migration_name LIKE '04%'"
DELETE 1

But the migration then reports same:
$ sudo -u umami npx @umami/migrate-v1-v2@latest
Running v0.15.0
✓ DATABASE_URL is defined.
✓ Database connection successful.
✗ Database v1 tables have not been detected.

which I take to mean that it doesn't detect a v1 dtabase to migrate (as opposed to confirming it doesn't detect one after migrating).
So I restored a backup I made before I started any of this. Alas it it seems to have migration 4 in it failed, so removed that tuple. And tried again. No luck.
✗ Database v1 tables have not been detected.
is now the problem. The migrator won't migrate after teh failed migration. Ouchie. And I was seeming daft and didn't take a backup early enough given my backup seems to hav the failed 04 migration in it. Doh! Silly me.

Well found the reason it complains:
async function checkV1Tables() {
  try {
    await prisma.$queryRaw`select * from account limit 1`;
    const record = await prisma.$queryRaw`select * from _prisma_migrations where migration_name = '04_add_uuid' and finished_at IS NOT NULL`;

    // alter v1 tables
    if (record.length > 0) {
      console.log('Preparing v1 tables for migration');

      await dropV1Keys(databaseType);
      await dropV1Indexes(databaseType);
      await renameV1Tables(databaseType);
    }
  } catch (e) {
    // Ignore
  }
}

async function checkV1TablesReady() {
  try {
    await prisma.$queryRaw`select * from v1_account limit 1`;

    success('Database v1 tables ready for migration.');
  } catch (e) {
    throw new Error('Database v1 tables have not been detected.');
  }
}

I have to successfully apply the 04_add_uuid migration before I can migrate. Now to work out how to do that ;-)

Are you table to run the raw sql on your db? I would remove the CREATE EXTENSION IF NOT EXISTS pgcrypto; line and manually run the rest of the migration script. Then you can run npx prisma migrate resolve --applied "04_add_uuid" to mark it as applied, then move on to the v2 migration.

Yep, already did that (manually applied the migration via SQL), but was wondering last night how to update the _prisma_migrations  with integrity. Easy to mock up a row, but it has two UUIDs in it that may need to correlate with other tables I wasn't aware of, sow as lookig for a command to flag the migration as complete and update that table with integrity. And thanks for providing it! npx prisma migrate resolve --applied is the command I was  fishing for. Steep learning curve with prisma and npx ;-).

And, with enormous thanks, we can close this. I ensure the 04 migration was applied manually and then flagged it as such and then the migration script succeded, and yarn install and build did and the site is running ocne more!


enable eth0 by default with highest priority, monitor ethenet state changes

Tested several devices with and without Ethernet, need more tests

Since this PR is yours, interesting and at the same time critical, preliminary experiments have been submitted to the Sandbox.
https://github.com/OpenIPC/sandbox/tree/main/scripts/network
After passing all tests, edits and collecting feedback, a new PR will be created in the Firmware repository.


No Intellisense for node packages

VSCode Version: 1.6.0
OS Version: Windows 10 Build 14393

I followed the instructions for installing typings for Node modules, as well as the Node.js specific instructions, but I can't get any Intellisense completions for node modules with installed typings definitions.
jsonfig.json
{
    "compilerOptions": {
        "target": "ES6",
        "module": "commonjs"
    },
    "exclude": [
        "node_modules"
    ],
    "files": [
        "src/"
    ]
}

I ran the following commands:
npm install --save lodash
npm install --global typings
typings install dt~lodash --global --save

This gives the following folder structure under typings:

However, in src/index.js, no completions are included for Lodash:

Am I missing something obvious here?

@royaldark thank you for opening this issue. This can be quite a pain. I have personally dealt with a fair amount of angst getting this to work. As an aside we are working on many improvements in this area to roll out hopefully soon.
You can solve your issue by removing either the exclude attribute or the files attribute. They cannot both be present at once.

@waderyan Thanks for the tip! While removing exclude didn't fix the issue, removing files did. Getting my completions now!


When link is clicked, default browser event isn't prevented

Explanation:
When clicking a link, the page correctly changes to the matching route. However, immediately after that, I get a new page saying Cannot GET /foo
This issue occurs only when using the a tag instead of Link.

This took me forever to debug, glad I'm not going crazy

I created this simple workaround for now. See if this may help you @pimdewit:
useEffect(() => {
        function callback(event) {
            const target = event.target;
            if (
                target &&
                target.nodeName.toLowerCase() === 'a' &&
                !target.href.startsWith('mailto:')
            ) {
                if (event.stopImmediatePropagation) {
                    event.stopImmediatePropagation();
                }
                if (event.stopPropagation) {
                    event.stopPropagation();
                }
                event.preventDefault();
            }
        }
        window.addEventListener('click', callback);
        return () => {
            window.removeEventListener('click', callback);
        };
    }, []);

I have the same issue. routeTo() returns false, so the event is not prevented. (https://github.com/preactjs/preact-router/blob/f7dbe6d07419aefb113a55d00af0436f7d9b8e15/src/index.js#L63)

I just figured out what's causing this. In preact 10, Component.forceUpdate() is no longer synchronous. Unfortunately, preact-router is relying on synchronous updates in order to determine whether a clicked link was handled by any mounted routers. It invokes forceUpdate(), then immediately attempts to inspect a Boolean flag set by render():
https://github.com/preactjs/preact-router/blob/f7dbe6d07419aefb113a55d00af0436f7d9b8e15/src/index.js#L177-L178

aaand we have a fix! https://github.com/preactjs/preact-router/pull/342


Generate binaries for windows

@Ryman do you have any experience with Rust on windows? Especially how to automate it? Does it make sense to put windows on a vagrant box and somehow script it to auto generate windows builds?

I tested this out today, but it fails to build because of dep time. I haven't looked into it too deeply, but it looks like time is using a custom build script which isn't compatible with Windows.

I just uploaded a windows binary to
http://wod.twentyfives.net/bin/clog/clog-v0.7.0_windows-x64.zip

What's the status of this?

We have a working windows binary of 0.7.0


Emmet autocomplete doesn't always trigger

From https://github.com/UnwrittenFun/svelte-vscode/issues/2#issuecomment-387283527
When going any more complicated that just div for example, the autocomplete box doesn't always show up, or shows up and then disappears every other keystroke.
Example where it toggles every keystroke
div.myclass

Example where it just flat out doesn't show:
ul>li*3

You can still trigger it manually however with ctrl+space

Yeah I just hit this very issue. Good to see you already found it.

In your preferences, add the following option:
"emmet.includeLanguages": { "svelte": "html" }

It will enabled automatic completions for Svelte HTML. Although won’t work in embedded syntaxes like CSS/SCSS, seems like a bug in detecting activation context in Emmet plugin

finally figured this one out, fix incoming


Add Polkadot People Chain as a known chain

Last week it was announced (https://github.com/polkadot-fellows/runtimes/issues/394) that the new Polkadot People Chain is live.
Could the new people chain be added to the known chains directory?
Thank you.

We have some pending additions as well, we will indeed tackle this soon.

We have some pending additions as well, we will indeed tackle this soon.

I mean... This chain-spec is not even present into the Polkadot-SDK repo, and I'm pretty sure that @Bullrich works in the same company that maintains said repo, so... 😅

IMO people chain is not a wellKnownChain. It is a good common parachain.
The best approach would be in parallel to the wellKnownChains (polkadot, kusama, westend) maybe it is a better approach to add the CommonGoodChains that will include the AssetHubPolkadot, AssetHubKusama, PeopleChains and any other chain that is a common good (also you prepare your structure for Plaza which would be very important for PAPI IMO).

IMO people chain is not a wellKnownChain. It is a good common parachain.

what is the rationale for not treating system-chains as "well-known" chains? Why should a relay-chain be a well-known-chain and not its system-chains? I really am not following.
Anyways, PAPI has decided to export all the system-chains of polkadot, kusama, westend, rococo and soon enough Paseo... When they are exported there is no mention to the concept "well-known-chain", that is just an internal implementation detail.
They all get exported from polkadot-api/chains/RELAYCHAIN_CANONICAL_NAME_SYSTEM_CHAIN_CANONICAL_NAME.
I really don't get your point

what is the rationale for not treating system-chains as "well-known" chains? Why should a relay-chain be a well-known-chain and not its system-chains? I really am not following.

Just an opinion. Any approach would do.
Also please remove rococo since it is decided to be deprecated as a chain from Polkadot testnets

Also please remove rococo since it is decided to be deprecated as a chain from Polkadot testnets

Once its finally deprecated (not the case ATM) and Paseo is at pair, then we may remove it. We can't do it before then. Also, there is no harm in keeping it, as it doesn't add any weight into your bundle-size if you don't import it...

@Bullrich can you not just move ahead with the chainspec for now?

We added the chainspec, following https://github.com/paritytech/polkadot-sdk/pull/5124.
Thanks for the idea!


style(pkg/envoy/route/route_config_test): Alias deckarep/golang-set with mapset

…g_test.go
Signed-off-by: nshankar13<EMAIL_ADDRESS>
Description:

Affected area:

New Functionality      [ ]
Documentation          [ ]
Install                [ ]
Control Plane          [ ]
CLI Tool               [ ]
Certificate Management [ ]
Networking             [ ]
Metrics                [ ]
SMI Policy             [ ]
Security               [ ]
Tests                  [ ]
CI System              [ ]
Demo                   [ ]
Performance            [ ]
Other                  [X]

Please answer the following questions with yes/no.

Does this change contain code from or inspired by another project? If so, did you notify the maintainers and provide attribution?

@shashankram will update this PR with reformatted commits as well as the others.


Setup CI && coveralls for Tests

This issue relies on the completion of #7
Setup continuous integration to keep track of all tests and coverall to give a coverage report of how much of our code is being tested.

@BolajiAyodeji  since this issue is related to #7 I would look into this.

Sure, I've assigned you to it now.

Keep me posted please and work on one PR with clear, concise and descriptive commit messages.
Let me know if you need any help or clarification, cheers!

@BolajiAyodeji I need a maintainer/contributor privilege to include Circle CI into this project.

@BolajiAyodeji
The following tools need to be integrated into the repo:

Github Market place:

circleci
coverall
pre-commit
cypress

cypress project integration.
In other to record test and coverage result using the dashboard we need to create an organization and generate a project key which can be used with cypress.yml.

These steps are very important for generating code coverage and CI.

@BolajiAyodeji
The following tools need to be integrated into the repo:

Github Market place:

circleci
coverall
pre-commit

cypress project integration.
In other to record test and coverage result using the dashboard we need to create an organization and generate a project key which can be used with cypress.yml.

These steps are very important for generating code coverage and CI.

Can you add links to all of them, please?

@BolajiAyodeji updated.

@BolajiAyodeji this can be closed.


Add 'Limitations' subsection to docs

Create the 'Limitations' subsection in README.md to explicitly warn users that use Spectron on Electron apps with remote-debuggin-port enabled (#19)

CI failures are unrelated... merging anyway


3rd Party Debug Binaries

It would be really helpful if the debug versions of the dlls included in the 3rdparty directory were included.

We are not linking our debug config against debug version, except OpenImageIO (which is in the repo). What debug lib would you like to see?

ohh sorry. I forgot to close. I think I actually had issues with not having some MSVC 2012 debug libraries installed.. Even though I use 2015.
Nothing wrong with your 3rd party stuff.

In case this is helpful to others, I ran into the same issue. The problem is that OpenImageIOD.dll is dynamically linked against the debug MSCV2012 runtime, i.e. MSVCP110D.dll and MSVCR110D.dll. Since rebuilding OIIO is daunting, I tried to work around the issue by manually renaming OPenImageIO.[dll/lib] to overwrite OpenImageIOD.[dll/lib]. BaikalStandalone.exe now starts but I ran into other issues ("bad allocation" at start-up).

Install VS 2012
extract MSVCP110D.DLL and MSVCR110D.DLL, place them in project as 3rd party librarys
Modify CMakelists.txt to copy those files
uninstall VS 2012
That's my solution

^^ Installing VS 2012 was my solution. You can't install the redistributables from the VS website because they don't include the debug version: MSVCP110D.dll.

No, this isn't a solution. You should redistribute those DLLs in your 3rdparty folder. That would be a real solution, that doesn't involve every other Windows developer bumping into that problem, wasting time trying to figure out what's wrong, then wasting an hours installing a 6-years old software. You should re-open this issue until someone commits the DLLs in the folder.

As further proof that installing Visual Studio 2012 isn't a solution... I tried to do so this morning, and found that no free version of VS2012 is available anymore. No "Express" or "Community Edition".
I would rather not download DLLs from shady web sites. Can anyone please commit the official DLLs in 3rdparty? Thanks a lot.

Second, you can totally download VS 2012 from microsoft's website: https://www.visualstudio.com/vs/older-downloads/

Thank you Roman, I will try to do that.


Support naming-convention

https://typescript-eslint.io/rules/naming-convention

Pasting a link is not helpful as feature request.
Also,

This rule requires type information to run.

So close as not planned.


Update Object.assign non-object error message

These are the sources, not the target. Copy pasta from above.

@amasad This error message seems obviously wrong but I'm confused why we need to error out at all. Won't primitives have no own props?

I don't remember writing this. I think we copied it from www. Check the blame there. Might've been @sebmarkbage

I don't think leaving them out would be spec behavior IIRC but this particular check was added to prevent deopts of the function when someone wrecklessly uses a primitive. This was observed on www.

This really should be a warning though. Catching this shouldn't silence it. It is not ok to use at all.

lgtm

I didn't update anything. >_>

@facebook-github-bot shipit


Geode 2469

The updated Geode Redis Adapter now works with a sample Spring Data Redis Example
GEODE-2469.pdf
These changes are focused on the HASH and Set Redis Data Types to support Spring Data Redis sample code located at the following URL
https://github.com/Pivotal-Data-Engineering/gemfire9_examples/tree/person_example_sdg_Tracker139498217/redis/spring-data-redis-example/src/test/java/io/pivotal/redis/gemfire/example/repository
The Hash performance changes from this pull request had a 99.8% performance improvement.
This is based on the Hashes JUNIT Tests.
https://github.com/Pivotal-Data-Engineering/gemfire9_examples/blob/person_example_sdg_Tracker139498217/redis/gemfire-streaming-client/src/test/java/io/pivotal/gemfire9/HashesJUnitTest.java
This code executed in 12.549s against Gemfire 9.0.1 code. After the changes, the test executed in 0.022s with the GEODE-2469 pull request.
Redis Set related command performance had a 99.9% performance improvement.
See  https://github.com/Pivotal-Data-Engineering/gemfire9_examples/blob/person_example_sdg_Tracker139498217/redis/gemfire-streaming-client/src/test/java/io/pivotal/gemfire9/SetsJUnitTest.java
The previous Set Junit tests executed against GemFire 9.0.1 executed in 31.507 seconds. These same test executed in 0.036 seconds with the GEODE-2469 pull request changes.
The GemFire 9.0.1 Geode (1.1.0) version for the Geode Redis adapter created a Geode Region for each key provided in the Redis Hash or Set related command. Each Redis command to remove key entry previously destroyed the region. The big performance gain is based on using a new ReDiS_HASH and ReDiS_SET region. Note the changed will create or reuse an existing region with a matching name for Redis HASH commands references objects. For Redis HASH object's key will have a format of object:key
Please see https://redis.io/topics/data-types-intro HASH section on objects for information on Redis objects.

Hello,
Sorry about that.
It is there now
geode/SetExecutor.java at GEODE-2469 · ggreen/geode · GitHub
|
|
|
|   |    |
|
|
|
|    |
geode/SetExecutor.java at GEODE-2469 · ggreen/geode · GitHub
geode - Mirror of Apache Geode  |   |
|
|
On Wednesday, February 22, 2017 12:21 PM, Bruce Schuchardt<EMAIL_ADDRESS>wrote:

@bschuchardt requested changes on this pull request.Hi ggreen, would you update the PR to include the missing SetInterpreter class?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Thanks for the contribution.  Could you fix the test failure in RegionProviderTest?

I like the fact that we are now dealing with collections on a single machine, rather than all the elements spread distributed. Would you possibly have some perf metrics in relation to larger collections. e.g 1mil entries vs 100.
I imagine that as the number of entries in the collections grow, so will the insert performance.

RE: "huser:1000
The intent is to detect the use of objects in the Redis HASH commands. The character ":" will appear in the key if an object is used (note: this is unique for HASH commands). The format of the key will be object:key.
So if a HASH command was used with the key "huser:1000", this should have resulted in an "huser" region being created  @with a key of "1000". If this did not happen, this is a bug.
The /ReDiS_HASH region should be used in cases where ":" does not exist in the key (because this is not necessarily an object).
I can fix this along with the indicated issues (2-4)

@ggreen
Is there any reason we need to create objects rather than just storing under the given string?

@galen-pivotal dlock approach seems too heavy-weight for updating a key.  Every hash is single-threaded through this lock.  I think the granularity we want is concurrent updates over different hashes, but thread-safe updates of a particular hash.

@galen-pivotal and @metatype, please take a look at my latest change. It uses a java.util.concurrent.locks.Lock instead of a distribute lock for the hash and set synchronization.

@galen-pivotal and @metatype, are there any suggestions on how to move this pull request forward?

@galen-pivotal and @metatype, are there any suggestions on how to move this pull request forward?

@ggreen, I haven't had a lot of time to look at this lately. It looks like you checked in some classes in the latest commit; we shouldn't have classes checked into the repository.
I'm also having trouble reading your commit history; it's hard to tell what the merge commits did, in particular d3b26424c20d723e563dd73b012323b7ff1f12f0 .
If you have a Review Board account, it may be easier to read the changes as diffset, and avoids some of the git merging-develop nastiness.
It looks like there's a concurrency bug in the LockService, getting keys out of the WeakHashMap isn't synchronized. I've got a WIP at my fork, branch pr-404-concurrentLock that addresses this. I haven't had a chance to look at it in a while, though.

@ggreen If you can clean up the history from where my PR was merged this will be much easier to review. In general, even though we've added the @Experimental tag, I would like the PR to be complete and release-ready once we merge it to develop.

Hi Team,
Would you like to integrate this PR in the next delivery please?
Best regards,
Youcef HILEM

@yhilem @ggreen  Looks like a great use case.  The PR may need a little cleanup (based on Galen's comments), but it would be good to get this in.

@yhilem @ggreen @bbaynes, there is currently a feature branch https://github.com/apache/geode/tree/feature/GEODE-2444, which started splitting the Redis Adapter into its own module.
I would prefer this splitting of the Redis adapter into its own module to be part of the integration.

What would it take to get this PR merged?

At this point this PR is a bit out of date. To merge, all of the .class, .pdf, .fig, etc. files would need to be removed, the merge fix done and whatever other cleanup is necessary. It also looks like there may be a concurrency bug, so that should be tested and fixed if necessary. And whatever other fixes are necessary. It's not a trivial amount of work.

I'm going to close this PR due to its age and inactivity.


Grouping Properties

Allow for grouping of properties with some way of describing how the groupings are layed out.
For example:
Group 1 (2 columns)                    ex:    FirstName  LastName
Group 2 ( 3 columns , 20%, 40%, 40%).      ex:    | 20% |  40%     |   40%    |
Requirements:

Optional Group label
Multiple groups allowed
Some description of the preferred group layout. Could be as simple as the number of columns in a row, or more complicated percentage based layout

Apple Wallet documentation has some good ideas here that support multiple types of credentials in a single interface. https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/PassKit_PG/Creating.html

per discussion 10/6 at least 1 other team needs this

Also UI Schema might be worth a look https://jsonforms.io/docs/uischema/

UI Schema is certainly a good point of inspiration. By defining Horizontal and Vertical layout types with nested groupings you can declare a large variety of layouts. I'm going to spend a little bit more time exploring other options, before proposing a solution.


Draft: Tests for WebAudio Backend

It looks like the WebAudio backend has no tests? I made it so we now run the shared audio backend tests with WebAudio too. But now WaveSurfer/MediaElementWebAudio tests started failing...

Closing because https://github.com/katspaugh/wavesurfer.js/commit/658bd921be60a64192331ce8511bf1bce68cc4ec added initial WebAudio tests. Just need to add more, or make the shared backend tests work with WebAudio too

Closing because https://github.com/katspaugh/wavesurfer.js/commit/658bd921be60a64192331ce8511bf1bce68cc4ec added initial WebAudio tests. Just need to add more, or make the shared backend tests work with WebAudio too


Output of remote "tail - f"

Can someone please provide an example of gathering a continuous stream of string lines from a remotely executed "tail - f"?

Hi, thanks for your interest in this package! To spawn a process and listen to its output, simply use SSHClient.execute as follows:
final client = SSHClient(...);

final session = await client.execute('tail -f this');

await for (final chunk in session.stdout.cast<List<int>>().transform(Utf8Decoder())) {
  print('got: $chunk');
}

Thanks a lot @xtyxtyx for the reply!
I made the following solution that worked for me, just wasn't sure if it was the best possible one. I have "misused" the fact that stdout returns buffered list of characters, containing at least one whole line, or more.
  String outputCharacters = '';
  List<String> outputLines = [];

  Future<SSHClient> connect() async {
    return SSHClient(
        await SSHSocket.connect(host!, port!),
        username: username!,
        onPasswordRequest: () => password!,
      );
  }

  Future<SSHClient> connect() async {
    return SSHClient(
        await SSHSocket.connect(host!, port!),
        username: username!,
        onPasswordRequest: () => password!,
      );
  }

  Stream<Uint8List> tailf() async* {
    final connection = await connect();
    final client = await connection.execute('tail -f /var/log/some.log');
    yield* client.stdout;
  }

  void output() {
    tailf().listen((event) {
      final output = utf8.decode(event);
      outputCharacters += output;
      const lineSplitter = LineSplitter();
      final lineBuffer = lineSplitter.convert(output);

      for (var x = 0; x < lineBuffer.length; x++) {
        outputLines.add(lineBuffer[x]);
        log('New line: ${lineBuffer[x]}');
        // Here goes the code where the output can be added to a state management solution of choice
      }
      });
  }

In case the output is slower and buffer contains less than a full line, I'd have to listen to stderr output, I guess, as it sends each character separately, then populate the lineBuffer until the received character is new line (RegExp(r'\n')) and then add it to outputLines...
Anyway, kudos for the work on this package, I've picked it specifically as it's a pure Dart implementation and, therefore, it's the easiest for cross-platform migration.


WHCM for Divider

Description
Divider is not getting handled in High Contrast mode, is this expected?
Steps to reproduce

Go to http://opensource.adobe.com/spectrum-css/
Search for divider and enable high contrast mode
Observe

Expected behavior
Divider should be visible in high contrast mode
Screenshots

Environment

Spectrum CSS version:
Browser(s) and OS(s):

Additional context

@PreetiNagal thank you for reporting this. It'll be addressed in #1490


I can't use Flow for React-Native projects?

I created an empty React Native app (using react-native init RNTest (2nd tab "Building Projects with Native Code").
Then I created a .flowconfig:
[ignore]
<PROJECT_ROOT>/__tests__/.*
<PROJECT_ROOT>/ios/.*
<PROJECT_ROOT>/android/.*

[include]

[libs]

[options]
module.ignore_non_literal_requires=true

[lints]
all=warn

Then I ran flow check.
Then I removed .flowconfig again, because I can't use Flow with React Native. Even the empty start-project folder shows 1094 errors all over the place.
What's worse, here are the first ones, and according to my IDE they are just plain wrong. The line of code nr. 4 that causes those first errors: import {AppRegistry, StyleSheet, Text, View} from 'react-native'; Which seems to be perfectly fine? So what is Flow complaining about?
Error: index.android.js:4
  4: import {AppRegistry, StyleSheet, Text, View} from 'react-native';
             ^^^^^^^^^^^ Named import from module `react-native`. This module only has a default export. Did you mean `import AppRegistry from ...`?

Error: index.android.js:4
  4: import {AppRegistry, StyleSheet, Text, View} from 'react-native';
                          ^^^^^^^^^^ Named import from module `react-native`. This module only has a default export. Did you mean `import StyleSheet from ...`?

Error: index.android.js:4
  4: import {AppRegistry, StyleSheet, Text, View} from 'react-native';
                                      ^^^^ Named import from module `react-native`. This module only has a default export. Did you mean `import Text from ...`?

Error: index.android.js:4
  4: import {AppRegistry, StyleSheet, Text, View} from 'react-native';
                                            ^^^^ Named import from module `react-native`. This module only has a default export. Did you mean `import View from ...`?

Error: index.android.js:6
  6: import RNFetchBlob from 'react-native-fetch-blob';
                             ^^^^^^^^^^^^^^^^^^^^^^^^^ react-native-fetch-blob. Required module not found

Error: index.ios.js:9
  9:   AppRegistry,
       ^^^^^^^^^^^ Named import from module `react-native`. This module only has a default export. Did you mean `import AppRegistry from ...`?

Error: index.ios.js:10
 10:   StyleSheet,
       ^^^^^^^^^^ Named import from module `react-native`. This module only has a default export. Did you mean `import StyleSheet from ...`?

Error: index.ios.js:11
 11:   Text,
       ^^^^ Named import from module `react-native`. This module only has a default export. Did you mean `import Text from ...`?

Error: index.ios.js:12
 12:   View
       ^^^^ Named import from module `react-native`. This module only has a default export. Did you mean `import View from ...`?

Error: node_modules/metro-bundler/src/Bundler/Bundle.js.flow:174
174:   getUnbundle(): Unbundle {
                      ^^^^^^^^ property `groups`. Property not found in
196:     return this._ramBundle;
                ^^^^^^^^^^^^^^^ object literal

...
etc. etc. 1094 in total

Okay.... so, for the record, there was a default .flowconfig that I replaced with my own without realizing it, and the default is pretty big. They limit it to Flow version 0.49.1, but I'm using 0.52 and that works too except for a single error in an RN library file.

@lll000111 what was it?

@lll000111 the config you changed? Was it a specific config or did you mean the whole file?

@karltaylor There already was a file put there during RN project creation and I accidentally overwrote everything in it.


vfs:add nxsched_foreach to sched_lock avoid crash

Summary
vfs:add sched_lock to sync avoid crash
If scheduling occurs in file_fsync,
fl_lock may be released, and an error may
occur when calling nxmutex_unlock
Impact
call nxsched_foreach
Testing
sim:nsh

I'm missing detailed description of the issue that this change is intended to fix. This is needed to justify why locking scheduler is needed inside the nxsched_foreach interface compared to case when nxsched_foreach caller should lock scheduler.

This is a special case of the more general Issue:  #1138.  I don't think we would want such a specific solution if a more general solution is possible.
But there are also places where we want to be suspended while we are in a critical section.  Some logic depends on it.  Perhaps this should still be in enter/leave_critical_section with an parameter to permit suspension or not.

If scheduling occurs in the handle, then some system resources are likely to be corrupted

I'm missing detailed description of the issue that this change is intended to fix. This is needed to justify why locking scheduler is needed inside the nxsched_foreach interface compared to case when nxsched_foreach caller should lock scheduler.

@pkarashchenko as the discussion in #1138, the thread holds the critical section will be scheduled out if it wakes up other high priority thread, sched lock could prevent this happen.

@pkarashchenko do you have more queston about this patch?

I do not see @patacongo 's comment is answered. Currently I'm fine with this if it does not bring any regression.