text:
add_metadata list of attributes - no effect on history file output

I would like to write osm history files with only version and timestamp information using libosmium release v2.14.0 (Debian GNU/ Linux 9). I used the following command separating the attributes with + like suggested in the release note:
osmium cat file-history.osm -o file-history-VT.osm -f osm,add_metadata=version+timestamp --overwrite
I expected version and timestamp data to be included but no uid, no user and no changeset data. The output file included all of them like I would have used add_metadata=true.

I can't reproduce this. Are you sure you are calling the right osmium program? Try osmium version, it tells you which version of the osmium program and of libosmium it is.

Yes, osmium version showed libosmium version 2.13.1. Right hint!
Thank you

authors: SunStormRain joto

repo: osmcode/libosmium


text:
[Validator] Strange Layer

http://osmlab.github.io/to-fix/#/task/strangelayer
cc @geohacker  @maning @planemad

done!

source: gharchive/issue

repo: osmlab/osmlint

license: isc

license_type: permissive

license_source: bigquery


text:
not ignore lock, because i cannot compile until copied lock for docs.rs

so without lock people cannot compile, no cannot compile deterministically to safety

if i recall rust guidline for apps to add lock into repo

source: gharchive/pull-request

repo: osmosis-labs/beaker

license_source: github-api


text:
Reducing dependency osmosis-std wasm size impact

Background
Potentially due to prost the size of wasm generated is around +200k
Expectation

see if the size impact is really from prost or not, if so, find a way to reduce it
if not possible, considering remove prost and make everything json serializable in cosmwasm

It seems that osmosis-std doesn't really cause the issue. close for now.

repo: osmosis-labs/osmosis-rust


text:
[x/gamm]: Add RPC query endpoints for joining and exiting pools

Background
It would be helpful to have a RPC query that returns the lp shares when providing liquidity to a pool.  It would also be helpful to have a query that returns the assets returned withdrawing liquidity from a liquidity pool.  These queries will be useful when using  a StargateQuery in cosmwasm smart contracts.
Suggested Design
Here is the commit for the PoolType query that was added recently: https://github.com/osmosis-labs/osmosis/commit/e55e13d709628cff2075ae1576f993ed2a8c310e.  The design should follow the steps taken in this commit to add RPC end points for the four following queries:

QueryJoinPool

Parameters: QueryJoinPoolSharesRequest{ PoolId, TokenInMaxs}
Returns:  QueryJoinPoolSharesResponse { ShareOutAmount, TokenIn }

QueryJoinSwapExactAmountIn

Parameters: QueryJoinSwapExactAmountInRequest{ PoolId, TokenIn}
Returns:  QueryJoinSwapExactAmountInResponse { ShareOutAmount }

QueryExitPool

Parameters: QueryExitPoolSharesRequest{ PoolId, ShareInAmount }
Returns:  QueryExitPoolSharesResponse { TokenOut }

QueryExitSwapShareAmountIn

Parameters: QueryExitSwapShareAmountInRequest{ PoolId, TokenOutDenom, ShareInAmount }
Returns:  QueryExitSwapShareAmountInResponse { TokenOutAmount }

I would like to work on this issue!

I would like to work on this issue!

Excellent.  I am going to start on it today.

repo: osmosis-labs/osmosis


text:
Add Pose / Transform msg support

Add conversion between ign::msgs::Pose and

geometry_msgs/Pose
geometry_msgs/PoseStamped
geometry_msgs/Transform
geometry_msgs/TransformStamped

Unlike previous msgs types, this is a one-to-many mapping. This is possible since the ign::msgs::Pose msg captures most of the fields in the above ROS geometry msgs, with the following exception:

geometry_msgs/TransformStamped's child_frame_id field.

Initial plan was to introduce a frame field in ignition::msgs::Pose but later examination of the current ros1_ign_bridge implementation reveals that a similar ros msg field, frame_id, is being stored in an any field in ign::msgs::Header. So I took the same approach and store the child_frame_id in the ign header msg.

Looks good to me!

+1


text:
Bug/fix dict illegal accesses

added some None initializations

added some checks before accessing

These should fix problems for super minimal maps that have no doors, or some elements

oof, yeah I didn't dig through it deep enough to figure out if they were basic maps/dictionaries or some other fancy collection. Sure thing.


text:
python code analyze error

my  system has intalled python 3.7.3,this is my python version and pip version
C:\Users\tony>python -V
Python 3.7.3

C:\Users\tony>pip -V
pip 19.0.3 from c:\users\tony\appdata\local\programs\python\python37\lib\site-pa
ckages\pip (python 3.7)

C:\Users\tony>

when i analyze a python project include requirements.txt it show a error in my analyze.result.json
 "issues" : {
        "PIP::requirements.txt:" : [ {
          "timestamp" : "2021-01-07T21:58:27.699009500Z",
          "source" : "PIP",
          "message" : "Resolving dependencies for 'requirements.txt' failed with: IOException: Running 'py -2 C:\\Users\\tony\\AppData\\Local\\Temp\\python_interpreter17850449696562758315.py' in 'C:\\Users\\tony\\Desktop\\ort\\ort' failed with exit code 103:\nInstalled Pythons found by py Launcher for Windows *\n\nRequested Python version (2) not installed, use -0 for available pythons\n",
          "severity" : "ERROR"
        } ]
      }
i  don't  know what i can do next for continue

Hello @gaoyaqing12
How did you manage to resolve that issue?

repo: oss-review-toolkit/ort


text:
clearlydefined parsing exception

Hello,
I've recently activate clearlydefined in my ort pipeline, and I've got some projects that failed on analyzer error :
[2021-02-17T21:24:22.007Z] 21:24:21.837 [DefaultDispatcher-worker-3] WARN  org.ossreviewtoolkit.analyzer.curation.ClearlyDefinedPackageCurationProvider - Getting curations for 'Maven:com.google.code.findbugs:jsr305:1.3.9' failed with: HttpException: HTTP 404

[2021-02-17T21:24:22.987Z] Exception in thread "main" com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `org.ossreviewtoolkit.clients.clearlydefined.ClearlyDefinedService$Facet` from Array value (token `JsonToken.START_ARRAY`)

[2021-02-17T21:24:22.987Z]  at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 1, column: 31] (through reference chain: org.ossreviewtoolkit.clients.clearlydefined.ClearlyDefinedService$Curation["described"]->org.ossreviewtoolkit.clients.clearlydefined.ClearlyDefinedService$Described["facets"]->org.ossreviewtoolkit.clients.clearlydefined.ClearlyDefinedService$Facets["dev"])

[2021-02-17T21:24:22.987Z] 	at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)

Is it a parsing issue from ORT or a wrong content from clearlydefined or a bit of both :-)  ?
regards

This duplicates https://github.com/oss-review-toolkit/ort/issues/3559. Please search existing issues first.


text:
Release scorecard

Release scorecard https://github.com/sigstore/sigstore-java/issues/2#issuecomment-1201899264

@laurentsimon @azeemshaikh38  Planning to release at this SHA 69eb1ccf1d0cf8c5b291044479f18672bf250325.

SGTM.

Thank you!

https://github.com/ossf/scorecard/releases/tag/v4.5.0

repo: ossf/scorecard


text:
removal of --verbosity flag

As I was tinkering with the scorecard, I encountered the --verbosity [string] flag. No options are given, and the argument string seems to be disregarded. Any input string seems to be accepted, yet it is set to the default level of 'info'.
I may be wrong, but for now this --verbosity option seems redundant and removable.
Alternatively, options such as debug, error etc. could be implemented and described in the help message.

Thank you for getting back to me about this. My bad; I will look into it and propose some changes, starting with displaying the options for the --verbosity flag in the usage message.


text:
Document code for pong

Add docstrings and comments in the code

Done. Code documented at the same time as creating the tests, as per commit cc9a398991bb19ef984eeea47067baad594abfc2.

license: MIT


text:
srs3.0 librtmp 交叉编译失败

描述
srs2.0的librtmp库前段时间用live555取流推送到nginx-rtmp 浏览器和vlc都可以播放，不知是不是由于flash升级导致的，尝试更换srs3.0的librtmp 导出librtmp模块后，修改makefile 交叉编译环境，但是protocol里面依赖openssl,编译不通过，到srs里config 配置交叉编译环境without ssl ,with librtmp模块但是config提示stCPU架构不支持，
环境

操作系统：'Ubuntu16.04 hi-linux aarch-64'
编码器：'...'
SRS版本: '3.0.'
SRS的日志如下:

导出lib库编译提示缺少openssl
arch64-himix100-linux-g++ -c -ansi -Wall -g -O0 \
          -Isrc/protocol -Isrc/core -Isrc/kernel -Iobjs \
          -o objs/src/protocol/srs_rtmp_stack.o src/protocol/srs_rtmp_stack.cpp
In file included from src/protocol/srs_rtmp_stack.cpp:33:0:
src/protocol/srs_rtmp_handshake.hpp:35:26: fatal error: openssl/hmac.h: 没有那个文件或目录
 #include <openssl/hmac.h>
                          ^
compilation terminated.

直接在srs里编译提示cpu架构不支持
make OS="LINUX" BUILD="DBG"
make[1]: Entering directory '/home/ubuntu/projects/hi3559a/github/srs/srs-3.0-a1/trunk/objs/state-threads-1.9.1'
if [ ! -d LINUX_4.15.0-66-generic_DBG ]; then mkdir LINUX_4.15.0-66-generic_DBG; fi
aarch64-himix100-linux-gcc  -DLINUX -DDEBUG -Wall -g -DMD_HAVE_EPOLL -c sched.c -o LINUX_4.15.0-66-generic_DBG/sched.o
In file included from common.h:68:0,
                 from sched.c:48:
md.h:454:14: error: #error "Unknown CPU architecture"
             #error "Unknown CPU architecture"
              ^~~~~
sched.c: In function ‘_st_vp_check_clock’:
sched.c:480:16: warning: variable ‘elapsed’ set but not used [-Wunused-but-set-variable]
     st_utime_t elapsed, now;
                ^~~~~~~
sched.c: In function ‘st_thread_create’:
sched.c:596:2: error: #error Unknown OS
 #error Unknown OS
  ^~~~~

期望行为
解决2.0推流浏览器取流但黑屏， 3.0 交叉编译通过openssl已经编译通过，但是放到objs里提示还是找不到文件，如果修改makefile 将openssl 添加到编译选项里
谢谢大神了

srs-librtmp目前以SRS2版本为主，有些bug已经修复，可以再试试。

authors: luqinlive winlinvip

repo: ossrs/srs


text:
test that we support image signatures

xref https://github.com/containers/skopeo/issues/1482
We should validate that we're doing image signatures via the proxy correctly.

In this issue, the great thing about the new ostree-native-container flow is that if you have a setup to sign container images, that exact same setup can be used to sign OS updates.
See https://docs.podman.io/en/latest/markdown/podman-image-sign.1.html and https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_atomic_host/7/html/managing_containers/signing_container_images for some old-style GPG signatures.  As of recently the containers/image stack gained support for "cosign", see https://github.com/containers/skopeo/pull/1701

To test the recent changes for policy verification:

Modify /etc/containers/policy.json for sigstore/gpg signed images from the remote-registry
Sign an existing fcos image and push to the remore-registry
Try doing an rpm-ostree rebase ${signed-image}
Ensure it fails

Since we do not currently sign fcos or any ostree-based-images, we need to have signed images available.
Initially it was thought this can be done locally by doing skopeo copy docker://quay.io/fedora/fedora-coreos:testing-devel oci:/var/lib/containers/signed-local-registry/sigstore/test.oci --sign-by-sigstore-private-key fcos.key .
But this fails unfortunately, since how sigstore signs images is by pushing the artifacts generated to the remote-registry. Hence, signing an local oci or dir does not work. It instead gives the following error: Cannot determine canonical Docker reference for destination oci:/var/lib/containers/signed-local-registry/sigstore/test.oci.
Instead we need to be able to push this to some ephemeral testing Docker image registry. The perfect candidate was ttl.sh as mentioned in sigstore doumentation, but unfortunately fcos image exceeds the maxiumum image size limit there. Is there any other registry we could push to and verify instead?

So CI on this repository mainly uses GHA, for which there is https://docs.github.com/en/actions/using-containerized-services/about-service-containers
But that's just sugar for running a container...we can run any registry (quay.io, docker/distribution or whatever) inside a GHA job right?

authors: RishabhSaini cgwalters

repo: ostreedev/ostree-rs-ext


text:
Consider using Notion API

To add a database item, one purchase at a time, rather than manually importing a CSV at the end.
Is this valuable? Even if we're already generating monthly CSVs in the process? Should we then not bother with these CSVs?

Resolved in 21d1e929a30c825ffca5849a6bf27f39e4a82205.
I experimented with bypassing the categorized CSV and going straight from categorization to Notion, but it was super slow to import (> 5 min for one month of data, and even then it failed partway through). So, keeping the CSVs seemed to be a better choice with respect to both performance and safety. Until we have a solution for checking against duplicate entries, partial uploads are a big issue.

authors: eemiily oswinrodrigues

repo: oswinrodrigues/steward-little


text:
認証周りのフォームが壊れているらしい

少なくともエラーのときにinputが再レンダリングが走ってフォーカスが外れる（らしい）

多分治った？

repo: otomad-database/web


text:
Add support for marking AWS roles and policies as unused instead of deleting them upon cleanup

Users have requested to be able to configure the credentials operator to not delete AWS IAM roles and policies, but instead tag them as unused, a sort of "soft delete" mode.
@omris94 please add info on how this feature will be configured
https://github.com/otterize/intents-operator/issues/366

I suggest the following solution:
To indicate that AWS IAM roles and policies should only be soft deleted when they are not used anymore, there are two methods to follow:

If you want to avoid deletion of AWS roles and policies corresponding with a specific pod, label the pod as credentials-operator.otterize.com/aws-use-soft-delete=true.

If you want to globally avoid the deletion of AWS roles and policies, initialize the credentials-operator with the --aws-use-soft-delete=true flag. You can set this flag by adjusting the helm chart's value (global.aws.useSoftDelete).

How would the soft deletion of AWS IAM roles and policies look like?

Soft deletion of an AWS IAM policy will be performed by tagging a policy as otterize/softDeletedAt=<timeOfDeletion>
Soft deletion of an AWS IAM role will be performed by tagging a role and all of its policies as otterize/softDeletedAt=<timeOfDeletion>

When does the soft deletion occur?

Every case that would cause a deletion without this feature, such as serviceAccount deletion for roles or ClientIntent deletion for policies.

At the moment, we don't have the necessary logic to remove orphaned policies/roles. This means that if you start with --aws-use-soft-delete=true or its pod-level equivalent, you will need to switch it back to false before deleting the pod or ClientIntents to ensure that the roles/policies are removed. However, everything is possible so we may be able to implement this logic in the future.

So the answer is yes. Means that if I switch back operator will start manage role/policy. Looks good then.

repo: otterize/credentials-operator


text:
Integration with Source Control to ensure new items get added

We are moving to Tabular Editor for the save to Folder capability which provides 3 way merging safety and simplicity.
However one tradeoff is that for new objects (tables, columns, measures etc) the files require remembering to "Add" to the workspace otherwise these parts of the model are forgotten on the merge. It would be great if somehow this could be solved as we have given safety and efficiency with one hand but taken away with the other.
Of course full source control integration might be overkill but some support for at least TFS and GIT would be greatly appreciated

Yes, we're facing the same issue internally at one of our clients. Since apparently this is a useful feature, I will investigate if there is some easy way to enable better source control integration with Tabular Editor. See also issue #67. Perhaps Tabular Editor can somehow "detect" that it's saving files back to a source controlled folder and then ensure that new files are automatically added to the TFS/git workspace. Will get back to you when I have an update.

Highly recommend using Git together with the Save to Folder option, as Git automatically detects file additions/deletions, where as TFS/TFVC does not... Tabular Editor will not get support for TFS/TFVC, as Git is the more popular source control system. Tracking Git integration on issue #104. Closing this issue.

repo: otykier/TabularEditor


text:
Infer call children from parents

Minor changes to things in the trace format that were bothering me:

Rather than storing children explicitly in the trace, infer them from the parents when reading the trace. So no more "01GM8SWJ2YKM8QQNSRA07W3VQR.children.01GM8SWJ2Y29PZMSKVH0AJQHQC":true. This:

Saves bytes.
Should allow fixing https://github.com/oughtinc/ice/pull/141#discussion_r1042698274 better.
Means that the type children?: Calls in CallInfo is actually true now, i.e. the values of children are calls instead of booleans.

Emit a single value which is combined into the existing calls using lodash's merge instead of set with paths. In particular this means the end lines change from this:

{
  "01GM8SWJ2Y29PZMSKVH0AJQHQC.result": ...,
  "01GM8SWJ2Y29PZMSKVH0AJQHQC.shortResult": ...,
  "01GM8SWJ2Y29PZMSKVH0AJQHQC.end": ...
}

to this:
{
  "01GM8SWJ2Y29PZMSKVH0AJQHQC": {
    "result": ...,
    "shortResult": ...,
    "end": ...
  }
}

which is more space efficient, more natural, and easier to work with (no callId = path.split(".")[0]).
Haven't actually tested this yet.

Is this ready for review?

Haven't actually tested this yet.

This was because of the broken dev server. Just tried building the UI, got an error as soon as I looked at a trace. Will revisit this once the HMR issue is fixed.

Closing for now, feel free to reopen.

authors: alexmojaki lslunis stuhlmueller

repo: oughtinc/ice


text:
Event with multiple dates only shows first date

See https://rogerthat-server.appspot.com/internal/shop/questions/6621295077228544

Event with multiple dates
Only first date is shown in the app

Example:

Event is only shown on the 28th in the app, and not on 29, 30 or 31

As @bart-at-mobicage mentioned, it would be better to list all the dates and their events, instead of just listing the first date, and the user needs to go to event details to see other dates.

authors: abom lucasvanhalst

repo: our-city-app/oca-backend


text:
Add an OCA branded watermark to main branding

Add a watermark, like we did with DJ-Matic services

Looks like watermarks aren't supported yet in native brandings


text:
Add token holdings cutoff date to message

Description

Motivation & context

Code review

Type of change

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

Checklist

[ ] I have done a self-review of my own code
[ ] Any new and existing tests pass locally with my changes
[ ] My changes generate no new warnings (lint warnings, console warnings, etc)

Ah! Created this PR too early

repo: ourzora/nouns-builder


text:
[Image Tiles Service] Consistency bug: AssetManagerHost vs ServiceHostUrl in appsettings.json

We should have either AssetManagerHost and ServiceHost or AssetManagerHostUrl and ServiceHostUrl.

Fixed in PR #27.

lol not much point assigning me these issues if they are opened, assigned, a fixed committed and merged over a weekend before i get to see them ;)
thanks for the code improvement @senakafdo

authors: davidbirchwork senakafdo

repo: ove/ove-asset-services


text:
[Bug] Debugs are not removed on Zone Removal

When a zone is removed, the debug draws don't seem to be removed as well. In the screen shot the zones themselves are not present as I can't target the stands, but the spheres are still there, and sometimes would double up when the resource is started again (see below)

Was an ox_lib issue and has been resolved.

authors: Mkeefeus thelindat


text:
Only serialize properties of objects which are accessed

Input:
const obj = { x: 1, y: 2, z: 3 };
export default () => obj.x;

Current output:
export default ( obj => () => obj.x )( { x: 1, y: 2, z: 3 } );

As x is only property of obj which is accessed, this could be reduced to:
export default ( x => () => x )( 1 );

Optimizations
The following optimizations can be applied:
1. Omit unused properties
Where only certain properties of an object are accessed, any other properties can be omitted:
// Input
const obj = { x: 1, y: 2, z: 3 };
export default () => obj.x + obj['y'];

// Output
const obj = { x: 1, y: 2, z: 3 };
export default ( obj => () => obj.x + obj.y )( { x: 1, y: 2 } );

Note property z has been discarded in output.
2. Break object properties apart with scopes
Where object is never used as a whole (only individual properties accessed by name), each property can be split into a separate scope var.
// Input
const obj = { x: 1, y: 2, z: 3 };
export default {
  getX: () => obj.x,
  setX: v => obj.x = v,
  getY: () => obj.y,
  setY: v => obj.y = v
};

// Output
const scope1 = ( x => [ () => x, v => x = v ] )( 1 ),
  scope2 = ( y => [ () => y, v => y = v ] )( 2 );
export default {
  getX: scope1[0],
  setX: scope1[1],
  getY: scope2[0],
  setY: scope2[1]
};

getX() + setX() can be code-split into a separate file from getY() + setY().
3. Break object properties apart with object wrappers
Where object is never used as a whole (only individual properties accessed by name), each property can be wrapped in a separate object.
// Input - same as (2)
const obj = { x: 1, y: 2, z: 3 };
export default {
  getX: () => obj.x,
  setX: v => obj.x = v,
  getY: () => obj.y,
  setY: v => obj.y = v
};

// Output
const objX = { x: 1 },
  objY = { y: 2 };
export default {
  getX: ( objX => () => objX.x )( objX ),
  setX: ( objX => v => objX.x = v )( objX ),
  getY: ( objY => () => objY.y )( objY ),
  setY: ( objY => v => objY.y = v )( objY )
};

Using 2 wrapper objects is slightly more verbose than output from optimizations (1) or (2), but more code-splittable than either. getX(), setX(), getY() and setY() could each be in separate files with objX and objY split into separate common files.
4. Reduce to static values
Where a property is read only (never written to in any functions serialized), the property can be reduced to a static value.
// Input
const obj = { x: 1, y: 2, z: 3 };
export default {
  getX: () => obj.x,
  getY: () => obj.y
};

// Output
export default {
  getX: ( x => () => x )( 1 ),
  getY: ( y => () => y )( 2 )
};

This is completely code-splittable. It's more efficient than any of the other approaches above, but only works if obj.x and obj.y are read-only.
Optimization killers
None of these optimizations can be used if:

Object used standalone e.g. const objCopy = obj; or fn( obj )
Object properties accessed with dynamic lookup e.g. obj[ name ]
Object passed as this in a method call e.g. obj.getX() and .getX() uses this
Property is getters/setters
Property is not defined, so access will fall through to object's prototype
Property may be deleted by code elsewhere (delete obj.x) so a later access may fall through to object's prototype
An eval() has access to object in scope (no way to know ahead of time how the object will be used)

Tempting to think could still apply optimization (3) in cases of undefined properties by defining object wrapper as objX = Object.create( originalObjectPrototype ). However, this won't work as it's possible object's prototype is altered later with Object.setPrototypeOf().
It's impossible to accurately detect any changes made to the object with Object.defineProperty() - which could change property values, or change properties to getters/setters. However, this isn't a problem - the call to Object.defineProperty( obj ) would involve using the object standalone, and so would prevent optimization due to restriction (1) above.
ESM
These optimizations would also have effect of tree-shaking ESM (#53).
ESM is transpiled to CommonJS in Livepack's Babel plugin, prior to being run or serialized:
// Input
import { createElement } from 'react';
export default () => createElement( 'div', null, 'Hello!' );

// Transpiled to (before code runs)
const _react = require('react');
module.exports = () => _react.createElement( 'div', null, 'Hello!' );

Consequently, when this function is serialized, the whole of the _react object is in scope and is serialized, whereas all we actually need is the .createElement property.
Optimization (4) (the most efficient one) would apply, except in case of export let where the value of the export can be changed dynamically in a function (pretty rare case).
Difficulties
I can foresee several difficulties implementing this:

Which optimization (if any) to apply cannot be determined until entire app has been serialized to know whether (a) any optimization killer applies and (b) whether properties are read-only or not.
Where a property is called as a method e.g. _react.createElement(), createElement()'s code must be analysed to see if it uses this. Optimizations can only be used if it doesn't.
Both of the above mean serialization of function scope vars needs to happen later than at present, to avoid serializing the whole object if only one property will be included in output. This will complicate identifying circular references.

Tempting to think that functions accessing a read-only object property can be optimized to access only that property even if another function accesses the object whole. However, that's not possible, as the function accessing the object whole could use Object.defineProperty() to redefine that property - so it's actually not read-only at all.
const O = Object,
  d = O['define' + 'Property'];
function write(o, n, v) {
  d( o, n, { value: v } );
}

const obj = { x: 1, y: 2 };
export default {
  getX() {
    return obj.x;
  },
  setX(v) {
    write(obj, 'x', v);
  }
};

setX() writes to obj.x but it's not possible through static analysis to detect that it will do this. So can't know if obj.x is read only or not.
You can optimize getX() if only other use of obj is via dynamic property lookup (obj[ name ]) and not within an assignment (obj[ name ] = ...).

Detecting read-only properties will also need to detect assignment via deconstruction e.g.:
({a: obj.x} = {a: 123})

Two-phase serialization now has its own issue: #426

repo: overlookmotel/livepack


text:
Broken with React 16.9.0

With React/ReactDOM 16.9.0 all tests relating to rehydration on client are failing. Am not sure what the cause is.
Have locked dependency to 16.8.x for now and put a note in README not to use 16.9.0.

Fixed in v0.5.2.

repo: overlookmotel/react-async-ssr


text:
Feature/#28 enable fuzzy search

Enable fuzzy search
Major change

Enable fuzzy search in the cocktail search
function change: onClickSearch

change GA script after UI body rendered
In order mot to block the user in the slow network env.

Library add
"fuse.js": "6.4.0"
https://www.npmjs.com/package/fuse.js

Nice!

repo: overpartylab/cocktails-guide-book


text:
Import 369da2d262: Merge remote-tracking branch 'origin/master' (by Caity)

This is an automated proposal to look at a commit made by Caity and import it into Overte

Commit:
369da2d262d7da45373da7cf89b375eeeb846c24

Author:
Caity

Date:
Tue, 04 Feb 2020 18:47

Merge remote-tracking branch 'origin/master'

Stats:

Filename
Stats
Lines
Added
Removed
Lines in blame

.gitlab-ci.yml

92
92
0
⚠ 0

docker/.gitignore

1
1
0
⚠ 0

docker/Dockerfile

22
22
0
⚠ File gone

docker/digitalocean.json

36
36
0
⚠ File gone

docker/docker-compose.yml

21
21
0
⚠ File gone

docker/modify-domain-port.py

32
32
0
⚠ File gone

docker/supervisor.conf

59
59
0
⚠ File gone

7 files
-
263
263
0
0

To work on this, please assign the issue to yourself, then look at the commit and decide whether this would be a good addition to Overte.

If the commit is useful, tag it with "Tivoli: Keep", and keep it open until it's merged.
If the commit is not useful, tag it with "Tivoli: Discard", and close it.
If the commit is not useful right now, but might be later, tag it with "Tivoli: Maybe later", and close it.
If it's hard to decide, tag it with "Tivoli: Discuss", and keep it open.

Useful commits should be submitted as a PR against Overte. Tag this issue in PR, so that it's automatically closed once the PR is merged.
You can cherry-pick this issue with this command:
git cherry-pick 369da2d262d7da45373da7cf89b375eeeb846c24

Duplicate of #149

repo: overte-org/tivolicloud


text:
请教laravel中如何在微信支付中 catch  UnifiedOrder 抛出的异常？

请教laravel中如何在微信支付中 catch  UnifiedOrder 抛出的异常？

http://php.net/manual/zh/language.exceptions.php

authors: jaring overtrue

repo: overtrue/wechat

license: mit


text:
Issue with creating production bundles

Hi,
Thanks very much for publishing this and the supplementary guide. It is very very helpful.
For webpack.prod.config.js, I had to remove the last curly brace. I also had to add the following two lines:
    var webpack = require('webpack');
    var BundleTracker = require('webpack-bundle-tracker');

When I run
./node_modules/.bin/webpack --config webpack.prod.config.js

it expects additional parameters. Am I doing something wrong?

Can you share full config and full traceback please?

I started with what is in your blog post here at the bottom under 'webpack.prod.config.js'.
Running
./node_modules/.bin/webpack --config webpack.prod.config.js

I got
/home/manish/Work/mundaii/webpack.prod.config.js:6
	    new BundleTracker({filename: './webpack-stats-prod.json'})
	        ^
ReferenceError: BundleTracker is not defined
    at Object.<anonymous> (/home/manish/Work/mundaii/webpack.prod.config.js:6:10)

Adding
var BundleTracker = require('webpack-bundle-tracker');

gets me
/home/manish/Work/mundaii/webpack.prod.config.js:12
  new webpack.DefinePlugin({
      ^
ReferenceError: webpack is not defined
    at Object.<anonymous> (/home/manish/Work/mundaii/webpack.prod.config.js:12:7)

Adding
var webpack = require('webpack');

gets me
webpack 1.12.0
Usage: https://webpack.github.io/docs/cli.html
.
.
.

Final webpack.prod.config.js looks like
var config = require('./webpack.config.js');

var webpack = require('webpack');
var BundleTracker = require('webpack-bundle-tracker');
config.output.path = require('path').resolve('./assets/dist');
config.output.pathName = '/production/path/to/bundle/directory'; // This will override the url generated by django's staticfiles

config.plugins = [
  new BundleTracker({filename: './webpack-stats-prod.json'}),

  // removes a lot of debugging code in React
  new webpack.DefinePlugin({
    'process.env': {
      'NODE_ENV': JSON.stringify('production')
  }}),

  // keeps hashes consistent between compilations
  new webpack.optimize.OccurenceOrderPlugin(),

  // minifies your code
  new webpack.optimize.UglifyJsPlugin({
    compressor: {
      warnings: false
    }
  })
];

You'll have to add module.exports = config; to the bottom of the production config file. I've updated the blog post. Thanks for pointing this out.

It works now, thanks @owais.
FYI - you're still missing
var BundleTracker = require('webpack-bundle-tracker');

in your updated blog post.

authors: dopeboy owais

repo: owais/django-webpack-loader


text:
:hammer: Support strict primary key enforcement

This change causes a warning to happen any time you save a table without a primary key. It also allows a strict mode in which the warning becomes an exception.
Motivation
We are trying to move more metadata to the indicator level. The dimensions an indicator has is a really important piece of metadata that is make or break for automatically collecting, indexing and reusing the indicators.
How it will be used
The Buildkite tasks that build production data and do the nightly full build will not be run in strict mode. However, PRs will be run in strict mode. This is to avoid any downtime for the ETL, whilst strongly encouraging future changes to have a primary key.

For more background of where I think we should go with dimensions, have a read here: https://www.notion.so/owid/2023-06-27-Proposal-for-dimensions-in-the-ETL-9e1a26fec3b94ad2a33ca8fab14b090a?pvs=4

It's a good idea. The only annoying thing is that, in practice, we are always setting index before saving, and then resetting index after loading. In an ideal world working with multi-index tables would be easy. But overall I think it's a safe approach.

@pabloarosado Have a read of the proposal I wrote in Notion as well. I think we should move to something simpler, which is just using dim_ in front of dimension columns. E.g. dim_country, dim_year. It's a common convention that's also pretty self-explanatory. We can could even support new and old ways of doing this in a backwards-compatible way.

repo: owid/etl


text:
Update CO2 dataset

Minor changes in GCB metadata.
Fix ~issue with African consumption-based emissions, and~(this was handled in a previous PR) issue with Palau emissions.
Update owid_co2 dataset.
Archive unused steps (and update country_profiles dependencies to use the latest GCB dataset).

Hey @lucasrodes I'm going to merge this PR to avoid blocking other things. There aren't any big changes, but please have a look whenever you have a few minutes, thanks.


text:
Minter updates

Get better coverage on Minter contracts.

/cib

repo: owlprotocol/contracts


text:
Release web 3.0.0

~DO NOT MERGE
This is a WIP PR bringing web-3.0.0, but it's still at the web-v3.0.0-rc2. If it looks good in oCIS we'll release web-v3.0.0 and update it in this PR again.~ It does now feature the official web-v3.0.0 release
Description
This PR pulls the assets of the web-v3.0.0 release and updates the accounts and settings service according to the recent changes in the owncloud design system v6.0.1.
Related Issue

Fixes https://github.com/owncloud/ocis/issues/1927

Motivation and Context
Bring the new web ui to its most recent version.
How Has This Been Tested?
CI
Types of changes

[x] New feature (non-breaking change which adds functionality)

Checklist:

[x] Code changes

needs a rebase after #1941  in order to get the pipeline green

needs a rebase after #1941 in order to get the pipeline green

I'll take care, thanks 🤝

authors: kulmann pascalwengerter wkloucek

repo: owncloud/ocis


text:
Bugfix: Fix multiple configuration environment variables for the storage-users extension

Description
We've fixed multiple environment variable configuration options for the storage-users extension:

STORAGE_USERS_GRPC_ADDR was used to configure both the address of the http and grpc server.
This resulted in a failing startup of the storage-users extension if this config option is set,
because the service tries to double-bind the configured port (one time for each of the http and grpc server). You can now configure the grpc server's address with the environment variable STORAGE_USERS_GRPC_ADDR and the http server's address with the environment variable STORAGE_USERS_HTTP_ADDR
STORAGE_USERS_S3NG_USERS_PROVIDER_ENDPOINT was used to configure the permissions service endpoint for the S3NG driver and was therefore renamed to STORAGE_USERS_S3NG_PERMISSIONS_ENDPOINT
It's now possible to configure the permissions service endpoint for all  storage drivers with the environment variable STORAGE_USERS_PERMISSION_ENDPOINT, which was previously only used by the S3NG driver.

WARNING: this could be considered a breaking change
Related Issue

Needed for https://github.com/owncloud/ocis-charts/pull/43 to start the storage-users http and grpc servers listening on all interfaces

Motivation and Context
fix the config
How Has This Been Tested?

locally

Screenshots (if appropriate):
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Technical debt
[ ] Tests only (no source changes)

Checklist:

[x] Code changes
[ ] Unit tests added
[ ] Acceptance tests added
[ ] Documentation ticket raised:

@micbar is this considered a breaking change? For the STORAGE_USERS_S3NG_USERS_PROVIDER_ENDPOINT change, we could remain backwards compatible. All others are not breaking (STORAGE_USERS_GRPC_ADDR can not be configured by anyone currently because the service refuses to start)

I guess that this will change the yaml/env file output - therefore docs relevant. Just hooking in so we can trigger a docs build.

authors: mmattel wkloucek


text:
add more data as inputs

volume
bid/ask spread
RSI/MACD / other derivative metrics
social sentiment analysis

ref: #13 #8

I've used Ichimocku in my manual trading.  They are very powerful.

Have you looked at all into using Social Mention or Google Alerts for social sentiment analysis?
Sifting and reacting to viral bursts of social approval could provide large gains with minimal trading.

Nice @jeff-hykin , I didnt check the other issues. I will start to follow all of them in here.
@owocki I already had filled the form, will you create a a group or we will be here by now?

@rmendes900 just sent your invite

(Just saving this for future use)
Heres a potential data source @darcy mentioned on slack
https://www.quandl.com/data/BCHAIN?keyword=bitcoin

Quandl looks super easy to integrate, there's also a Python library:
https://www.quandl.com/help/python

https://github.com/owocki/pytrader/pull/75

https://github.com/owocki/pytrader/pull/76

authors: NDuma jeff-hykin owocki rmendes900 rubik

repo: owocki/pytrader


text:
Remove FfiWaker from RUST_WAKER_VTABLE

Only FfiWakerBase is used by vtable functions (as it's the stable ABI)
In general, the pointer isn't guaranteed to (and is expected, at times, not to) point to FfiWaker

Sorry for the late response. Thanks!

authors: oxalica timotheyca

repo: oxalica/async-ffi


text:
feat(linter) no double comparisons

https://rust-lang.github.io/rust-clippy/master/index.html#/double_comparisons

Current dependencies on/for this PR:

main

PR #1710

PR #1712   👈

This stack of pull requests is managed by Graphite.

It looks like we can make this rule support auto-fix

repo: oxc-project/oxc


text:
Refactorization of the optimizer code.

This cleans some code around the optimizer. I breaks the API. See #67 .

OK! It is a bit messy with the build system. But so be it!


text:
Improve Kerberos auth test stability

Change KerberosContainer wait strategy from log to 88 port listen
Remove keytabs created in test-resources, the test now copies them to the target/test-classes/kerberos dir.
Fixes #121

@ozangunalp lgtm.  thank you for the investigation and producing the fix.

authors: k-wall ozangunalp

repo: ozangunalp/kafka-native


text:
The Ci_query_log don´t save operations logs in action UPDATE, DELETE, INSERT

Hi ozanmora
First congratulations on the creation of HOOK.
I implanted in my system this hook and it worked perfectly, but the actions of UPDATE, INSERT and DELETE are not recorded in the log file.
Is it something of a config in Codeigniter?
See u  ozanmora

Hello @denisVitonis ,
I noticed the same problem. I have no idea where exactly the reason. But I am thinking of updating this code. When I solve the issue, I will note here.
If you can find a solution to this issue, I would be glad if you can share it with me.
Thanks

Dear Ozan, I managed to solve it in another way, however using your hook.
First and I created a helper.
with the function
////////////CODE IN helper FILE***//////////////////////////
function log_queries_2($sql) {
$filepath = APPPATH . 'logs/Query-log-' . date('Y-m-d') . '.php';
$handle = fopen($filepath, "a+");
fwrite($handle, $sql." \n Execution Time: ".date("Y-m-d H:i:s")."\n\n");
fclose($handle);
}
//////////////**************************///////////////////
After this go to system/database/DB_driver.php and find function named "query" and put this below code on top inside the function.
It may not be the best of good practices but it works perfectly.
////////////CODE IN DB_driver.php  FILE***//////////////////////////
log_queries_2($sql);'
//////////////**************************///////////////////

Dear Ozan, I managed to solve it in another way, however using your hook.
First and I created a helper.
with the function
////////////CODE IN helper FILE***//////////////////////////
function log_queries_2($sql) {
$filepath = APPPATH . 'logs/Query-log-' . date('Y-m-d') . '.php';
$handle = fopen($filepath, "a+");
fwrite($handle, $sql." \n Execution Time: ".date("Y-m-d H:i:s")."\n\n");
fclose($handle);
}
//////////////**************************///////////////////
After this go to system/database/DB_driver.php and find function named "query" and put this below code on top inside the function.
It may not be the best of good practices but it works perfectly.
////////////CODE IN DB_driver.php FILE***//////////////////////////
log_queries_2($sql);'
//////////////**************************///////////////////

this solution is not the right approach. Because if you want to be able to update Codeigniter, you should never make changes under the system folder.
I have made some code fixes but this problem is still not resolved.
I'm still investigating this problem. If I can find a solution, I want to update it as soon as possible.

I solved this problem. Actually, this was not an error.
The code runs correctly and actually writes INSERT, UPDATE, DELETE queries to the log file.
However, this code only works on "post_controller" (Called immediately after your controller is fully executed). You can read the details of this from the link.
You are probably doing a redirect after doing INSERT, UPDATE, DELETE operations like me. The controller cannot be completed if it contains redirecting. No database queries can be written to the log file because the operation could not be completed.
P.S.: My English is not very good. I apologize for this.

authors: denisVitonis ozanmora


text:
Add Polish Names and Surnames

The repository is missing Polish names and surnames. Follow the guide below to add them.
🚀 How to Contribute:

Fork the repository.
Add names and surnames for your country following the format provided below.
Submit a Pull Request with your changes.
Please include a reliable source for the names and surnames you're adding, preferably a public database or a reputable website.

📄 Format:
For names (src/names/pl.ts):
const polishNames = {
    0: [ // Male names - Add the URL of the names source here
        'Name1', 'Name2', 'Name3', ...
    ],
    1: [ // Female names - Add the URL of the names source here
        'Name1', 'Name2', 'Name3', ...
    ]
}

export default polishNames;

For surnames (src/surnames/pl.ts):
const polishSurnames = [ // Add the URL of the surnames source here
    'Surname1', 'Surname2', 'Surname3', ...
];

export default polishSurnames;

📌 Important Notes:

Ensure that the names and surnames you add are common and not specific to a small group.
50 names for both males and females, and 50 surnames.
Organize the names with 10 entries per row.
Avoid adding names that might be offensive or inappropriate.
Ensure you're not violating any copyright or data privacy rules.

i would like to work on this issue

Sure, actually, there's no need to ask. As long as anyone follows the guidelines, I'm OK with merging any pull request.

repo: ozdemirburak/full-name-generator


text:
Does fuzzy matching work?

Hey I am trying to get the fuzzy matching part working but it seems to not be giving me any results.
I have 123 456 7891 and 123 556 8891 in the Trie and I want the query of 123 656 to return me those two numbers but instead it returns nil.
Am I misunderstanding what fuzzy searching is here?

@ozeidan

Hello. So I am not sure if this implementation adheres to the normal definition of fuzzy matching but my definition is: characters of the search term have to occur in the matching string in the same order, but not necessarily in one piece. So searching for grch will match gosearch, but grhc won't.
I am not quite sure about the definition of fuzzy matching according to your examples. Should the query match those strings because all the characters in the query are also present in the strings?

@ozeidan Fuzzy matching to me would be that the input query is 'close enough' to the strings in the tree
the 'edit distance' isn't too far out
If the trie has 123 456 7891 then search query 123 465 8971 should return the string - because it is fuzzily the same
but 567 123 6280 should not - cause its really far apart
Does that make sense?

Ah I see what you mean. So you are talking about something like the Levenshtein distance?
So as of now the 'fuzzy' matching here works in a very different way (maybe we should call it something else then). I'll try to think about how we could implement the Levenshtein distance (or some similar heuristic). We'll have to find something that works well with the trie structure, as far as I remember the performance of the search depends on being able to eliminate a lot of branches of the trie very early on.

authors: asad-awadia ozeidan

repo: ozeidan/fuzzy-patricia


text:
Release/0.1.2

Release notes

Addition of time() and timeEnd() methods for measuring code execution times.
Added formatting options for text and json outputs.
Changed configurations for init() method in order to give more flexibility when choosing the output target and their formats.
Log levels can be updated at runtime to increase/decrease logging verbosity with the OZLOGGER_LEVEL environment variable.
Colored output must be enabled with the OZLOGGER_COLORS environment variable.

Resolves #3

repo: ozmap/ozlogger


text:
The window jumps when the Option (⌥) is pressed

Before Submitting Your Bug Report

[X] I have verified that there isn't already an issue reporting the same bug to prevent duplication.
[X] I have seen the FAQ.

Maccy Version (see 'About' window)
0.31.0
macOS Version
14.4.1
Maccy Settings
{
    "KeyboardShortcuts_delete" = "{\\"carbonModifiers\\":2048,\\"carbonKeyCode\\":51}";
    "KeyboardShortcuts_pin" = "{\\"carbonModifiers\\":2048,\\"carbonKeyCode\\":35}";
    "KeyboardShortcuts_popup" = "{\\"carbonModifiers\\":2304,\\"carbonKeyCode\\":8}";
    "LaunchAtLogin__hasMigrated" = 1;
    "NSStatusItem Visible Item-0" = 0;
    "NSWindow Frame SUStatusFrame" = "1080 961 400 134 0 0 2560 1415 ";
    "NSWindow Frame SUUpdateAlert" = "970 762 620 398 0 0 2560 1415 ";
    "NSWindow Frame com.sindresorhus.Preferences.FrameAutosaveName" = "1039 469 542 435 0 0 2560 1415 ";
    "NSWindow Frame com.sindresorhus.Settings.FrameAutosaveName" = "993 667 442 322 0 0 2560 1415 ";
    SUEnableAutomaticChecks = 0;
    SUHasLaunchedBefore = 1;
    SULastCheckTime = "2024-05-07 17:12:09 +0000";
    SUSendProfileInfo = 0;
    WebKitDefaultFontSize = 13;
    WebKitJavaScriptEnabled = 0;
    WebKitPluginsEnabled = 0;
    WebKitStandardFont = "-apple-system-font";
    WebKitUserStyleSheetEnabledPreferenceKey = 1;
    WebKitUserStyleSheetLocationPreferenceKey = "/Applications/Maccy.app/Contents/Frameworks/Sparkle.framework/Resources/ReleaseNotesColorStyle.css";
    avoidTakingFocus = 1;
    clearOnQuit = 0;
    enabledPasteboardTypes =     (
        "public.html",
        "public.utf8-plain-text",
        "public.rtf"
    );
    hideFooter = 1;
    hideTitle = 1;
    historySize = 999;
    ignoredPasteboardTypes =     (
        "com.typeit4me.clipping",
        "Pasteboard generator type",
        "net.antelle.keeweb",
        "de.petermaurer.TransientPasteboardType",
        "com.agilebits.onepassword"
    );
    imageMaxHeight = 16;
    maxMenuItemLength = 80;
    maxMenuItems = 16;
    migrations =     {
        "2020-04-25-allow-custom-ignored-types" = 1;
        "2020-06-19-use-keyboardshortcuts" = 1;
        "2020-09-01-ignore-keeweb" = 1;
        "2021-02-20-allow-to-customize-supported-types" = 1;
        "2021-06-28-add-title-to-history-item" = 1;
        "2021-10-16-remove-dynamic-pasteboard-types" = 1;
        "2022-08-01-rename-suppress-clear-alert" = 1;
        "2022-11-14-add-html-rtf-to-supported-types" = 1;
        "2023-01-22-add-regexp-search-mode" = 1;
    };
    pasteByDefault = 0;
    playSounds = 0;
    popupPosition = center;
    previewDelay = 99000;
    searchMode = fuzzy;
    showInStatusBar = 0;
}

Description
See the attached video:
https://github.com/p0deje/Maccy/assets/88809/fdd4de5c-b9f2-49d3-8057-50893f13ba69
Refs #631
Steps to Reproduce
One way to reproduce it is to summon the popup window then press ⌥. Another way is to summon the popup window and then release the shortcut keys such that the ⌥ is released the last.

FWIW I see something similar but only seems to be when Terminal.app is frontmost app.

I tried to debug this by adding an observer for NSWindow.didMoveNotification / NSWindow.didResizeNotification in MenuHeaderView.viewDidMoveToWindow:
Looks like when you release the Option key, the window gets incorrectly resized, here is the backtrace:
Thread 1 Queue : com.apple.main-thread (serial)
#0	0x0000000100f293d8 in closure #2 in MenuHeaderView.viewDidMoveToWindow() at Maccy/Maccy/Menu/MenuHeader/MenuHeaderView.swift:62
#1	0x0000000100f2932c in thunk for @escaping @callee_guaranteed @Sendable (@in_guaranteed Notification) -> () ()
#2	0x000000018818f130 in __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ ()
#3	0x00000001882233d8 in ___CFXRegistrationPost_block_invoke ()
#4	0x0000000188223320 in _CFXRegistrationPost ()
#5	0x000000018815d678 in _CFXNotificationPost ()
#6	0x000000018927a4e4 in -[NSNotificationCenter postNotificationName:object:userInfo:] ()
#7	0x000000018ba3c0c8 in -[NSWindow _setFrameCommon:display:fromServer:] ()
#8	0x000000018c0f8804 in -[NSPopupMenuWindow setFrame:display:animate:] ()
#9	0x000000018c0f8178 in -[NSPopupMenuWindow updateWindowFrameTo:withAnimation:] ()
#10	0x000000018bff2828 in -[NSContextMenuImpl _menuBackingViewDidChangeIntrinsicSizeWithAnimation:] ()
#11	0x000000018bff2454 in -[NSContextMenuImpl _commitWindowSizeChangesForWidth:height:animated:] ()
#12	0x000000018bff2294 in -[NSContextMenuImpl endGroupingUpdates] ()
#13	0x000000018c20fd60 in -[NSCocoaMenuImpl _updateModifierFlagsTo:groupingUpdates:] ()
#14	0x000000018c0381dc in -[NSMenuTrackingSession _modifierFlagsChanged:] ()
#15	0x000000018c037cb4 in -[NSMenuTrackingSession handleEvent:] ()
#16	0x000000018c037150 in -[NSMenuTrackingSession startRunningMenuEventLoop:] ()
#17	0x000000018c76a8e4 in -[NSContextMenuTrackingSession startMonitoringEventsInMode:] ()
#18	0x000000018bff0310 in +[NSContextMenuImpl presentPopup:fromView:withContext:animated:] ()
#19	0x000000018c218b40 in _NSPopUpMenu ()
#20	0x000000018c21d398 in -[NSCocoaMenuImpl _popUpMenuPositioningItem:atCocoaIndex:atLocation:inView:withPrivateFlags:appearance:] ()
#21	0x000000018c093a80 in -[NSMenu popUpMenuPositioningItem:atLocation:inView:appearance:] ()
#22	0x0000000100f3be40 in Menu.popUpMenu(at:ofType:) at Maccy/Maccy/Menu/Menu.swift:92
#23	0x0000000100ee334c in closure #1 in closure #1 in MenuController.popUp() at Maccy/Maccy/Menu/MenuController.swift:29
#24	0x0000000100ee3ca4 in MenuController.linkingMenuToStatusItem(_:) at Maccy/Maccy/Menu/MenuController.swift:79
#25	0x0000000100ee3190 in closure #1 in MenuController.popUp() at Maccy/Maccy/Menu/MenuController.swift:28
#26	0x0000000100ee3e68 in MenuController.withFocus(_:) at Maccy/Maccy/Menu/MenuController.swift:120
#27	0x0000000100ee3024 in MenuController.popUp() at Maccy/Maccy/Menu/MenuController.swift:23
#28	0x0000000100f52ab0 in Maccy.popUp() at Maccy/Maccy/Maccy.swift:99
#29	0x0000000100f66fc0 in implicit closure #2 in implicit closure #1 in AppDelegate.applicationDidFinishLaunching(_:) at Maccy/Maccy/AppDelegate.swift:31
#30	0x0000000100f7f91c in thunk for @escaping @callee_guaranteed () -> () ()
#31	0x0000000100f7f564 in thunk for @escaping @callee_guaranteed () -> (@out ()) ()
#32	0x0000000100f7e580 in static KeyboardShortcuts.handleOnKeyDown(_:) at KeyboardShortcuts/Sources/KeyboardShortcuts/KeyboardShortcuts.swift:82
#33	0x0000000100f7df40 in implicit closure #1 in static KeyboardShortcuts.register(_:) at KeyboardShortcuts/Sources/KeyboardShortcuts/KeyboardShortcuts.swift:26
#34	0x0000000100f78634 in static CarbonKeyboardShortcuts.handleEvent(_:) at KeyboardShortcuts/Sources/KeyboardShortcuts/CarbonKeyboardShortcuts.swift:142
#35	0x0000000100f782f4 in carbonKeyboardShortcutsEventHandler(eventHandlerCall:event:userData:) at KeyboardShortcuts/Sources/KeyboardShortcuts/CarbonKeyboardShortcuts.swift:4
#36	0x0000000100f79130 in @objc carbonKeyboardShortcutsEventHandler(eventHandlerCall:event:userData:) ()
#37	0x0000000192914444 in DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) ()
#38	0x0000000192913844 in SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) ()
#39	0x0000000192929cd8 in SendEventToEventTarget ()
#40	0x000000018c1ec6c8 in -[NSApplication(NSEventRouting) sendEvent:] ()
#41	0x000000018be3a89c in -[NSApplication _handleEvent:] ()
#42	0x000000018b9eb0c0 in -[NSApplication run] ()
#43	0x000000018b9c22e0 in NSApplicationMain ()
#44	0x0000000100f6b034 in main at Maccy/Maccy/AppDelegate.swift:9
#45	0x0000000187d320e0 in start ()

Don't know if it's a bug or a misuse yet.

Removing https://github.com/p0deje/Maccy/blob/211f327ba5d1bcbbae34df976719626c664a2907/Maccy/Menu/Menu.swift#L91 fixes the issue, although the window appears not centered on the screen.

Tracked it to https://github.com/p0deje/Maccy/blob/211f327ba5d1bcbbae34df976719626c664a2907/Maccy/Menu/Menu.swift#L485

I was able to consistently reproduce inside a clean VM (using VirtualBuddy) with just Maccy installed.

I have this fixed in 2.0, but it's going to be a couple of weeks until I release the first alpha. In 2.0, Maccy uses NSPanel instead of NSMenu which makes window manipulation much easier than it currently is.

It appears that post-popup adjustment of window position is the true culprit here https://github.com/p0deje/Maccy/blob/211f327ba5d1bcbbae34df976719626c664a2907/Maccy/Menu/Menu.swift#L429

Wrapping this call with ensureInEventTrackingModeIfVisible didn't fix it for me.

authors: Kentzo afragen p0deje


text:
jsonschema 3.0+ support

Hi, the jsonschema has been updated to 3.0+, and maybe has some break changes:
.eggs/openapi_spec_validator-0.2.4-py3.6.egg/openapi_spec_validator/__init__.py:7: in <module>
    from openapi_spec_validator.factories import JSONSpecValidatorFactory
.eggs/openapi_spec_validator-0.2.4-py3.6.egg/openapi_spec_validator/factories.py:5: in <module>
    from openapi_spec_validator.generators import (
.eggs/openapi_spec_validator-0.2.4-py3.6.egg/openapi_spec_validator/generators.py:12: in <module>
    class SpecValidatorsGeneratorFactory:
.eggs/openapi_spec_validator-0.2.4-py3.6.egg/openapi_spec_validator/generators.py:19: in SpecValidatorsGeneratorFactory
    'properties': _validators.properties_draft4,
E   AttributeError: module 'jsonschema._validators' has no attribute 'properties_draft4'

It was fixed with #590.2.5 and version 0.2.5

I have same problem on python3.6.7
openapi-spec-validator==0.2.6
jsonschema==3.0.1
MacBook-Pro-ilya:projects ilya$ pip -V
pip 19.0.3 from /Users/ilya/.pyenv/versions/3.6.7/lib/python3.6/site-packages/pip (python 3.6)
MacBook-Pro-ilya:projects ilya$ pip show openapi_spec_validator
Name: openapi-spec-validator
Version: 0.2.6
Summary: UNKNOWN
Home-page: https://github.com/p1c2u/openapi-spec-validator
Author: Artur Maciag
Author-email: maciag.artur@gmail.com
License: Apache License, Version 2.0
Location: /Users/ilya/.pyenv/versions/3.6.7/lib/python3.6/site-packages
Requires: pathlib, PyYAML, jsonschema, six
Required-by:
MacBook-Pro-ilya:projects ilya$ pip show jsonschema
Name: jsonschema
Version: 3.0.1
Summary: An implementation of JSON Schema validation for Python
Home-page: https://github.com/Julian/jsonschema
Author: Julian Berman
Author-email: Julian@GrayVines.com
License: UNKNOWN
Location: /Users/ilya/.pyenv/versions/3.6.7/lib/python3.6/site-packages
Requires: setuptools, pyrsistent, six, attrs
Required-by: openapi-spec-validator, jsonmerge
MacBook-Pro-ilya:projects ilya$ /Users/ilya/.pyenv/versions/3.6.7/bin/python
Python 3.6.7 (default, Mar 13 2019, 14:00:09)
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.10.44.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from openapi_spec_validator import validate_v3_spec
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/ilya/.pyenv/versions/3.6.7/lib/python3.6/site-packages/openapi_spec_validator/__init__.py", line 7, in <module>
    from openapi_spec_validator.factories import JSONSpecValidatorFactory
  File "/Users/ilya/.pyenv/versions/3.6.7/lib/python3.6/site-packages/openapi_spec_validator/factories.py", line 5, in <module>
    from openapi_spec_validator.generators import (
  File "/Users/ilya/.pyenv/versions/3.6.7/lib/python3.6/site-packages/openapi_spec_validator/generators.py", line 12, in <module>
    class SpecValidatorsGeneratorFactory:
  File "/Users/ilya/.pyenv/versions/3.6.7/lib/python3.6/site-packages/openapi_spec_validator/generators.py", line 19, in SpecValidatorsGeneratorFactory
    'properties': _validators.properties_draft4,
AttributeError: module 'jsonschema._validators' has no attribute 'properties_draft4'
>>>

@strongbugman , do you still have that problem?

@timoilya
openapi-spec-validator 0.2.6 has requirement jsonschema<3, but you'll have jsonschema 3.0.1 which is incompatible.

@strongbugman , this ussue is closed, but jsonschema >3 is not supported in version 0.2.5
https://github.com/p1c2u/openapi-spec-validator/issues/54#issuecomment-467098215

I am having the same issue - openapi-spec-validator 0.2.6 and jsonschema 3.0.1 delivering the following error:
AttributeError: module 'jsonschema._validators' has no attribute 'properties_draft4'
Does @strongbugman 's comment mean I should step the spec validator back to a version lower than 0.2.5?

Yes, or you can create a PR to fix the compatibility problem
Ben notifications@github.com 于2019年4月14日周日 上午6:56写道：

I am having the same issue - openapi-spec-validator 0.2.6 and jsonschema
3.0.1 delivering the following error:
AttributeError: module 'jsonschema._validators' has no attribute
'properties_draft4'
Does @strongbugman https://github.com/strongbugman 's comment mean I
should step the spec validator back to a version lower than 0.2.5?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/p1c2u/openapi-spec-validator/issues/54#issuecomment-482896243,
or mute the thread
https://github.com/notifications/unsubscribe-auth/APXibQXnDJcVpCpN9v7i65wEQk-FwdFEks5vgmCNgaJpZM4aUuL6
.

@strongbugman , please review PR https://github.com/p1c2u/openapi-spec-validator/pull/72 if you may to approve it

authors: BenTaub p1c2u strongbugman timoilya


text:
bind context for customMethod

@RegisterInIs({
  customMethod: 'customNameOfMethod'
})
class Person {
  public name: string = 'default';
  methodOne() {
    console.log(this.name);
    return new String();
  }
  public static customNameOfMethod(argument: unknown): argument is Person {
    console.log(this); // empty object
    return this.name === undefined; // return true
    // return this.name === 'Ivan'; // return false and is sad
}
}
const person = new Person();
person.name = 'Ivan';
console.log(is.String(person.methodOne()));
is.Person.bind({custom: 1}); // Bind or take context from argument.
console.log([person].some(is.Person));

In 3.0.1 :)


text:
This module has gone Glacial - on the back-burner

This module was mostly built using the pre 2016 ufo build-tool, which is no longer available.
It's now reliant on rakudo 2016.xx precompilation, which isn't yet fast to load or run. Now takes quite a few minutes to run the test-suite, with most of the time spent in precompilation and/or loading.
At this stage, I'm only regressing this module occasionally. There doesn't seem to be a fair bit of scope for optimization both in rakudo and within this module. May look at this again towards the end of 2016 or early in 2017.

Running much better. Typically taking ~90 sec to run test suite on latest Rakudo 2016.11.
Picking it up again :-)


text:
Positional bool

Fixes #171
@ysndr, can you take a look if this does what you want? If it is - I'll make a new release.
Todo:

[ ] Add anywhere top level annotation
[ ] Add box top level annotation
[ ] Add catch for anywhere and use it in failing test cases
[ ] update documentation

seems so, found a different issue though:
remember that i try to parse --setBool <key> <value>?
#[derive(Debug, Clone, Bpaf)]
#[bpaf(adjacent)]
#[allow(unused)]
pub struct ConfigSetBool {
    /// Set <key> to <bool>
    #[bpaf(long("setBool"))]
    set_bool: (),
    /// Configuration key
    #[bpaf(positional("key"))]
    key: String,
    /// Configuration Value (bool)
    #[bpaf(positional("bool"))] // << this seems to work now, hurray :)
    value: bool,
}

I use this ^ contraption for that.
if i run xyz config --setBool key notabool I'm greeted with
ERROR: --setBool is not expected in this context

    configure user parameters

Which yes, tells me somewhat that it cant parse --setBool. but the way it does does not really help me to do it right. -- what i would expect is it saying which (positional) argument failed to parse.
This also seems to happen with when value: u32 but I'm not sure if that is a regression maybe

adjacent makes it so blocks must stick together, you also need anywhere

pub struct ConfigSetBool {
    /// Set <key> to <bool>
    #[bpaf(long("setBool"))]
    set_bool: (),
    /// Configuration key
    #[bpaf(positional("key"))]
    key: String,
    /// Configuration Value (bool)
    #[bpaf(positional("bool"))] // << this seems to work now, hurray :)
    value: bool,
}

fn try_this() -> impl Parser<ConfigSetBool> {
    config_set_bool().anywhere()
}

If this works - I'll add anywhere to a derive macro

no, that doesnt change anything as far as i can tell

Unrelated,... wouldnt it be great if i could write
fn try_this<T: ToParser>() -> impl Parser<T> {
    T::to_parser().anywhere()
}

instead of the same function three times ;)

Hmm... It sort of works for me
use bpaf::*;

#[derive(Debug, Clone, Bpaf)]
#[bpaf(adjacent)]
#[allow(unused)]
pub struct ConfigSetBool {
    /// Set <key> to <bool>
    #[bpaf(long("setBool"))]
    set_bool: (),
    /// Configuration key
    #[bpaf(positional("key"))]
    key: String,
    /// Configuration Value (bool)
    #[bpaf(positional("bool"))] // << this seems to work now, hurray :)
    value: bool,
}

fn main() {
    let x = config_set_bool().anywhere().many().to_options().run();
    todo!("{:?}", x);
}

elakelaiset% cargo run --release --example set_bool -- --setBool banana false --setBool durian true
    Finished release [optimized] target(s) in 0.02s
     Running `target/release/examples/set_bool --setBool banana false --setBool durian true`
thread 'main' panicked at 'not yet implemented: [ConfigSetBool { set_bool: (), key: "banana", value: false }, ConfigSetBool { set_bool: (), key: "durian", value: true }]', examples/set_bool.rs:21:5

try --setBool banana 123

Hmm... I see, I would call this a bug in anywhere, it should ignore missing arguments but should retain parse errors. Will fix, might take a bit.

instead of the same function three times ;)

Without functional dependencies or type families it seems hard to implement the trait constraint ToParser... I blame Rust :)

I blame Rust :)

fair enough :D
Though I'd be perfectly happy if deriving Bpaf for something would implement a trait for them that just exposes their derived parser as a Box<dyn Parser>..
Ive been doing that manually so far but having access to that directly would be handy in such cases...

try --setBool banana 123, parsing correct values works for me too

Pushed something. Seems to work for me as expected with invalid values. I'll have to add some tests and possibly deal with more corner cases so release might take a bit.

Though I'd be perfectly happy if deriving Bpaf for something would implement a trait for them that just exposes their derived parser as a Box..

Hmm... Currently you can get a boxed parser with construct!(parser), I can also expose it as method and add the method to top level bpaf annotation...
#[derive(Debug, Clone, Bpaf)]
#[bpaf(adjacent, anywhere, box)]
struct Foo {
...
}

in this case will give you fn foo() -> Box<dyn Parse>...

Any feedback on the article?
Back in 40 minutes.

well i kinda just want to have a generic way to get to the derived parser, what i currently use is a macro like this:
  macro_rules! parseable {
        ($type:ty, $parser:ident) => {
            impl crate::commands::package::Parseable for $type {
                fn parse() -> bpaf::parsers::ParseBox<Self> {
                    let p = $parser();
                    bpaf::construct!(p)
                }
            }
        };
    }

that i just run manually for every type where i would want that capability..
it gets me what i want but if the Bpaf derive macro could do that automatically would just be more convenient.

Any feedback on the article?

reading now

Any feedback on the article?

shall I review there, or do you want to discuss outside?

shall I review there, or do you want to discuss outside?

Up to you, I'm available at discord, whatsapp, google chat and signal. Probably google chat is going to be the easiest if you use it. manpacket@gmail.com

google chat

Oh they try it again? :D
I'll reach out tomorrow I guess or commit the review comments first, its not quite the middle of the day for me, quite the opposite
Though it is interesting to see this project unravelled a bit 👍🏼

Though I'd be perfectly happy if deriving Bpaf for something would implement a trait for them that just exposes their derived parser as a Box..

Hmm... Currently you can get a boxed parser with construct!(parser), I can also expose it as method and add the method to top level bpaf annotation...
#[derive(Debug, Clone, Bpaf)]
#[bpaf(adjacent, anywhere, box)]
struct Foo {
...
}

in this case will give you fn foo() -> Box<dyn Parse>...

Oh in don't know if were talking of different things then..
I mean something like <Foo as AsParseBox>::parse_box() -> Box<dyn Parser>

related to https://github.com/pacak/bpaf/pull/170, contains breaking changes in behavior

Sorry this will be a bit of a brain dump i figured after writing this up.
tl;dr
#[positional]
filed: bool

seems to work, error messages now talk about the value part not something else.
Nice progress!
Errors are something else, give it a read, I'll make it a seperate issue not to block this one.
So with
#[derive(Bpaf, Debug)]
struct Xyz {

    #[bpaf(long, switch)]
    bool_flag: bool,

    #[bpaf(long, argument)]
    bool_opt: bool,

    #[bpaf(positional)]
    bool_arg: bool,
}

these work as expected:
$ cargo run --  --bool-opt true true  --bool-flag
$ cargo run --  --bool-opt true --bool-flag true
$ cargo run --  --bool-opt true true

these fail as expected:
$ cargo run --  --bool-opt true nottrue
Couldn't parse "nottrue": provided string was not `true` or `false`
               ^       ^                          ^    ^    ^     ^
               '       '                          '----'----'-----'
               '-------'- why are these not the same? -'

with
#[derive(Debug, Clone, Bpaf)]
#[bpaf(adjacent)]
#[allow(unused)]
pub struct ConfigSetBool {
    /// Set <key> to <bool>
    #[bpaf(long("setBool"))]
    set_bool: (),
    /// Configuration key
    #[bpaf(positional("key"))]
    key: String,
    /// Configuration Value (bool)
    #[bpaf(positional("bool"))] // << this seems to work now, hurray :)
    value: bool,
}

fails correctly
$ cargo run --  --setBool key tru
Couldn't parse "tru": provided string was not `true` or `false`

boxed seems to work for what i can tell, even though it might not be what i proposed hh

UX discussion
I think this better go into a separate issue but i put it here for context
$ cargo run -- --bool-opt tru tru
Couldn't parse "tru": provided string was not `true` or `false`
                 |    L use positive sentence instead
                  \ which tru (see below)?

$ cargo run -- --bool-opt true true --bool-fla
No such flag: `--bool-fla`, did you mean `--bool-flag`?
            L differnet

$ cargo run -- true  --bool-flag --bool-flag --bool-opt true true
--bool-flag is not expected in this context
|
 \ another one (this time without ticks at all :p)

the error message should if possible show which argument went wrong
$ cargo run -- --bool-opt tru true
Invalid argument:

       got: --bool-opt tru
  expected: --bool-opt (true | false)

Type '<command> <subcommand> --help' to see all arguments

$ cargo run -- --bool-opt true true --bool-fla
No such flag:

       got: --bool-fla
  expected: [ --bool-flag ] < Only if --bool-flag is not already specified

Type '<command> <subcommand> --help' to see all arguments

cargo run -- true  --bool-flag --bool-flag --bool-opt true true
No such flag:

       got: --bool-flag
  expected: (none)

Type '<command> <subcommand> --help' to see all arguments

or even better:

$ cargo run -- true  --bool-flag --bool-flag --bool-opt true true
Duplicate flag:

       got: --bool-flag --bool-flag
  expected: [ --bool-flag ]

Type '<command> <subcommand> --help' to see all arguments

Though using positionals  for multi value options is still a bit awkward and looks like a hack in the help:
Usage: [--bool-flag] --bool-opt ARG <ARG> --setBool <key> <bool>

Available positional items:
    <key>   Configuration key          <---,
    <bool>  Configuration Value (bool) <---,
                                           ,
                                           ,
Available options:                         ,
        --bool-flag                        ,
        --bool-opt <ARG>                <--

FWIW pushed a branch that renders proper help for multivariable arguments - multiarg

Positional bool is now supported,
For purely positional items something like this should work in the recent master, adjacent is not needed. I also made some changes to make error messages more user friendly
#[derive(Debug, Clone, Bpaf)]
#[bpaf(anywhere, box)]
struct Foo {
    /// Set <key> to <bool>
    #[bpaf(long("setBool"))]
    set_bool: (),
    /// Configuration key
    #[bpaf(positional("key"))]
    key: String,
    /// Configuration Value (bool)
    #[bpaf(positional("bool"))] // << this seems to work now, hurray :)
    value: bool,
}

Took out UX discussion parts in a separate issue. going to merge this.

authors: pacak ysndr

repo: pacak/bpaf


text:
Qualifier values do not have first character converted to lowercase

FromString panics for some inputs. This change fixes the issue and adds a test to ensure it works.

I think we can close this PR here, because the commits are already in: https://github.com/package-url/packageurl-go/pull/65

repo: package-url/packageurl-go


text:
DistGitMRHandler: fetch tags from upstream source-git

We clone source-git fork by default - it does not need to have upstream
tags that are needed in the update-dist-git process.
This commit fetches tags from upstream (the repo against the MR is
opened) after the repo is cloned (initialization of LocalProject).
Fixes https://github.com/packit/hardly/issues/61
RELEASE NOTES BEGIN
When a dist-git MR is being created, hardly now fetches tags from the upstream source-git repo as they may not be present in contributor's fork.
RELEASE NOTES END

RELEASE NOTES BEGIN

Do we already want to include hardly changes in blog posts? We haven't so far.

We should start doing that at some point. Especially when we get people who will use hardly and rely on it :)

repo: packit/hardly


text:
Use existing __toString methods for argument and Matcher representation

If an error prints the arguments of an expectation, expected or actual, it represents them via the Mockery::formatArgument() method. For objects, this will return a simple object(className). This is unneccessarily obscure when the object has a __toString() method. The Matcher interface for example requires them.

@ccprog thanks for reporting, see #698 for a partial fix.

authors: ccprog davedevelopment

repo: padraic/mockery


text:
fix/issue-29-remoção-do-hello-world-auth/app.py

remoção do hello world no arquivo auth/app.py

Já foi ajustado em outro pull request

repo: paft-inc/paft-microservices


text:
Form builder

Is there a form builder that can be used in extensions for creating forms? Something like https://github.com/illuminate/html

We released the Pagekit Beta today. I close this issue because the code base completely changed. Please open a new issue if it still exists.

repo: pagekit/pagekit


text:
🛑 Every Nation Campus Gent is down

In d83e51c, Every Nation Campus Gent (http://everynationcampusgent.org) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Every Nation Campus Gent is back up in 5200516.

repo: pageon/uptime


text:
ngx_pagespeed not working with reverse proxy

I can't get ngx_pagespeed to work when reverse proxying node.js.
It works when just serving files normally, so is there something I'm missing here?
server {
        listen 80 default_server;
        listen [::]:80 default_server;

        server_name _;

        pagespeed on;

        pagespeed FileCachePath /var/cache/ngx_pagespeed/;

        pagespeed RewriteLevel PassThrough;
        pagespeed EnableCachePurge on;
        pagespeed PurgeMethod PURGE;
        pagespeed EnableFilters prioritize_critical_css;

        location /assets/ {
                expires 10d;
                alias /var/www/demo/assets/;
        }

        location / {
                proxy_pass http://localhost:3000;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection 'upgrade';
                proxy_set_header Host $host;
                proxy_cache_bypass $http_upgrade;
        }

        location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
          add_header "" "";
        }

        location ~ "^/pagespeed_static/" { }

        location ~ "^/ngx_pagespeed_beacon$" { }
}

Could you share how you tested if ngx_pagespeed is working?

Ensure you are not performing any gzip or other compression from within Node.js.

authors: mhaagens mikinho oschaaf


text:
Migrated to v2 emote cdn endpoint

Pull request checklist:

[x] CHANGELOG.md was updated, if applicable
[x] Documentation in docs/ or install-docs/ was updated, if applicable

Using v2 paths is required for animated emotes, as can be seen in the following example.
Example of an animated emote:
https://static-cdn.jtvnw.net/emoticons/v1/emotesv2_e0dd54510bc94631899bf64b097680a2/3.0
https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_e0dd54510bc94631899bf64b097680a2/default/dark/3.0
https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_e0dd54510bc94631899bf64b097680a2/static/dark/3.0

default can be replaced with static to always get a non-animated variant
I also moved already hardcoded emotes in the source in case v1 endpoint gets shut down later.

authors: alazymeme zneix

repo: pajbot/pajbot


text:
Release Paketo Go buildpack

Release in the week of May 17th if relevant changes or dependency updates are merged.
What steps did you take to close this issue? What resources did you use? How long did you spend on this task this week? Answer in a comment.

Released v0.7.0

In an effort to de-clutter the project board, we are moving away from recurring issues such as this one. This task will instead  be added to a checklist of tasks to be completed on a weekly basis.

repo: paketo-buildpacks/go


text:
Nominate Emily Johnson (@emmjohnson) as Nodejs Contributor

In accordance with the Paketo Buildpacks Governance document, I am nominating Emily Johnson (@emmjohnson) as a contributor to the Nodejs language family. Emily is a regular contributor to the buildpack family (https://github.com/paketo-buildpacks/nodejs/pull/321, https://github.com/paketo-buildpacks/node-engine/pull/240 etc.).

+1

With supermajority vote of maintainers in the affirmative, the nomination is considered to be approved.
Welcome to the team of Nodejs Contributors @emmjohnson!
@paketo-buildpacks/steering-committee  Could you please add Emily to the contributors team on github?

@emmjohnson Congrats!
@arjun024 Done!

repo: paketo-buildpacks/nodejs


text:
Buildpack support for Drupal 8

I'm attempting to build Drupal 8 using PHP buildpacks. Here's a breakdown of the steps I'm doing.

Scaffold Drupal 8.
composer create-project "drupal/recommended-project:^8" drupal

Add the following buildpack.yml.

---
php:
  version: 7.4.*
  webserver: nginx
  webdirectory: web

Build the container image.

pack build -b gcr.io/paketo-buildpacks/php drupal-8 --builder paketobuildpacks/builder:full

Run the new image.

docker run --interactive --tty --env PORT=8080  --publish 8080:8080 drupal-8
The trouble is, the build process creates a symlink of the vendor directory, and running composer install post that updates the autoload.php thus:
<?php

/**
 * @file
 * Includes the autoloader created by Composer.
 *
 * This file was generated by drupal-scaffold.
 *.
 * @see composer.json
 * @see index.php
 * @see core/install.php
 * @see core/rebuild.php
 * @see core/modules/statistics/statistics.php
 */

return require __DIR__ . '//layers/paketo-buildpacks_php-composer/php-composer-packages/vendor/autoload.php';

Which breaks the autoload sequence.
When I edit it back to what it was,
<?php

/**
 * @file
 * Includes the autoloader created by Composer.
 *
 * This file was generated by drupal-scaffold.
 *.
 * @see composer.json
 * @see index.php
 * @see core/install.php
 * @see core/rebuild.php
 * @see core/modules/statistics/statistics.php
 */

return require __DIR__ . '/../vendor/autoload.php';

It works fine. I am not sure why we create symlinks and then run composer install again.
Copying the vendor directory instead of symlinking it would help, although there might be some rationale behind symlinking it which I'm not aware of.
Running composer install after symlinking updates the autoload.php files to reflect the new location of vendor directory.
Happy to triage any approaches/fixes and contribute back to the buildpack, and thanks for the awesome work.

@paketo-buildpacks/php-maintainers This has been open for a bit. Any update on this? Does the workaround described in the replies to #366 also apply to this use case?

authors: badri fg-j

repo: paketo-buildpacks/php


text:
Remove dependencies

Demonstration implementation of paketo-buildpacks/rfcs#214

SBOM now generated from installation directory
Will no longer reuse layers
Installed version now retrieved using 'poetry --version'
Only exact version matching is supported

Checklist

[x] I have viewed, signed, and submitted the Contributor License Agreement.
[x] I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
[x] I have added an integration test, if necessary.
[x] I have reviewed the styleguide for guidance on my code quality.
[x] I'm happy with the commit history on this PR (I have rebased/squashed as needed).

Closing in favor of #75

repo: paketo-buildpacks/poetry


text:
Set RAILS_LOG_TO_STDOUT to true/1

What happened?

What were you attempting to do?

Build a rails app that sends logs to stdout

What did you expect to happen?

I expected RAILS_LOG_TO_STDOUT to be enabled so that our environment config could pick it up and use it to set the appropriate logger to direct logs to stdout for the container

What was the actual behavior? Please provide log output, if possible.

It is not enabled, the logs were directed to a file
Build Configuration

What platform (pack, kpack, tekton buildpacks plugin, etc.) are you
using? Please include a version.

What buildpacks are you using? Please include versions.

What builder are you using? If custom, can you provide the output from pack inspect-builder <builder>?

Can you provide a sample app or relevant configuration (buildpack.yml,
nginx.conf, etc.)?

Checklist

[ ] I have included log output.
[ ] The log output includes an error message.
[ ] I have included steps for reproduction.

@genevieve @paketo-buildpacks/ruby-maintainers This has been open for a bit. Is this still a need? Is there a workaround available?

Its not a bug. Its a feature request. Users routinely need to set this environment variable so that they can have their logs streamed to stdout in the container rather than the default location of a file inside the container. The workaround is just to set that environment variable when starting the container, but they shouldn't need to as having the buildpack set it by default would be pretty obviously better.

Makes sense.
Until the buildpack sets this environment variable, users can get this behaviour today by setting BPE_RAILS_LOG_TO_STDOUT=true in the build environment. This would ensure that RAILS_LOG_TO_STDOUT=true automatically when the container starts (see docs).

@robdimsdale I think this logic would go into the rails-assets buildpack. Its the most closely related, if not completely aligned with the intent of this feature.
We'll want to set this variable as a default using https://pkg.go.dev/github.com/paketo-buildpacks/packit/v2#Environment.Default. This would allow users to still override this value if needed.

I'm probably not going to get to this just yet, so anyone else who is interested is welcome to pick it up!

authors: fg-j genevieve robdimsdale ryanmoran

repo: paketo-buildpacks/ruby


text:
Eval a line of code without resetting the interpreter?

So I was writing some bindings to control Arduino functions with this, and thought it would be really cool if you could do something suspending a running interpreter, evaluating a line of code, and then returning to normal execution.
This would let you interact with a running program during development, change variables, etc, and would be great for using it like the early home computers that you used through a BASIC prompt.
Is this possible with the current API?

The interpreter is not designed to work as REPL, but it's possible to load and run without resetting the interpreter, eg:
int main(int argc, char* argv[]) {
	struct mb_interpreter_t* bas = 0;

	mb_init();

	mb_open(&bas);

	mb_load_string(
		bas,
		"n = n + 1\n"
		"print \"entry \", n;\n",
		false
	);
	mb_load_string(bas, "a = 22", false);
	mb_run(bas, false);
	mb_load_string(bas, "b = 7", false);
	mb_run(bas, false);
	mb_load_string(bas, "c = a / b", false);
	mb_run(bas, false);
	mb_load_string(bas, "print c;", false);
	mb_run(bas, false);

	mb_close(&bas);

	mb_dispose();

	return 0;
}

You would see each mb_run is a top-down execution with previous values reserved in the variables. Although this is not reentrant.
It's also possible to inspect variables with the mb_debug_get and mb_debug_set API, if this was the only interaction you were looking for.

Oh thanks! Those 2 APIs actually do cover 90% of what I'd like to do interactively.
I started working on a fork to allow multiple parsing contexts and stacks per interpreter, so you can load multiple "threads" (probably with a python style GIL ) and do traditional reentrant REPL, but that's a fairly big project.

Nice work! I appreciate your efforts, and I believe it would help others a lot.
Here's the dev roadmap:

Releasing current v1.2
Rewriting a new kernal as v2.0

So for the current branch, it's kinda feature-frozen. But it inspired me, I would consider adding REPL for v2.0.
I prefer to keep this open so others will find.

Awesome! I'll probably be following this project for a while, I'm using it to allow remote code updates on an open source IoT platform I'm doing, and I might try to port it to a handheld game console at some point.
It's a great language! Definitely one of the easiest to embed interpreters out there, and it doesn't use too much RAM on embedded systems.

Thanks! Looking forward to your sharing of your creations.

it's such a shame there is no REPL :(

authors: EternityForest atheros paladin-t


text:
Testing, please ignore. ajmshv

This is a bug bounty test. Please do not approve this! ajmshv

Thanks for your interest in palantir/eclipse-typescript, @letmeinkvar! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

authors: letmeinkvar palantirtech

repo: palantir/eclipse-typescript


text:
Property inheritance from extended class

Bug Report

TSLint version: 0.19.1
TypeScript version: 2.1.5
Running TSLint via: nodejs

The problem :
Using : Angular2
I have class A and class B extends A
In B.component.html I use a var story that is defined in class A.
The linter doesn't like this (see result below)
TypeScript code being linted
with tslint.json configuration:
{
    "rulesDirectory": [
        "node_modules/codelyzer",
        "node_modules/tslint-eslint-rules/dist/rules"
    ],
    "rules": {
        "class-name": true,
        "comment-format": [
            true,
            "check-space"
        ],
        "curly": true,
        "eofline": true,
        "forin": true,
        "indent": [
            true,
            "spaces"
        ],
        "ter-indent": [
            true,
            4
        ],
        "label-position": true,
        "max-line-length": [
            true,
            140
        ],
        "member-access": false,
        "member-ordering": [
            true,
            "static-before-instance",
            "variables-before-functions"
        ],
        "no-arg": true,
        "no-bitwise": true,
        "no-console": [
            true,
            "debug",
            "info",
            "time",
            "timeEnd",
            "trace"
        ],
        "no-construct": true,
        "no-debugger": true,
        "no-duplicate-variable": true,
        "no-empty": false,
        "no-eval": true,
        "no-shadowed-variable": true,
        "no-string-literal": false,
        "no-switch-case-fall-through": true,
        "no-trailing-whitespace": true,
        "no-unused-expression": true,
        "no-use-before-declare": true,
        "no-var-keyword": true,
        "object-literal-sort-keys": false,
        "one-line": [
            true,
            "check-open-brace",
            "check-catch",
            "check-else",
            "check-whitespace"
        ],
        "quotemark": [
            true,
            "single"
        ],
        "radix": true,
        "semicolon": [
            true,
            "never"
        ],
        "triple-equals": [
            true,
            "allow-null-check"
        ],
        "typedef-whitespace": [
            true,
            {
                "call-signature": "nospace",
                "index-signature": "nospace",
                "parameter": "nospace",
                "property-declaration": "nospace",
                "variable-declaration": "nospace"
            }
        ],
        "variable-name": false,
        "whitespace": [
            true,
            "check-branch",
            "check-decl",
            "check-operator",
            "check-separator",
            "check-type"
        ],
        "directive-selector": [
            true,
            "attribute",
            "cms",
            "camelCase"
        ],
        "component-selector": [
            true,
            "element",
            "cms",
            "kebab-case"
        ],
        "use-input-property-decorator": true,
        "use-output-property-decorator": true,
        "use-host-property-decorator": true,
        "no-input-rename": true,
        "no-output-rename": true,
        "use-life-cycle-interface": true,
        "use-pipe-transform-interface": true,
        "component-class-suffix": true,
        "directive-class-suffix": true,
        "no-access-missing-member": true,
        "templates-use-public": true,
        "invoke-injectable": true
    }
}

Actual behavior
src/app/story/titles-and-settings/titles-and-settings.component.html[12, 22]: The method "story" that you're trying to access does not exist in the class declaration.

Expected behavior
Linter knows about the inherited property "story" from the parent class.

You're in the wrong repository.
The issue you're searching for is over there: https://github.com/mgechev/codelyzer/issues/191

@ajafff Thank you sir, sorry for putting this in the wrong place :(
I'm closing this one.

authors: Shahor ajafff

repo: palantir/tslint


text:
tslint:disable-next-line disables two subsequent lines

Bug Report

TSLint version:  5.7.0
TypeScript version: 2.4.2
Running TSLint via: (pick one) CLI

TypeScript code being linted
/* tslint:disable-next-line:max-line-length */
const a = '11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111';
const b = '11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111';
const c = '11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111';
const d = '11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111';
const e = '11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111';
const f = '11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111';

with tslint.json configuration:
{
  "rules": {
    "max-line-length": [true, 50]
  }
}

Actual behavior
ERROR: foo.ts[4, 1]: Exceeds maximum line length of 50
ERROR: foo.ts[5, 1]: Exceeds maximum line length of 50
ERROR: foo.ts[6, 1]: Exceeds maximum line length of 50
ERROR: foo.ts[7, 1]: Exceeds maximum line length of 50

Expected behavior
ERROR: foo.ts[3, 1]: Exceeds maximum line length of 50
ERROR: foo.ts[4, 1]: Exceeds maximum line length of 50
ERROR: foo.ts[5, 1]: Exceeds maximum line length of 50
ERROR: foo.ts[6, 1]: Exceeds maximum line length of 50
ERROR: foo.ts[7, 1]: Exceeds maximum line length of 50

No matter where I place the disable-next-line rule in the file, it always seems to affect the two subsequent lines, not just the line immediately afterwards. I don't see this behavior in the docs or referenced in any other issues — sorry if I missed something!

I can confirm that this is a bug.
What's happening here: the disabled range goes up to the start of the next line. If the failure begins at the first character in that line, the error is erroneously disabled.

@ajafff Thanks for the quick fix! 🎉

Please help dears. When launching the ng new my-project , i got this. What could be the issue and how to solve that? I'm learning angular

I've tried to install some other asked dependencies, with no effects..

@paulTchaa8 you'll want to file an issue on Angular on GitHub. That doesn't look like a TSLint issue.

authors: JoshuaKGoldberg ajafff dylanpyle paulTchaa8


text:
Redis add() without timeout expires immediately

I fixed this in flask-caching some time ago, but it looks like it's broken here as well (and with flask-caching now relying on this, it's broken there again too): https://github.com/pallets-eco/flask-caching/pull/218

Thanks for letting me know, will write a fix this weekend :bowtie:

authors: ThiefMaster northernSage

repo: pallets-eco/cachelib


text:
option with bool type

@click.command()
@click.option('--shout/--no-shout', default=False)
def info(shout):
    pass

info()

is ok, but
@click.command()
@click.option('--shout/--no-shout', default=False, type=bool)
def info(shout):
    pass

info()

will raise a TypeError: Got secondary option for non boolean flag.

you need to use click.BOOL instead of bool, as per the docs:
https://click.palletsprojects.com/en/7.x/parameters/#parameter-types

Oops, that's not right, sorry, deleting and will hopefully post a sensible response momentarily.

I've tracked this down to
https://github.com/pallets/click/blob/c6042bf2607c5be22b1efef2e42a94ffd281434c/click/core.py#L1573
in this case type is not None, it's bool, so the condition is failing and self.is_bool_flag incorrectly gets set to False.
I can't immediately see why this is there (it just looks wrong at first glance). But blame says that line of code is 5 years old, which suggests there's more to it...

I am working on a click helper library (https://github.com/Cologler/click-anno-python), so I was did a lot of tests for click.

I think this is there because the --no- option makes this a special type of boolean flag automatically, it wouldn't make sense to assign a type to it. I guess we could check if type is none or bool.

Huh, I’d have thought it made sense if using the /--no- spelling implied type=bool, so you didn’t have to add that explicitly, but if you did, it would mean the same thing.

Taking a look at this

Checked the Discord, it looks like KP has got it

Same here. type=click.BOOL repros this bug, too. Temporarily remove the type and resolved.

The type argument only supports bool and not click.BOOL, should this be changed to support both?
https://github.com/kporangehat/click/blob/c7bd8d47b44816c2999a12a0b4e52162e5c6994a/click/core.py#L1609

authors: Cologler Ketzalkotal Xevion davidism jab xingheng

repo: pallets/click


text:
WIP: Set permissions for atomic open_file()

Previously, when open_file() was called with atomic=True, the target
file's permissions were always set to 0600, i.e. readable and writable
by the current user. These permissions come from the temporary file
created by tempfile.mkstemp().
This commit changes an atomic open_file() call to set the permissions
of the target file. If the target file already exists, then its current
permissions are retained. Otherwise, the permissions respect the current
umask.
Fixes #1376

I really appreciate the work you're putting into this, but this is way more complexity than I'm willing to add and support. Vendoring two copies of Python's tempfile module is not worth it. Does python-atomicwrites suggested in #320 have this issue? cc @untitaker

@davidism Thanks for the review. I agree that vendoring the modules is heavy-handed and not a great way forward. I'll close this pull request for now.
Note that python-atomicwrites also changes the permissions: https://github.com/untitaker/python-atomicwrites/issues/42

Atomicwrites does NOT intentionally change permissions. Different permissions come from a result of how the file write is done.

I took a more minimalist stab at this myself in #1400. @msmolens I copied your tests from here; hope that’s fine.
@untitaker You can certainly argue that it “does not change permissions” because it internally works by creating a new file with different permissions and renaming it over the old file. But that argument is of little interest to a developer who wanted the permissions to stay the same.

I believe #1400 is a correct fix for this, and I am surprised that one exists. I would be happy to have this in atomicwrites. After all its stated motto is to solve this rabbit hole once and for all.
We could keep the impl in click simple and have atomicwrites as optional dep for "better" behavior.

authors: andersk davidism msmolens untitaker


text:
Mixed-up names in docs explaining relationships

I believe that section detailing relationships has a naming mix-up in the model definitions.
At first there is:
class Person(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(50), nullable=False)
addresses = db.relationship('Address', backref='person', lazy=True)

But further down it changes to this, where backrefs are explained in more detail:
class User(db.Model): # this should read: Person(db.Model)...
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(50), nullable=False)
addresses = db.relationship('Address', lazy='select',
backref=db.backref('person', lazy='joined'))

I think this is quite misleading and it's easy to think that this is a third table, which somehow connects to the two others defined earlier. It certainly had me confused for a while.

@pfabri thank you for the report.  We will get this fix in the 2.4 release, which should be coming soon.

closed in #718

authors: davidism pfabri rsyring

repo: pallets/flask-sqlalchemy


text:
teardown_request can't remove session's attribute

I use before_request to set session's attribute,and use teardown_request to remove it.But only first request don't have session's attribute in before_request,other requests all decide request have session's attribute in before_request.Why?
Sample code:
from flask import Flask,session app = Flask(__name__) app.secret_key='sdf' @app.route('/') def index():     return """sessoin: {}""".format(session['hello']) @app.before_request def before():     if not session.get('hello'):         session['hello'] = 'Hello!'         print('before: add hello')     else:         print('beforeL: have',session['hello']) @app.teardown_request def teardown(exception):     if session.get('hello'):         session.pop('hello')         print('teardown: delete hello')         try:             print(session['hello'])         except:             print('teardown: no have')
Output:
`* Serving Flask app "app"

Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
before: add hello
teardown: delete hello
teardown: no have
127.0.0.1 - - [27/Mar/2018 18:17:35] "GET / HTTP/1.1" 200 -
beforeL: have Hello!
teardown: delete hello
teardown: no have
127.0.0.1 - - [27/Mar/2018 18:17:35] "GET /favicon.ico HTTP/1.1" 404 -
beforeL: have Hello!
teardown: delete hello
teardown: no have
127.0.0.1 - - [27/Mar/2018 18:17:35] "GET /favicon.ico HTTP/1.1" 404 -
beforeL: have Hello!
teardown: delete hello
teardown: no have
127.0.0.1 - - [27/Mar/2018 18:17:43] "GET / HTTP/1.1" 200 -
beforeL: have Hello!
teardown: delete hello
teardown: no have
127.0.0.1 - - [27/Mar/2018 18:17:46] "GET / HTTP/1.1" 200 -
beforeL: have Hello!
teardown: delete hello
teardown: no have
127.0.0.1 - - [27/Mar/2018 18:17:47] "GET / HTTP/1.1" 200 -
beforeL: have Hello!
teardown: delete hello
teardown: no have
127.0.0.1 - - [27/Mar/2018 18:17:50] "GET / HTTP/1.1" 200 -`

Python version: 3.6.3

Flask version: 0.12.2

Werkzeug version: 0.12.2

The response can't be modified in teardown. Use after_request instead. Use g to store data during a request, not session.

authors: MrLiupython davidism

repo: pallets/flask


text:
Fixed typo in docs

Changed "when" to "how" as the subsequent text talks about "how to store data on the g object".

Thanks, but I'm completely rewriting the tutorial so this won't be relevant.

BTW, the PR itself was fine, thanks for making it. If you run into any other documentation fixes, please submit them! 👍

Sure :+1:

authors: davidism faheel


text:
Raise an error if rule starts or ends with a space

This PR solves https://github.com/pallets/flask/issues/3780. After this PR is merged creating routes like this will throw an error:
@bp.route("/bar ")
@bp.route(" /bar")

See #3780 for close reason.

authors: davidism lalnuo


text:
支持编辑html 也就是源码编辑功能嘛

如题，我发现好多这种编辑器都不支持 html编辑

不支持。

@pandao 呵呵，那挺遗憾的

@9073194 呵呵，术业有专攻。