Rayon feature

A preliminary implementation of the rayon feature to speed up the
building of the IndexedCrate struct.
 So some thoughts in case someone wants to pick it up from here:

Most of the gains come from parallelizing the import_index
Parallelizing the impl_index properly is hard
Some things benefit from being stored in a BTreeMap instead of a HashMap (or maybe pulling in a faster Hash impl)
.entry(key).or_default().push(value) does not optimize as well as matching on the entry and inserting a vec![value] if vacant
The MapList struct I introduced seems to hinder optimizations, so remove it where possible.
Try to share more code between rayon and the default impl
Switch the recursive functions for iterative ones as it shows up in the flamegraph

Good stuff so far! Excited to see where you take this next 🚀
All perf gains you make here get doubled in cargo-semver-checks, since it loads two crate versions' data per run. So you've already cut over a second from the cargo-semver-checks of that crate!
When you're happy with the perf gains and are getting ready to merge this, it would be good to move the conditionally-compiled bits into separate functions that we can conditionally include and call. I think this might make the code a bit easier to maintain in the long run.

I tidied up the code and made sure it builds without rayon, I also profiled and most of the remaining time is spent on VisibilityTracker::from_crate(crate_) (roughly 60%-70% of the function time).
I'll refactor the VisibilityTracker::from_crate(crate_) function on Friday and see what perf gains I can achieve.
In the mean time could you check if the rayon stuff is easier to maintain now? The rayon and normal code is mixed together so that turning off the rayon feature affects the least amount of code.

Oh I almost forgot: we really want a CI step in the "run tests" job that ensures all tests pass both with and without the rayon feature.

Oh I almost forgot: we really want a CI step in the "run tests" job that ensures all tests pass both with and without the rayon feature.

Will do!
I wanted to get a Proof of Concept out ASAP so that I could ensure the things I'm doing align with your expectations/needs (and also to have something people could pick up and work with if I have to leave stuff halfway done).
I should have more time over the weekend to polish it up and get everything ready to merge c:

Sounds great, and thank you for being super thoughtful about everything! The PR is definitely aligned with what I was hoping for, and I'm thrilled that you are approaching it with all that in mind! 🚀

I optimized the VisibilityTracker::from_crate. This shaves ~200ms off the numbers (no rayon 1.6s -> 1.4s) and with rayon (1s -> 0.8s).
There are probably some opportunities to parallelize it, but I'll work on that once I've had some sleep.

Nice find! 200ms before rayon is great! Thank you for all your hard work 🚀
Since the changes to VisibilityTracker::from_crate aren't related to rayon, I'd find them a lot easier to review if you made them in a separate PR. Right now, they are quite difficult to analyze in a PR that does everything all at once.
That PR would also benefit from having a robust benchmark that's part of the repo already.
In an ideal world, we'd have separate PRs like this:

benchmark we use to analyze performance
serial improvements to VisibilityTracker::from_crate
rayon improvements to VisibilityTracker::from_crate
rayon improvements to IndexedCrate

The fewer lines and less complexity there is in each PR, the easier the code will be to understand and make maintainable. In turn, that means we'll probably be able to find even more performance wins in the future!

Since the changes to VisibilityTracker::from_crate aren't related to rayon, I'd find them a lot easier to review if you made them in a separate PR. Right now, they are quite difficult to analyze in a PR that does everything all at once.

I don't know if you have seen this, but you can review commits individually: on the top left (right above the file tree in the review UI) you can change from Changes from all commits to changes from a specific commit. This adds a button to go to previous/next commit.
I can also split it up into multiple PRs, but because they all soft depend on each other I think this would be slightly easier to work on.
In preparation for either approach I split it up into multiple commits c:

The profiler indicates that about ~80% of the time is now spent on VisibilityTracker::from_crate, and most of that time is spent on HashMap operations. Switching from std::collections::HashMap to hashbrown::HashMap or rustc-hash::FxHashMap might further improve performance.
An initial investigation on the improvements from switching to rustc-hash::FxHashMap/Set shows:
$ cargo criterion --bench indexed_crate
IndexedCrate/new(aws-sdk-ec2)
                        time:   [1.3016 s 1.3060 s 1.3106 s]

$ cargo criterion --bench indexed_crate --features rustc-hash
IndexedCrate/new(aws-sdk-ec2)
                        time:   [1.1319 s 1.1352 s 1.1384 s]
                        change: [-13.469% -13.075% -12.695%] (p = 0.00 < 0.05)
                        Performance has improved.

$ cargo criterion --bench indexed_crate --features rayon
IndexedCrate/new(aws-sdk-ec2)
                        time:   [542.39 ms 543.88 ms 545.39 ms]
                        change: [-52.276% -52.090% -51.895%] (p = 0.00 < 0.05)
                        Performance has improved.

$ cargo criterion --bench indexed_crate --features rayon,rustc-hash
IndexedCrate/new(aws-sdk-ec2)
                        time:   [414.43 ms 415.55 ms 416.69 ms]
                        change: [-23.884% -23.596% -23.292%] (p = 0.00 < 0.05)
                        Performance has improved.

I don't know if you have seen this, but you can review commits individually: on the top left (right above the file tree in the review UI) you can change from Changes from all commits to changes from a specific commit. This adds a button to go to previous/next commit.
I can also split it up into multiple PRs, but because they all soft depend on each other I think this would be slightly easier to work on.

I have seen it, yes. Unfortunately, individual commits have other downsides relative to separate PRs.
The core issue is that I maintain (currently) 5 different branches of this project at the same time. To make that feasible and not a nightmare, I have a workflow tuned around squash-merging PRs and cherry-picking the resulting PR commit onto all the different branches.
We have to keep the different commits here separate, in case in the future we find one of them has an issue that requires it to be reverted. That means I can't squash-merge, which means I can't use my usual automation for maintaining this repo.
Sorry! I hope you understand now why I have to insist on separate PRs.

Sorry! I hope you understand now why I have to insist on separate PRs.

I understand, I assumed something like that would be the case, but I hoped it wouldn't be. Then I'll make PRs for each commit? Or should I group some of them together?

PRs for each commit would be great! Feel free to open the independent ones concurrently — or all of them concurrently, if you don't mind some more rebasing as we merge them.
Thanks for bearing with me here, I know this is an inconvenience and appreciate you being open to helping make my workflow easier!

I split off the first three commits as they can be merged in parallel, the rest should cause merge conflicts so I'll create the PRs once they are merged.
My system seems to be noisy for perf measurements so expect results to be off by +/-2% (even when criterion says something is 2% faster, it's most likely noise).

Marked as draft to prevent accidental merges c:

All parts of this merge request have been  included!


Proposal: [Follow-up on Submitted Bounty for Kaia P2P Escrow Platform]

Description

[Hey there victor,
I claimed the bounty on 28th Oct https://github.com/kaiachain/kaia-dapp-mono/issues/146 but haven’t received any feedback yet. I wanted to confirm if there’s anything else needed to move this forward. I’m looking forward to any updates and am happy to adjust the work if necessary.
Let me know
-Emmanuel
]

Bounty track

[Issue]

@zxstim it's the an escrow system for trading Kaia, securely holding assets until both buyer and seller fulfill their obligations, while also serving as an onramp and offramp for Kaia by allowing users to convert fiat currency to Kaia and vice versa (providing an easy way to acquire Kaia from other users

@zxstim I pinged you more than once, I had to reply to this after I got no reply.


Identity comparison of boxed values

Previously, the identity comparison for boxed values worked by comparing the addresses of the boxes regardless of their contents. This was leading to confusing behaviour, for example
  let a: U32 = 0
  let b: U32 = 0
  let boxa: Any = a
  let boxb: Any = b
  a is b // True.
  boxa is boxb // False.

Now, the identity of a boxed value (either a numeric primitive or a tuple) depends on its content rather than its address. This affects the is, isnt and digestof operators. Several general changes were made to the code generator in order to make the identity comparison of a boxed value as efficient as possible.
When comparing a possibly boxed value to an unboxed value, the type of the box is checked first by looking at its type descriptor. If the types of the values are the same, the boxed value is unboxed and the comparison is done on the raw objects.
When comparing two possibly boxed values, the check depends on the underlying types.

First, the addresses are compared. If they are the same, the objects have the same identity regardless of whether they are boxed values or not
If the addresses are different, we check whether the objects are two boxed values of the same type. This is done by checking the type IDs with a method described afterwards

If the values are two boxed numbers, the identity check is done with memcmp without unboxing
If the values are two boxed tuples, the identity check is done by calling a type-specific __is function through the vtable. This function unboxes the tuples and does the identity check
If the values aren't boxed or if they don't have the same type, they don't have the same identity.

When computing the digest of a possibly boxed value, we first check whether the value is boxed by checking the type ID with the same method as for the identity comparison. If the value is boxed, a type-specific __digestof function is called through the vtable. This function unboxes the value and computes the digest.
For both identity comparison and digest computing, the compiler generates the checks depending on the possible subtypes of the base types that it is looking at. This means that checking for the identity of an object that cannot be boxed (because the interface type has no numeric primitive/tuple as subtypes) doesn't involve checking whether it is boxed.
This commit changes how type IDs are assigned. Previously, they were assigned incrementally as types were reached without considering boxed types. Now, type IDs are assigned as

Object type IDs:  1, 3, 5, 7, 9, ...
Numeric type IDs: 0, 4, 8, 12, 16, ...
Tuple type IDs:   2, 6, 10, 14, 18, ...

There are two reasons for this

Speed. Checking whether a value is boxed or not consists in checking if its type ID is a multiple of 2, and further discriminating between a boxed number and a boxed tuple consists in checking if it is a multiple of 4. In machine code, this boils down to checking whether the first or second bit of the type ID are set, respectively
Forward compatibility. We won't have to change this method when dynamic code loading is added to Pony

The __is and __digestof functions introduce a change to the reachability algorithm. These functions are automatically added to numeric primitives and tuples, are generated by the compiler and are marked as "internal". An internal method isn't added to subtypes and since it doesn't exist before reachability analysis, it is added to supertypes in order to be visible when generating identity checks.
Closes #1567.

The Windows tests are crashing in CodegenTraceTest.TraceTupleDynamic. Would anyone with a Windows machine be able to run the test locally and post a the error location and a backtrace here?

Strange; when I build your branch on my windows 10 machine with VS2015 all tests pass for both release and debug.

This is very strange indeed... Do you know if it would be possible to print the segfault reason on AppVeyor? There is catchsegv on *nix but I'm not aware of any equivalent on Windows.

I'm not aware of any, and a quick google doesn't turn anything up.

I've been able to trace the source of the segfault with the remote desktop supplied by AppVeyor. It turns out it is an out of memory error. My patch on recycling memory through multiple runs of the runtime looks like it wasn't sufficient. I have a few ideas to fix it, I'll detail on the upcoming PR.

The tests should hopefully pass with the changes to the pool allocator in.

Well, not if I don't rebase...


Keyboard uses incorrect keymap in russian layout

My setup: I try to connect to my working machine with Ubuntu 18.04 from my laptop on Windows 10 with default windows RDP client mstsc.exe.
xrdp from Ubuntu repositories: version 0.9.5:
$ xrdp --version

xrdp: A Remote Desktop Protocol server.
Copyright (C) Jay Sorg 2004-2014
See http://www.xrdp.org for more information.
Version 0.9.5

I connect via vnc-any, which only one allows me to connect to my existing local session
My Ubuntu machine have 2 keyboard layouts: us and ru.
Laptop keyboard layout:

When I connect via RDP, on russian layout I can't enter some symbols, instead corresponding symbol from US layout is printed. I have no such problem, when I use keyboard, directly connected to my Ubuntu machine. These symbols are:

I try to type
I get

ж
;

б
,

ю
.

.
/

Ж
:

Э
"

Б
/

,
?

I googled the problem, almost everywhere recommend run xrdp-genkeymap /etc/xrdp/km-00000419.ini. I tried this, but without a visible effect, although the file generated by the utility is different from the one delivered with the xrdp package (file extension renamed to .txt, because GitHub do not support files with .ini extension):

file from package: km-00000419.ini.txt
generated by xrdp-genkeymap /etc/xrdp/km-00000419.ini (current layout do not matter):
xrdp-genkeymap.ini.txt
generated by xrdp-genkeymap, but after setxkbmap -layout 'ru,us' (current layout do not matter): xrdp-genkeymap-setxkbmap.ini.txt

On another site, someone advised me to run xrdp-genkeymap after running the setxkbmap command, so I run
setxkbmap -layout 'ru,us'

Using file after that also has no effect.
For reference, I grabed all symbols, that produced by keyboard and summarize below (note, that physical layout of laptop keyboard and external keyboard slightly differs: key \| on external keyboard in the numbers row, before backspace, and on laptop in the qwerty row, last key in that row, see image above. That difference is reflected in the Native and RDP sections below):

Native

US             Default               ||      setxkbmap -layout 'ru,us'
----------------+------------------||------------------+------------------
    No-shift    |       Shift      ||      No-shift    |       Shift
----------------|------------------||------------------|------------------
`1234567890-=\  |  ~!@#$%^&*()_+|  ||  `1234567890-=\  |  ~!@#$%^&*()_+|
qwertyuiop[]    |  QWERTYUIOP{}    ||  qwertyuiop[]    |  QWERTYUIOP{}
asdfghjkl;'     |  ASDFGHJKL:"     ||  asdfghjkl;'     |  ASDFGHJKL:"
zxcvbnm,./      |  ZXCVBNM<>?      ||  zxcvbnm,./      |  ZXCVBNM<>?
----------------|------------------||------------------|------------------

RU             Default               ||      setxkbmap -layout 'ru,us'
----------------+------------------||------------------+------------------
    No-shift    |       Shift      ||      No-shift    |       Shift
----------------|------------------||------------------|------------------
ё1234567890-=\  |  Ё!"№;%:?*()_+/  ||  ё1234567890-=\  |  Ё!"№;%:?*()_+/
йцукенгшщзхъ    |  ЙЦУКЕНГШЩЗХЪ    ||  йцукенгшщзхъ    |  ЙЦУКЕНГШЩЗХЪ
фывапролджэ     |  ФЫВАПРОЛДЖЭ     ||  фывапролджэ     |  ФЫВАПРОЛДЖЭ
ячсмитьбю.      |  ЯЧСМИТЬБЮ,      ||  ячсмитьбю.      |  ЯЧСМИТЬБЮ,
----------------|------------------||------------------|------------------

RDP

US             Default               ||      setxkbmap -layout 'ru,us'
----------------+------------------||------------------+------------------
    No-shift    |       Shift      ||      No-shift    |       Shift
----------------|------------------||------------------|------------------
`1234567890-=   |  ~!@#$%^&*()_+   ||  ё1234567890-=   |  Ё!"№;%:?*()_+
qwertyuiop[]\   |  QWERTYUIOP{}|   ||  йцукенгшщзхъ\   |  ЙЦУКЕНГШЩЗХЪ|
asdfghjkl;'     |  ASDFGHJKL:"     ||  фывапролд$э     |  ФЫВАПРОЛД^@
zxcvbnm,./      |  ZXCVBNM<>?      ||  ячсмить?//      |  ЯЧСМИТЬ/Ю&
----------------|------------------||------------------|------------------

RU             Default               ||      setxkbmap -layout 'ru,us'
----------------+------------------||------------------+------------------
    No-shift    |       Shift      ||      No-shift    |       Shift
----------------|------------------||------------------|------------------
ё1234567890-=   |  Ё!"№;%:?*()_+   ||  ё1234567890-=   |  Ё!"№;%:?*()_+
йцукенгшщзхъ\   |  ЙЦУКЕНГШЩЗХЪ|   ||  йцукенгшщзхъ\   |  ЙЦУКЕНГШЩЗХЪ/
фывапролд;э     |  ФЫВАПРОЛД:"     ||  фывапролджэ     |  ФЫВАПРОЛДЖЭ
ячсмить,./      |  ЯЧСМИТЬ/Ю?      ||  ячсмитьбю.      |  ЯЧСМИТЬ/Ю,
----------------|------------------||------------------|------------------

Notice, that after setxkbmap -layout 'ru,us' russian layout without Shift works as expected, but with Shift instead of letter Б symbol / is entered.
Information about layouts (before setxkbmap):
$ setxkbmap -query -v 10
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     us,ru,us
variant:    ,,
options:    grp:alt_shift_toggle,grp_led:scroll
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete+ledscroll(group_lock)
symbols:    pc+us+ru:2+us:3+inet(evdev)+group(alt_shift_toggle)
geometry:   pc(pc105)
rules:      evdev
model:      pc105
layout:     us,ru,us
variant:    ,,
options:    grp:alt_shift_toggle,grp_led:scroll
$ setxkbmap -print -v 10
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     us,ru,us
variant:    ,,
options:    grp:alt_shift_toggle,grp_led:scroll
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete+ledscroll(group_lock)
symbols:    pc+us+ru:2+us:3+inet(evdev)+group(alt_shift_toggle)
geometry:   pc(pc105)
xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete+ledscroll(group_lock)"	};
	xkb_symbols   { include "pc+us+ru:2+us:3+inet(evdev)+group(alt_shift_toggle)"	};
	xkb_geometry  { include "pc(pc105)"	};
};
$

Please help fix this issue. If you need some additional info, maybe network capture, let me known, how to do that.

Just noticed, that if you run xev and try to press some keys with letters, than in us layout you see, that key press and key release events assumes different layouts: KeyPress event see wrong layout, but KeyRelease -- correct:
different-layouts-in-events.txt
In that file I

run xev
press the f key in us layout
close xev window

You also can see fake Num Lock press/release events, which is another bug #1578.

I'm closing this as we've just merged #3138 which should fix a lot of this stuff, or at least make it easier to find problems.


rfc3339 date limit for time bound queries

Summary: Time bound queries with rfc3339 are limited to 2050-01-01T00:00:01Z
Tested with both 0.13 and 0.14.0 head 1d467ab2e3c540c7749a352244cbc752dca1701f
> create database test
> use test
Using database test
> insert ametric,region=1 year=2049<PHONE_NUMBER>000000000
> precision rfc3339
> select * from ametric where time <= '2050-01-01T00:00:00Z'
name: ametric
-------------
time			region	year
2049-12-31T23:59:59Z	1	2049

> select * from ametric where time <= '2050-01-01T00:00:01Z'
ERR: time 2050-01-01T00:00:01Z overflows time literal

> precision ns
> select * from ametric where time <=<PHONE_NUMBER>000000001
name: ametric
-------------
time			region	year
2524607999000000000	1	2049

The limit seems to be hardcoded int64(2524608000000000000)
https://github.com/influxdata/influxdb/blob/master/influxql/iterator.go
Querying with RFC3339 should support the same time range boundaries as ns precision.

The current maximum timestamp was changed to 2262-04-11 23:47:16.854775806 +0000 UTC at some point so I'm going to close this.


FEAT support future aider flags

Since Aider is constantly evolving and adding more flags, here is a proposal to allow the user to add desired flags without this code having to evolve lock step with Aider.
Here is an example of some recent args added to aider that are currently halting Ra.Aid because they are prompting for user input:

--no-show-release-notes
--no-detect-urls

I would have written a unit test for this, but where this function is being invoked is unclear. I suspect it's internal to Langgraph. Even if this merge request isn't merged, the intent is clear, allowing this project to avoid maintaining the aider arguments.

Figured it out. As requested, the tool is now fetching the values from the env var and parsing them. The change includes multiple scenarios, and the implementation is wrapped in a try-catch as a precaution.

Looks good to me 👍
I can merge it assuming you're done making any edits, lmk.

I'm done now.
Updated the README for completeness.
Thanks for this tool!
I'm looking forward to showing it off.
The next PR will be about adding up all the tokens and cost usage (since I was surprised by the bill :) ).

Thanks for the PR!
And yeah token profiling/cost tracking would be nice.
It's sort of in the "make it work" phase. There's definitely opportunities to optimize token usage.


Update required Go version in README

Closes: #668
Signed-off-by: Jonathan Yu<EMAIL_ADDRESS>

I believe we should be requiring golang 1.7.1 minimum.

@jim-minter based on your findings re: macos, i agree. @jawnsy let's make this 1.7.

@jim-minter @bparees Updated, PTAL

[merge]


Clarification on when the IP is evaluated

It appears that the IP is only evaluated at the time you hit login.microsoftonline.com.  If you split tunnel traffic so, for example, traffic to login.microsoftonline.com goes via your VPN and therefore a trusted location you will still be trusted when accessing resources directly (not via VPN).  It would be useful to know which endpoints (perhaps only login.microsoftonline.com) are involved in CA decisions in order to create the best possible split tunnel VPN config forcing all traffic directly over the internet with the exception of authentication in an environment where you want to restrict access to devices connected to trusted network only.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 74b164a7-31c5-7cb3-c8e2-7533d375bd43
Version Independent ID: 11399252-d935-2cba-a414-a44e51e67007
Content: Location condition in Azure Active Directory Conditional Access
Content Source: articles/active-directory/conditional-access/location-condition.md
Service: active-directory
Sub-service: conditional-access
GitHub Login: @MicrosoftGuyJFlo
Microsoft Alias: joflore

This is similar to https://github.com/MicrosoftDocs/azure-docs/issues/7059.  The point is that a split tunneled VPN client will effectively have two public IPs, so the key here is knowing which endpoints need to be hit by the trusted IP (VPN traffic) in order to pass CA.  Example - if you authenticate with your trusted IP then access apps, such as teams, with your untrusted public IP you will still connect as you have a valid token gained from your trusted IP.

Hi @dooleydo Thanks for reaching out. We will review and update as appropriate.


Searching for beers in the search box doesn't seem to work.

The follow produces no results:
examples:
http://ontappapp.com/#!/search/1/sapporo/
http://ontappapp.com/#!/search/1/coors/
http://ontappapp.com/#!/search/1/blue moon/

Thanks Patrick! It's now fixed:)


How to set custom color map for image layer?

@sofroniewn: I am using the image layer to display the segmentation edges showing the semantic classification labels after seeing this post.
This makes more sense, because I actually don't need any of the labels layer functionality instead of having a transparent background label.
However, I am not quite sure how to create the colormap I need with vispy.Colormap.
I need the following color map {1: red, 2: cyan, 3: yellow} (and {0: transparent}, but that works already). See https://github.com/hci-unihd/covid-if-annotations/blob/master/napari_covid_if_annotations/layers.py#L87-L98 for details.
(I could also dig into the vispy documentation more to figure this out, but I hope you know the answer immediately ;)).

Colormap in your example looks great, you just need to set edge_contrast_limits = [0, 3] and then it should work fine if it doesn't already. For example this toy demo works for the image layer
import numpy as np
from vispy.color import Colormap
import napari

data = np.random.randint(4, size=(10, 10))
custom = Colormap([
        [0., 0., 0., 0.],  # label 0 is fully transparent
        [1., 0., 0., 1.],  # label 1 is red
        [0., 1., 1., 1.],  # label 2 is cyan
        [1., 1., 0., 1.],  # label 3 is yellow
    ]
)

with napari.gui_qt():
    viewer = napari.view_image(data, colormap=custom, contrast_limits=[0, 3])

Let me know if you need any more guidance here/ if that wasn't what you wanted

edge_contrast_limits = [0, 3] and then it should work fine if it doesn't already

Yes, that fixed it.
Thanks!


feat: add some bulk ingress testing

What this PR does / why we need it:
This adds some tests to protect us against performance
regressions when deploying large numbers of ingress
resources all within a single second or two.

Decisions made:

we do want these tests
we move the tests under the performance tests directory BUT ensure that these tests from this PR get executed on CI push


[Compiler API] Detecting "emittable" nodes/symbols

Search Terms:
symbol ast compiler api emit node
Question
As per guidance, compiler API usage is the one exception to asking questions in the issue tracker.  Because of that, I've got a question.
I've got a use case where I am trying to detect if an export of a source file represent a runtime emit, or something that would be erased on emit.  I can't seem to find a clean way to do this.  Currently I am doing something like this:
declare const sourceFile: ts.SourceFile;
declare const program: ts.Program;

const checker = program.getTypeChecker();

const sourceSymbol = checker.getSymbolAtLocation(sourceFile);
assert(sourceSymbol);
const sourceExports = checker
  .getExportsOfModule(sourceSymbol)
  .filter(
    sym =>
      !(
        sym.flags & ts.SymbolFlags.Interface ||
        sym.flags & ts.SymbolFlags.TypeLiteral ||
        sym.flags & ts.SymbolFlags.Signature ||
        sym.flags & ts.SymbolFlags.TypeParameter ||
        sym.flags & ts.SymbolFlags.TypeAlias ||
        sym.flags & ts.SymbolFlags.Type ||
        sym.flags & ts.SymbolFlags.Namespace ||
        sym.flags & ts.SymbolFlags.InterfaceExcludes ||
        sym.flags & ts.SymbolFlags.TypeParameterExcludes ||
        sym.flags & ts.SymbolFlags.TypeAliasExcludes
      )
  )
  .map(sym => sym.getName());

I just don't know if there is a cleaner way to determine if a symbol will result in non-erased emit.

You probably also need to consider value symbols that are only used in type position (unless used in a decorated class with --emitDecoratorMetadata).
Always excluding namespaces seems wrong to me as they can also be used as value.

I think what you have there is the correct approach, though there is probably a simplification of that bitwise/boolean logic to be had. Testing for SymbolFlags.Value alone may be sufficient, but I'd have to try to check.
@rbuckton what's the exact check we use in the emitter?


Ignore all files in a folder that is not a module

Some times is necessary to ignore the whole content in folders like .github, .serverless, node_modules ... Today the .monolintignore only ignores modules, the ideal would be to ignore folders that are not modules too.

That's a good one! So instead of using the monolintignore only during the modules discovery you mean to use it for all files, even if outside modules.
This can be tricky because the rules could look for folders at will (outside modules) and the core plugin wouldn't have control over this.
Maybe we could filter out the results whose "resource" attribute matches the "monolintignore" instructions?


Ensure offset monitor install directory is owned by offset monitor us…

…er/group

+1

+1 but test failing tests for some reason.

Fixed tests after rebasing. Got enough +1s, merging


Implement the multiply() function

Please describe the feature you want this project to offer
Complete the multiply() function in app.py
Describe the solution you'd like
Take number of values the user wants to enter. Now take these values from the user and return the product of all these values.
Describe alternatives you've considered (Optional)
A clear and concise description of any alternative solutions or features you've considered.
Additional context (Optional)
Add any other context or screenshots about the feature request here.

Done by @DarthBenro008


FeatureMap attribute should be present on all clusters

Problem
Spec changed in https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/5000 to require feature map on all clusters, with the value set to 0 if the cluster has no optional features.
Proposed Solution
We have two options.
Option one is to do nothing in the SDK, update the XML to mark FeatureMap as a required global attribute, update all the ZAP configs to enable feature map on all clusters, and call it a day for 1.0.
Option two is to do something in the attribute read and wildcard expansion codepaths where we always add in the FeatureMap attribute if it's not already present (similar to what we do for the command list and attribute list, attributes, but a bit more complicated because those are never present in the actual endpoint config, whereas feature map sometimes would be).

I will have a PR coming soon that does option 1

Presumably a minimal version of this will be solved by #18213?

Cert Blocker Review: @tehampson once complete, can you please file a followup issue to ensure the XML is spec conformant and valid.

Cert Blocker Review: @tehampson once complete, can you please file a followup issue to ensure the XML is spec conformant and valid.

If my understanding is correct, the only change to make XML spec conformant for this is already in the PR:
https://github.com/project-chip/connectedhomeip/pull/18213/files#diff-0c8fe8ba57ad140fcc2d890c91031601ea3912191591d86fda602c03b8bc46f7

I believe this is just surfacing a general issue of "we need xml to match spec". It showed up during reviewing feature maps, with the question of "how do we make sure xml lists all possible features", however the generic followup should be "ensure XML matches spec".
We may also want to split the followup somehow, since each cluster could be checked individually.

Presumably a minimal version of this will be solved by https://github.com/project-chip/connectedhomeip/pull/18213?

Yes, that's implementing "option one".


Observable tests fail after adding subscribeOn EDT call to EventSources

I ran into an issue when trying to implement the EventSource changes agreed upon for issue #3.
We agreed to make all EventSources implicitly subscribe on the Swing thread. This was to be accomplished by adding a subscribeOn(SwingScheduler.getInstance()) call to each source, as shown in @mikebaum's example below:
public static Observable<ItemEvent> fromItemEventsOf(final ItemSelectable itemSelectable) {
        return Observable.create(new OnSubscribe<ItemEvent>() {
            @Override
            public void call(final Subscriber<? super ItemEvent> subscriber) {
                final ItemListener listener = new ItemListener() {
                    @Override
                    public void itemStateChanged(ItemEvent event) {
                        subscriber.onNext(event);
                    }
                };
                itemSelectable.addItemListener(listener);
                subscriber.add(Subscriptions.create( new Action0() {
                    @Override
                    public void call() {
                        itemSelectable.removeItemListener(listener);
                    }
                }));
            }
        }).subscribeOn( SwingScheduler.getInstance() );
    }

Unfortunately, this subscribeOn call causes our tests to fail. In the code above, the OnSubscribe's call method gets executed after ItemEvents are fired in the unit test.
Since the test already executes on the EDT, subscribeOn( SwingScheduler.getInstance()) causes the SwingScheduler to put the subscription call to the end of the EDT's queue. Therefore events fire before the subscription is properly initialized.
I propose that we modify SwingScheduler's behavior when the calling thread is the EDT. I think we should not put the subscription in an invokeLater if the caller is already on the Swing thread. We should just run it immediately.
Any thoughts? This would change the behavior of nested actions in SwingScheduler, of which SwingSchedulerTest is very specific about.
Let me know if I'm ignoring anything.

@eddieburns55 , sorry for disappearing been super busy these last few weeks. Thanks for taking on the task to update the EventSources. I had started to make the changes myself and ran into exactly the same problem.
The approach I started to take was rather to split up the tests by adding a setup and tear down. I also added a helper method to SwingTestHelper called waitForEdt(). Sorry for the large comment, but here's how I updated AbstractButtonSourceTest:
@RunWith(MockitoJUnitRunner.class)
public class AbstractButtonSourceTest {
    @Mock private Action1<ActionEvent> action;
    @Mock private Action1<Throwable> error;
    @Mock private Action0 complete;
    private TestButton button;
    private Subscription sub;
    private ActionEvent event;

    @Before
    public void setup() throws Throwable {
        SwingTestHelper.create().runInEventDispatchThread(new Action0() {
            @Override
            public void call()
            {
                button = new TestButton();
                event = new ActionEvent(this, 1, "command");
            }
        }).awaitTerminal();

        sub = AbstractButtonSource.fromActionOf(button).subscribe(action, error, complete);
        SwingTestHelper.waitForEDT();
        Assert.assertFalse(sub.isUnsubscribed());

        // sanity check
        verifyZeroInteractions(action, error, complete);
    }

    @After
    public void tearDown() throws Throwable {
        sub.unsubscribe();
        SwingTestHelper.waitForEDT();
        Assert.assertTrue(sub.isUnsubscribed());

        SwingTestHelper.create().runInEventDispatchThread(new Action0() {
	    @Override
	    public void call() {
		button.testAction(event);
		verifyNoMoreInteractions(action, error, complete);
	    }
        }).awaitTerminal();
    }

    @Test
    public void testObservingActionEvents() throws Throwable {
        SwingTestHelper.create().runInEventDispatchThread(new Action0() {
            @Override
            public void call() {
                button.testAction(event);
                verify(action, times(1)).call(Matchers.<ActionEvent> any());

                button.testAction(event);
                verify(action, times(2)).call(Matchers.<ActionEvent> any());
            }

        }).awaitTerminal();
    }

    @SuppressWarnings("serial")
    private static class TestButton extends JButton
    {
        void testAction(ActionEvent event) {
            fireActionPerformed(event);
        }

        @Override
        public void addActionListener(ActionListener listener) {
            Assert.assertTrue(SwingUtilities.isEventDispatchThread());
            super.addActionListener(listener);
        }

        @Override
        public void removeActionListener(ActionListener listener) {
            Assert.assertTrue(SwingUtilities.isEventDispatchThread());
            super.removeActionListener(listener);
        }
    }
}

and here's SwingTestHelper.waitForEdt():
public static void waitForEDT() throws InterruptedException
{
    final CountDownLatch latch = new CountDownLatch(1);
    SwingUtilities.invokeLater(new Runnable() {
        @Override
        public void run() {
            latch.countDown();
        }
    });
    latch.await();
 }

That said, I think I like your approach is better, since it seems unnecessary to invokeLater if you're already on the EDT.
I suppose my only reservation to the invokeNowOrLater approach was that it could potentially re-order events if two events were received from different threads, one from the EDT and one from a background thread for example. Perhaps this reservation is ill founded since we really aught to always be using observeOn( SwingScheduler.getInstance() ).
FYI, we've started to use Rx in our GUI code at my work and two of my colleagues convinced me that when we subscribe or unsubscribe our listeners that we should blowup if we're not on the EDT. The reasoning was that not blowing up might be covering up a latent bug, so it's probably a good idea to expose it.
I think my issue with the original implementation of the FromEvent pattern was that it was not symmetrical, since we we're blowing up on subscribe, but on not on unsubscribe.

Interesting solution for the tests. To my mind, though, the original behavior is flat out wrong. It's rare To call invokeLater in Swing when you're already on the EDT, so why do it here?

Yes, I agree, it would seems unnecessary to be calling invokeLater when on the EDT, so perhaps the SwingScheduler aught to be updated as you suggest. As long as this contract is clearly documented I think it should be fine.

The PR is up. See pull request #17.

Closed by pr #17


Recent changes have broken JavaScript on dashboard no longer able to drag / drop image or use sunEditor WYSIWYG

In attempting to test a the fix for the inablitiy to modify a resource #159 I found that recent changes, I believe here : #153 have broken the JS on the dashboard causing both the drag / drop functionality to cease working for the images and the wysiwyg editor to not be initialized.  See attached screen shots

Looks good.


after_sign_in_path_for in registrations_controller might get called with nil resource

We're seeing a strange issue where after_sign_in_path_for in our custom registrations_controller gets called with a nil resource. As I understand it, this should never happen.
The call comes from devise/app/controllers/devise_controller.rb:95:in `require_no_authentication'. I can reproduce the issue when accessing the sign up path for the resource while being logged in. I couldn't reproduce with an rspec acceptance test though.

It is weird that it returns the user is authenticated but it doesn't return a user. Are you able to provide a test case? It doesn't need to be an acceptance one, but a controller one is fine.

@mreinsch Does this happen to you at any time during a session?  Or relatively soon after creating one?  I am also seeing a nil current_user sporatically, so far only in my extension of the registrations_controller.
I can't seem to replicate it in a controller or request spec either.  Only driving it from the browser.  We're using Webrick, devise 2.0.4 (can make it happen in 1.5.3 also), happens on all browsers I've tried (Safari, Chrome, FF).
@josevalim I've watched it happen in the debugger, after login, navigating to a page that uses the registrations_controller, the Warden _perform_authentication method falls through finding the logged in user and runs the strategies (rememberable, etc...) and fails to find anything, results in a nil user and it unwinds from there.  Any tips on where to look in there for clues?

@mreinsch Are you using any before_filter that might use current_user?  Perhaps in your ApplicationController?  This is apparently my issue, I'm not sure how exactly it causes the session to lose the user, but if I inspect the session hash, it's definitely gone sometimes, which results in the current_user returning nil, and removing the before_filter clears it up.


Flatten role claims

To fix https://github.com/Azure/azure-webpubsub/issues/166
All SDK Contribution checklist:
This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] Please open PR in Draft mode if it is:

Work in progress or not intended to be merged.
Encountering multiple pipeline failures and working on fixes.

[ ] If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
[x] I have read the contribution guidelines.
[x] The pull request does not introduce breaking changes.

General Guidelines and Best Practices

[ ] Title of the pull request is clear and informative.
[ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[x] Pull request includes test coverage for the included changes.

SDK Generation Guidelines

[ ] The generate.cmd file for the SDK has been updated with the version of AutoRest, as well as the commitid of your swagger spec or link to the swagger spec, used to generate the code. (Track 2 only)
[ ] The *.csproj and AssemblyInfo.cs files have been updated with the new version of the SDK. Please double check nuget.org current release version.

Additional management plane SDK specific contribution checklist:
Note: Only applies to Microsoft.Azure.Management.[RP] or Azure.ResourceManager.[RP]

[ ] Include updated management metadata.
[ ] Update AzureRP.props to add/remove version info to maintain up to date API versions.

Management plane SDK Troubleshooting

If this is very first SDK for a services and you are adding new service folders directly under /SDK, please add new service label and/or contact assigned reviewer.

If the check fails at the Verify Code Generation step, please ensure:

Do not modify any code in generated folders.
Do not selectively include/remove generated files in the PR.
Do use generate.ps1/cmd to generate this PR instead of calling autorest directly.
Please pay attention to the @microsoft.csharp version output after running generate.ps1. If it is lower than current released version (2.3.82), please run it again as it should pull down the latest version.

Note: We have recently updated the PSH module called by generate.ps1 to emit additional data. This would help reduce/eliminate the Code Verification check error. Please run following command:
  `dotnet msbuild eng/mgmt.proj /t:Util /p:UtilityName=InstallPsModules`

Old outstanding PR cleanup
Please note:
If PRs (including draft) has been out for more than 60 days and there are no responses from our query or followups, they will be closed to maintain a concise list for our reviewers.

Hi @KrzysztofCwalina @JoshLove-msft  could you help review the PR and if no concerns help merge the PR? ❤

Hi @KrzysztofCwalina, @JoshLove-msft , could you help release a new SDK version including this PR change? ❤

could you help release a new SDK version including this PR change?

We will. Question though: is this something you need released urgently, or it can wait till our next month's release (early July)?

could you help release a new SDK version including this PR change?

We will. Question though: is this something you need released urgently, or it can wait till our next month's release (early July)?

@KrzysztofCwalina If possible, could we have it sooner because we are unable to use this SDK to generate URL specific to roles in our application.

@KrzysztofCwalina thanks, we'd like a manual release to unblock the customers.

Hi @srujalsk!
Thanks for reporting this! We have a fix for this issue that will be released in the upcoming Beta 2 of the package.
If you need a fix for this sooner, the workaround is to copy the code for the GenerateClientAccessUri method into your app and use that instead of the method in the SDK. That should be sufficient to unblock you until the package is released!
Please reach out to me if you have any questions or run into any issues with the workaround!


#3102 add es translation for close

This is a minor translation addition for Spanish. In my previous MR I have missed it, and it has been requested by @iwiznia here.
Details

Add Spanish translation for "Close" message.

@Luke9389 Resolved the conflict

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Cherry-picked to staging in version: 1.0.68-0🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production in version: 1.0.68-4🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Update getting started guide

After installing wagtail with pip install wagtial, install requirements.txt doesn't seem necessary.

Hi @chimeno,
The pip install -r requirements.txt line is required to handle an awkward edge case:

A user has Django 1.7 installed
The current version of Wagtail is compatible with Django 1.7 and 1.8, so pip install wagtail does not upgrade Django to 1.8
The project template created by wagtail start is designed for Django 1.8 only (and the requirements.txt indicates this)
We therefore need to run pip install -r requirements.txt to make sure that the user is running Django 1.8.


Unexpected exception from <function AbstractSpookRepair.async_activate.._async_inspect at 0x7f4f82ede0>

Since update to 2023.6.x, I get errors like the following, around every minute:
Source: custom_components/spook/repairs/lovelace_unknown_entity_references.py:217
Integration: Spook ([documentation](https://github.com/frenck/spook), [issues](https://github.com/frenck/spook/issues))
First occurred: 14:54:38 (22 occurrences)
Last logged: 15:23:49

Unexpected exception from <function AbstractSpookRepair.async_activate.<locals>._async_inspect at 0x7f4f82ede0>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 117, in _handle_timer_finish
    await task
  File "/config/custom_components/spook/repairs/__init__.py", line 130, in _async_inspect
  File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 108, in async_inspect
  File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 156, in __async_extract_entities
  File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 215, in __async_extract_entities_from_card
  File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 218, in __async_extract_entities_from_card
  File "/config/custom_components/spook/repairs/lovelace_unknown_entity_references.py", line 217, in __async_extract_entities_from_card
TypeError: 'NoneType' object is not iterable

Anything else that I can provide to help fix this issue?

Repeated from #217


don't show delete/unpublish button on code-bus resources

The delete/unpublish buttons could already be omitted today if the code.permissions array from the status API wouldn't contain delete (which is present even without authentication). But we can add an additional check for status.code.status !== 200.

:tada: This issue has been resolved in version 6.28.0 :tada:
The release is available on:

GitHub release
v6.28.0

Your semantic-release bot :package::rocket:


Speeding up benchmark tests

Creating the load string in the benchmark test is taking huge time.
Using a string builder now to create that string.

I will merge this change and see how much it improves :)

On my computer it took more than 10 min just to create the string... after the change was quite fast.


Implements function to retrieve a collection's tags

Wraps zotero api's '/collections//tags', see https://www.zotero.org/support/dev/web_api/v3/basics.
Now with all commits squashed.

Coverage increased (+0.2%) to 43.853% when pulling 43128e07545e9ebce9351f6d6a4e1da949ea5d5e on andreahuber:dev into 188578da17f71e4054f5da0563028f16bf625150 on urschrei:dev.


LemonRestBundle 0.7.0 compatibility

This would bring the generator compatible with what's in the develop branch of LemonRestBundle. I wouldn't merge this just yet, but I did want to run it by you for your review.
Thanks for such an awesome project! I'm loving this thing!

Looks good to me.
I'm just wondering: how do you deal with swagger? Do you need to retrieve all fields to generate appropriate documentation? If so, perhaps could I reuse it?
Warn us when 0.7.0 is released. We'll take a look back on this one.
Thanks also for your project. This one wouldn't have been possible without your! :)

Right now I deal with swagger poorly. ;)  I just loop over the metadata and build a properties list.  I think this "definition" of fields most likely belongs in Lemon\RestBundle\Object\Definition and by being there a bunch more information could be pulled directly out of the object registry. Relying more heavily on this object definition in the registry is my long term direction as I want to be able to allow some fine grain customizations that are currently not possible.

Travis builds are failing because composer.json is pointing at the wrong release. When I cut 0.7.0 I'll update it here.  Thanks!

Glad to read this object registry evolution. It will simplify our metadata manipulation. :)

0.7.0 has been cut, and I've updated this PR to reflect those changes.

Good for me, except the possible confusion between plural/singular variable name.

I think to get around that you're going to have to check if the name is plural or singular and then somehow distinguish it in the generator.  Right now that resource name is used for the variable instances as well, ergo why it became plural when I regenerated the config.

Let's merge it, and see later if we can distinguish it. Not a big issue. Thanks! :)


Added retry mechanism when waiting for copy job to complete

The original retry mechanism, added in in pull request #119, retries if S3 throws an error when a copy job is submitted. It has now been verified that the bug raised in issue #56 occurs during Copy.waitForCompletion(), and not when the jobs are submitted.
The changes here remove the RetryableTransferManager, and replaces it with a retry mechanism which catches failed jobs, re-submits them, and re-gathers the results. The original configuration option is retained.

Coverage increased (+0.02%) to 74.927% when pulling d1320299348d7b4a6d5430123dec3c8c4095499d on issue-56-3 into 9d1c1a74479cbf36adf19e5a9541ef2d00b64b0e on master.


Is it intended to be imminently merged/released? Or should we close it and open a fresh PR when needed?

@annatisch we want to release this asap - i think what's missing from our side is to clean up the docs/examples. i'd like to contintue with this PR here - opinions?

@rikogeln - we can try. Start by merging the latest from main and let's see if that's going to cause any pain.

/azp run python - remoterendering - tests

@annatisch - i cleaned up the Readme and samples. Can you now please look into the PR?

@annatisch As discussed - can you please take a look again?


AIP page doesn't use server-side paging

The page that lists the comments of an AIP (reporter/aip/<aip ID>) uses client-side paging rather than server-side paging. This means that HTML representing every file in the AIP ends up getting sent to the end user's browser, which potential leads to very slow page loads. Paging should be changed so it's server-side rather than client-side.

This will reuse helpers in the PR for adding server-side paging to the AIPS page.
It'll require:

Changing AIPscan/Reporter/templates/aip.html to use server-side paging
Changing view_aip in AIPscan/Reporter/views.py to use server-side paging

A pull request has been created to address this issue: https://github.com/artefactual-labs/AIPscan/pull/221

This work's now been merged.


Creating a dev scratch org with Einstein Bot feature fails

Describe the bug
Creating a scratch org sandbox which includes the Einstein Bot feature fails, leaving a created scratch org but a CCI error
Reproduction steps
Steps to reproduce the behavior:

Make sure that you have activated Einstein Bot feature in your Dev Hub, and accepted legal terms
Include
   "botSettings": {    "enableBots": true  }
in orgs/dev.json
run cci org info dev
Notice that the command fails with this error :
`2021-07-14 01:23:17: Creating scratch org with command: sfdx force:org:create  -f orgs/dev.json -w 120 --targetdevhubusername mydevhub -n --durationdays 7 -a zzz__dev<EMAIL_ADDRESS>Failed to create scratch org:

=== Component Failures [1]
Error  shape/settings/Bot.settings  Bot   Legal Terms acceptance and/or necessary feature dependencies required to enable Bot Settings
ERROR running force:org:create:  Failed to deploy settings to scratch org.`

By running sfdx force:org:list, also  notice that the scratch org has in fact been created, but has no alias.

Context
Please include the following information at minimum.

Your CumulusCI version (cci version) : 3.39.0
Your Python version (python --version) : 3.9.6
Your operating system and version : MacOS 10.14.6
If using Windows, whether you are using Command Prompt, PowerShell, Bash on Windows, or WSL.
If possible, whether you installed CumulusCI using brew, pip, or pipx : brew

Gist
If applicable, please use the cci error gist command to create a Gist from your error log and include the link here. See the documentation to learn how to create a Gist.
Additional information
I think that the SFDX scratch org is being created correctly, but that CCI is incorrectly handling Bot.settings

What is the behavior if you run sfdx force:org:create directly, using the same Dev Hub and the same scratch org definition file?

Making sure the orgs/dev.json configuration included
 "features": ["ServiceCloud", "Chatbot"],
fixed this issue.


Prepare rustler_bigint release

This PR adds a README.md and relevant information in Cargo.toml to rustler_bigint. With that, we should be able to release the crate soon-ish as a v0.1. @thomas9911  please take a look if I missed something, or maybe if we should add additional information to the README.

Looks good to me :+1:

@thomas9911 I just released rustler_bigint. Thanks for your work! I also sent you an invite to be an owner of rustler_bigint on crates.io.


A question on existing C code integration

Hi. I am exploring a way of using ivory for writing applications on top of pre-existing embedded framework written in C. As usual, the framework has its own set of C-headers containing various definitions of types, structs, etc. What is the best way of importing those definitions to Ivory? Is it really necessary to rewrite code usigin [ivory| ... |] facilities (and introduce risks of conflicts or mis-alignment)? Can we ask ivory to build accessors for C-structures defined elsewhere?

Answering to my own question (from another acc)).
Ivory supports the QQ following syntax for declaring foreign structures
[ivory|
    abstract struct nk_message "nk/types.h"
    abstract struct nk_arena "nk/types.h"
    abstract struct nk_channel_state "nk/types.h"
    abstract struct nk_audit "nk/audit.h"
    abstract struct nk_subject "nk/security.h"
|]

nkModule = do
    defStruct (Proxy :: Proxy "nk_message")
    defStruct (Proxy :: Proxy "nk_arena")
    defStruct (Proxy :: Proxy  "nk_channel_state")
    defStruct (Proxy :: Proxy  "nk_audit")
    defStruct (Proxy :: Proxy  "nk_subject")

I still didn't know easy way of importing foreign typedefs. As for now, Ivory doesn't provide ways to generate C code with user-defined type names

Hi, can you give an example of what you would like? In particular, we need a way to bind imported typedefs to their associated Haskell types.

Basically, we have a set of type aliases like
/* nk/types.h */
typedef uint32_t nk_family_t;
typedef uint8_t nk_decision_t;
...

and so on. I'd like Ivory to generate code using this aliases. Unfortunately, as I wrote before, It seems Ivory don't support importing aliases on its Syntax layer. The closest method I know is to copy aliases in Haskell in the following manner:
type NkFamily = Uint32
type NkDecision = Uint8

Ok, I see. This would be quite hard to do, and I don't think there is a satisfying solution.
One solution is to do what you do, and make a Haskell type synonym. The upside is that you get Haskell type equality for free, but the downside is that the Ivory backend doesn't know about typedef string.
Another approach is for us to create a newtype that encodes the typedef as part of the type, analogous to structs. I.e., define something like
newtype TypeDef (sym :: Symbol) = TypeDef { getTypeDef :: AST.Expr }

and the appropriate instances. Now we have a string we can use in C code generation. Now the problem is that Haskell types won't match. For example, for a function foo
foo :: Def ('[TypeDef "a"] ':-> Uint8)
foo = proc "foo" $ \a -> body $ ret a

and TypeDef "a" that is a typedef for Uint8, we'll get a type error trying to return the argument, without having some sort of cast, since they are different Haskell types.
Does this make sense? Do you mind if we close this?

Thanks! The TypeDef (sym :: Symbol) looks like an acceptable solution, since we actually doesn't require compatibility between typedefed types and their synonyms. We would use newtype in C if we could.
Still there is a problem regarding this approach. I found that I don't know how to implement ivoryType function for IvoryType TypeDef instance. AFAIK, Ivory.Language.Syntax.Type type doesn't have a constructor to encode arbitrary type names in low-level AST. Is it possible to add such possibility (I have in mind strong guarantees regarding code generation, will this modification meet them)?

I think the way to do this is to have the quasiquoter generate the instances automatically, much like we do for structs. I can implement this, but it'll take me up to a week to get to it.

Nope, the absence of quasiquoter is not a problem. Let me re-formulate my thought. Recall the definition of IvoryType:
import qualified Ivory.Language.Syntax as AST

-- | The connection between Haskell and Ivory types.
class IvoryType t where
  ivoryType :: Proxy t -> AST.Type

Lets say we want to write an instance of IvoryType for TypeDef (sym :: Symbol)  :
instance (ASymbol sym) => IvoryType (TypeDef sym) where
  ivoryType _ = AST.Ty???? (fromTypeSym (aSymbol :: SymbolType sym))

The only constructor of AST.Type accepting String is TyStruct. If I am correct, we have to add not only the quasiquoter, but completely new low-level constructor TyTypedef String in order to complete the code.

Something like the following should work: given (assuming a new constructor in the AST):
newtype NewType (sym :: Symbol) = NewType { getNewType :: AST.Expr }

mkNewType :: (ASymbol sym, IvoryType t) => Proxy t -> Proxy (sym :: Symbol) -> AST.Type
mkNewType t p = AST.TyNewType (fromTypeSym p) (ivoryType t)

You can define the following type and instances:
type YourType =  NewType "yourtype_t"

instance IvoryType YourType where
  ivoryType _ = mkNewType (Proxy :: Proxy Uint8) (Proxy :: Proxy "yourtype_t")

instance IvoryVar YourType where
  wrapVar    = wrapVarExpr
  unwrapExpr = getNewType

instance IvoryExpr YourType where
  wrapExpr = NewType

We'll want to use this as a number, so we also need
deriving instance Num YourType

And now, we can use it as an Ivory type.
bar :: Def ('[YourType, YourType] ':-> YourType)
bar = proc "bar" $ \a b -> body $ ret (a+b+3)

If that works, it seems we should be able to implement it quite easily. The backend would generate a typedef.

@grwlf I assume this issue is resolved. Let me know otherwise.


Extension doesn't load properly on Windows in WSL2 environment.

Hello, I am trying to migrate from IntelliJ IDEA to VS Code, so I wanted to install OpenShift Connector extension. It has a dependency on this extension. When I click on the OpenShift pane, I get an error:
"Cannot activate the 'OpenShift Connector' extension because it depends on the 'Red Hat Authentication' extension, which is not loaded. Would you like to reload the window to load the extension?"
When I click reload, it reloads the editor but the Red Hat Authentication still doesn't load properly, so I end in the same situation with the same error. I can attach some logs, but as I am new to the VS Code I am not sure which one. So if you need some logs, please let me know.
My environment: VS Code on Windows 11 with WSL2 (project open from WSL2 environment, so the editor uses Remote - WSL extension).

Yes.

Ok this is super weird. I have a Windows box, I used to test it with vscode-rhoas, which also depends on vscode-redhat-account for Red Hat authentication, I'm just more familiar with it than the OpenShift one. Everything worked, I managed to log in, create and connect to a Kafka cluster.
I then installed and opened the OpenShift extension, managed to also log into Red Hat.
And then I restarted VS Code. This time I saw the same error as you opening OpenShift. But also opening the Kafka explorer. I restarted VS Code once more, started opening the Kafka explorer 1st, same error. OpenShift, same error.
So at this point I have no idea what's wrong, but the good thing is I can reproduce it ;-)

So, when installing, the 1st time vscode-redhat-account is activated, it happens in WSL. Once you reload VS Code, the extension runs locally, if you hover over it in the extension view, it says : "This extension is enabled in Local Extension Host because it prefers to run there", and it links to https://code.visualstudio.com/api/advanced-topics/remote-extensions
According to https://code.visualstudio.com/api/advanced-topics/remote-extensions#incorrect-execution-location, you can fix this by setting "remote.extensionKind" properly in your settings.json:
{
  "remote.extensionKind": {
    "redhat.vscode-redhat-account": ["workspace"]
  }
}

It fixed the problem for me.

Thank you very much, this helped.

Thanks @fbricon  - this addressed the issue for me as well.


Using Variable in where clause for export returns empty csv

Hi All,
I've noticed that using a variable to filter data in an export returns an empty csv like so:
set @dsid := "abc-123"
select * from dealers where dataset_id = @dsid
This of course returns data just fine within the DBeaver interface but it exports an empty set.  This seems related to this issue. But I can that issue #5635 is resolved while this is still outstanding.
Local OS: OSX 10.14.5
DBeaver Version: <IP_ADDRESS>906240635
MySQL:
innodb_version	5.6.37-82.2
protocol_version	10
version	5.6.37-82.2-log
version_comment	MySQL Community Server (GPL)
version_compile_machine	x86_64
version_compile_os	Linux

You need to use different syntax:
@set varName = value
select * from dealers where dataset_id = ${varName};

or
@set varName = 'string-value'
select * from dealers where dataset_id = :varName;

@serge-rider I did try exactly like you mentioned here but no luck. I am using V4.0.3. Is there any settings that should be changed?

@SCSVEL you might need to upgrade if 4.0.3 is your DBeaver version, current version is 6.1.5


Integrating travis ci

This will automate deployments to pypi, and test there are no initial errors on running the setup script on various versions.

:accept:


Fix cmake packaging

I pushed the commits in devel branch. I usually update master branch only after testing the consistency of all packages.


Content update: security final draft

User story
As a ReportStream prospective/current user, I want the website content to be up-to-date, accurate and timely so I can  trust the information to inform my decisions in my relationship with ReportStream.
Background & context
After completing basic outlines for key pages and IDing the new site structure, we need to create the actual content that will go in the wireframes. This ticket captures the work of updating the content for the Security page.
Open questions
N/A
Working links

draft

Acceptance criteria

[ ] Finalized and reviewed with content owner and/or SME
[ ] Capture questions that come up during the content and design work in the Website redesign research plan

content approved


Test release on Android: app-release-androidTest.apk: No such file or directory

I'm running detox test -c android.emu.release and getting an error:

With debug, it run success, the file app-debug-androidTest.apk is existing.

But release get that error. I don't know why the app-release-androidTest.apk does not generate, just have app-release.apk. Please help.

I believe I had the same error before, as well as @levito but somehow running it again did work for us for some arbitrary reason 🤔

I updated the docs, please see if this solves your issue.
https://github.com/wix/detox/commit/6dd205c528496b1a5555a821447846ccd07e9147

@rotemmiz Yeah, it run ok. Thank you very much @rotemmiz . Close this issue.


Add ulid extension

Description

Screencast

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

Hi! Thank you so much for your contribution to Raycast! My name is Milena and I will be reviewing your extension today :)
It is almost good to go! I left a few comments and hopefully you will be able to address them soon. Let me know if anything.

I have fixed those flaws, is it good enough now? I can not wait to have my first Raycast extension merged!


add overwrite method getKafkaConsumer in KafkaClient

Description
Add an overwrite method getKafkaConsumer() for KafkaClient.
Improvement
Add method getKafkaConsumer() with the default properties from KafkaConsumerProperties.
The class KafkaConsumerProperties can load kafka config from conf/kylin-kafka-consumer.xml.

Can one of the admins verify this patch?

Codecov Report

Merging #655 into master will increase coverage by 0.1%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##             master    #655     +/-   ##
==========================================
+ Coverage      25.7%   25.8%   +0.1%
- Complexity     5976    6009     +33
==========================================
  Files          1382    1382
  Lines         82144   82147      +3
  Branches      11509   11509
==========================================
+ Hits          21112   21196     +84
+ Misses        58985   58904     -81
  Partials       2047    2047

Impacted Files
Coverage Δ
Complexity Δ

...rg/apache/kylin/source/kafka/util/KafkaClient.java
0% <0%> (ø)
0 <0> (ø)
:arrow_down:

...eam/core/storage/columnar/DataSegmentFragment.java
57.37% <0%> (-1.64%)
17% <0%> (-1%)

...lin/dict/lookup/cache/RocksDBLookupTableCache.java
75.38% <0%> (-1.03%)
27% <0%> (ø)

...rg/apache/kylin/cube/inmemcubing/MemDiskStore.java
69.3% <0%> (-0.92%)
7% <0%> (ø)

...a/org/apache/kylin/measure/MeasureTypeFactory.java
57.14% <0%> (ø)
14% <0%> (ø)
:arrow_down:

...am/core/storage/columnar/ColumnarSegmentStore.java
58.69% <0%> (+0.43%)
28% <0%> (+1%)
:arrow_up:

.../apache/kylin/common/persistence/ResourceTool.java
22.54% <0%> (+0.45%)
14% <0%> (ø)
:arrow_down:

...a/org/apache/kylin/dict/Number2BytesConverter.java
82.53% <0%> (+0.79%)
18% <0%> (+1%)
:arrow_up:

...ream/core/storage/columnar/ColumnarStoreCache.java
51.16% <0%> (+2.32%)
8% <0%> (+1%)
:arrow_up:

...rg/apache/kylin/storage/hybrid/HybridInstance.java
44.27% <0%> (+6.1%)
17% <0%> (+4%)
:arrow_up:

... and 2 more

Continue to review full report at Codecov.

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


What happened?
I don't see any documentation on how you handle the export button, can you please update the docs or point me in the right direction
How to reproduce the bug
i don't see any option to add the export button like in your demo or screenshots
Package Version
3
PHP Version
8.2
Laravel Version
11
Which operating systems does with happen with?
Windows
Notes
No response

Hello @zanjix, currently the plugin does not support exporting. We are working in adding that feature!


Implement metrics for failing values validations

Since we have validations of module configurations stored in ConfigMap which could be changed directly via kubectl - validation error may occur and would be visible only in the operator logs.
To reach observability of misconfigured module we might want to implement a metric, representing described condition.
This metric would be used in alerts, from which system operators will be notified about a fact of a configuration error.

Metric is already implemented addon_operator_config_values_errors_total{}


Add zola minimal theme

This PR adds Minimal as submodule.

LGTM, just waiting on the DDOS on sourcehut to be over so CI can run...


feat!: combine multiple error files into one crate and solve bugs

Description
while testing Spore contracts in spore-sdk we found few bugs that have to solve and some process that can optimize
the thing that should be clarified is, the returned error code from Lua should be limited in range [-127, 0)
all warnings have been killed
p.s. some changes are from my editor formatter
Tasks list

[x] close #17
[x] close #18
[x] close #19
[x] close #21

@RongxinZhang now we can directly follow steps in README.md to build and test

@ShookLyngs I'm not sure wether issue #19 has been solved, because I guess it's an error handling problem that I've already put work on it in this PR

@ShookLyngs I'm not sure wether issue #19 has been solved, because I guess it's an error handling problem that I've already put work on it in this PR

Will continue test on them with the sdk.
And by "error handling problem" do you mean I should restric the error code in my lua code in range [-127, 0)?
By the way:

Do you think we should get more reviewers on the code? I can only read part of the code.
Do you think we can have testnet deployments for sdk testing?

@ShookLyngs

restrict error code in Lua
yes

get more reviewers
yes, but a little difficult for now @RongxinZhang

deployment on testate
yes, refer to here https://github.com/sporeprotocol/spore-contract/pull/22/files

https://github.com/nervosnetwork/ckb-lua-vm/blob/ab2045a2e1bb3d18f159db609572b4ec97784dfb/docs/dylib.md#lua_run_code

Lua script should pass non-negative number to ckb.exit_script in order to distinguish lua interpreter error and delibrately set return code.

It seems that negative error codes are not supposed be passed to the ckb.exit_script?

I encountered an error with a code of -2 when attempting to create a Mutant.

Update: I created a Mutant using another lua code. This time I didn't use the spore_output_index variable, so perhaps you can check if it was an injection issue.
Here's the lua code I used, which worked:
if spore_ext_mode == 2 then
  ckb.exit_script(86)
end

Another problem I encountered was when I attemped to create a Spore with a Mutant, a 57 error was returned. If I'm correct, it's the MutantIDNotValid error, correct me if I'm wrong.
I Looked at the contract, here's where the error is thrown: https://github.com/sporeprotocol/spore-contract/blob/80df6166ef99b0d69cda326b5d07b4bfeadf9b5c/lib/utils/src/mime.rs#L89-L92
I don't fully understand rust, but if the quoted code block is attempting to check the length of a hex hash, maybe the expected length should be 66 (including the "0x") instead of 32?
An example of a mime with Mutant Ids specified:
text/plain;mutant[]=0x193ce52621a22a354efd4f4d98c7e7b7f8cff30cc1fd4b9d8a88c2558cf4a5b4

And by the way, it's a bit challenging to search for a specific error code because most of the error codes are auto generated within enum. Do you think since the error codes are combined together, is it better to specify each error's code for better querying?
Ref: https://github.com/sporeprotocol/spore-contract/blob/1a1415acefc40e805761d2869142480bad23541e/lib/errors/src/error.rs

Do you think since the error codes are combined together, is it better to specify each error's code for better querying?

most of error code from different contracts in previous pattern share a same range, so combining them into one enum could be better to distinguish them, because all of error codes are unique

@ShookLyngs I find your creation of mutant cell is dispatched to a particular process in spore_extension_lua contract that doesn't inject spore_ext_mode and spore_output_index variables, it's happened when the mutant cell is put in transaction's output field
I adjusted it in the latest commit, here is its new logic:

spore_ext_mode = 0 (nil for previous) => creation of mutant cell called in output field
spore_ext_mode = 1 (0 for previous) => creation of mutant cell called in celldep field
spore_ext_mode = 2 (1 for previous) => transfer of mutant cell called in celldep field
spore_ext_mode = 3 (2 for previous) => destroy of mutant cell called in celldep field

most of error code from different contracts in previous pattern share a same range, so combining them into one enum could be better to distinguish them, because all of error codes are unique

Yeah, I'm not against the idea. It's just difficult to find an error by its error code.
So I mean maybe the error codes should be declared more explicitly.
For example, maybe declare them like this:
// common
ClusterCellNotInDep = 10,
ClusterOwnershipVerifyFailed,

// spore_extension_lua errors
ModifyExtensionPermanentField = 12,
ConflictExtensionCreation,
...

// cluster_proxy errors
InvalidProxyOperation = 23,
ImmutableProxyFieldModification,
...

Instead of this:
// common
ClusterCellNotInDep = 10,
ClusterOwnershipVerifyFailed,

// spore_extension_lua errors
ModifyExtensionPermanentField,
ConflictExtensionCreation,
...

// cluster_proxy errors
InvalidProxyOperation,
ImmutableProxyFieldModification,
...

So I mean maybe the error codes should be declared more explicitly

I've thought of this but didn't do, if you say so, it's a good change

This way, people wouldn't have to search for errors in the source code

Good idea, but I don't understand all of these error codes meaning, so I'll mark it

@ShookLyngs new changes have applied to PR #22 already (rebased and force-push), please take them and start the test again

Update:

#17
Succesfully created a Mutant with spore_ext_mode and spore_output_index referenced in the code.
However, not sure what would be the value of spore_output_index be when spore_ext_mode == 0.
The lua code I used:
if spore_ext_mode == 1 and spore_output_index > 0 then
  ckb.exit_script(88)
end

#18
Transferred a Mutant: 0x215dc252e2724ad535c3ed1fb3817893d032db941f174dbda72e693122987c4e.
No problem with it.

#19

The Unkonwn error was gone.
The 57 (MutantIDNotValid) error was gone.
A new 49 (ExtensionCellNotInDep) error was occured when attempted to create a Spore with a Mutant.

I suppose it means that the required Mutant was not in cellDeps. However, I have already included the referenced Mutant in cellDeps. Can you take a look at it?
Ref: https://github.com/sporeprotocol/spore-contract/blob/80df6166ef99b0d69cda326b5d07b4bfeadf9b5c/contracts/spore/src/entry.rs#L163-L175

A new 49 (ExtensionCellNotInDep) error was occured when attempted to create a Spore with a Mutant.

confirmed, and now I feel like it's fixed, I'll provide deployment information later

Update:
An 14 (InvalidExtensionID) error occured when attempting to create a Mutant cell.
I guess it's because Mutant type args has 33 bytes: <32-byte type-id><1-byte min-payment>.
Info:

Mutant type code hash: 0x494ba9e4a52462be761cc6e9660ee999981317e8240dad29002c05a56a944504

Mutant Id: 0x87a5bad1849ba09237bdd62209b538c3f39b27ba6dceefd040d5f9f71f6adfb5

Transaction.inputs[0]:
{
  "previous_output": {
    "tx_hash": "0xcb7c6e7a3cc199523abec9fdc9e1168cff7f73a362b531fc6241125a01d9b80d",
    "index": "0x1"
  },
  "since": "0x0"
}

Mutant output index: 0x0

@ShookLyngs

An 14 (InvalidExtensionID) error was occured when attempting to create a Mutant cell.

this issue has been solved, and I merged chore/deployment branch to the branch in of this PR, so the deployment information can directly find in here

@ShookLyngs if other features except Mutant are fine, I think this PR can be merged, please take your time to have a check

Update:
Sorry, I was busy listing everything that needed to be tested, just in case something was skipped.
Now that I've tested everything I could (except for Mutant-related features), and most features are functioning normally as expected, there is still one issue we may need to resolve: Spore V2 doesn't currently support referencing Cluster V2.
The original design was to allow newer versions of Spores to reference older versions of Clusters. For example, a Spore V2 should be able to reference a Cluster V1. However, in the current version of Spore V2 (0x49d12...), when I attempted to create a Spore V2 and referenced a Cluster V1 (0x598d7...) in the transaction, a 5 (ClusterCellNotInDep) error occurred.
Cluster V1 testnet info:
{
  "code_hash": "0x1dbd4b03f1cf9d27b5359f8e3569efcb848bc71e6f204654509ce67c07bb1fdd",
  "tx_hash": "0x91555ebd2bbddf80da141a58220648d6dd3f8c04ba4bb8312d01907165b636ad",
  "index": "0x0"
}

Spore V2 doesn't currently support referencing Cluster V1

I injected older version code_hash of Cluster in Spore and Cluster_proxy contracts, but I found older Cluster code hash is not the one you listed, I used this one mentioned in README.md:

but I found older Cluster code hash is not the one you listed

You're right, this is the correct one, matching your info:
{
  "code_hash": "0x598d793defef36e2eeba54a9b45130e4ca92822e1d193671f490950c3b856080",
  "tx_hash": "0x49551a20dfe39231e7db49431d26c9c08ceec96a29024eef3acc936deeb2ca76",
  "index": "0x0"
}


Cannot find GCC for android OS

(ck2) feisun-mbp:CK feisun$ ck detect soft:compiler.gcc.android.ndk --target_os=android25-arm-v7a

  Searching for Android NDK GCC compiler (ndk-build) to automatically register in the CK - it may take some time, please wait ...

    * Searching in /usr ...
    * Searching in /opt ...
    * Searching in /Users/feisun ...

  Search completed in 67.8 secs. Found 0 target files (may be pruned) ...
****** Installation notes: ******
You can download and install Native Android NDK for your platform from
* http://developer.android.com/ndk/downloads/index.html

You can also download CrystaX NDK (extra libs and improved C++ support) from
* https://www.crystax.net/en/download

*********************************
CK error: [soft] software was not automatically found on your system! Please, install it and re-try again!!

However, there are multiple versions of the gcc under /opt and /Users/feisun/Library/Android/sdk/
feisun-mbp:ndk-bundle feisun$ find /opt/android_ndk/android-ndk-r15 -name "gcc" | grep android
/opt/android_ndk/android-ndk-r15/toolchains/x86-4.9/prebuilt/darwin-x86_64/libexec/gcc
/opt/android_ndk/android-ndk-r15/toolchains/x86-4.9/prebuilt/darwin-x86_64/lib/gcc
/opt/android_ndk/android-ndk-r15/toolchains/mips64el-linux-android-4.9/prebuilt/darwin-x86_64/libexec/gcc
/opt/android_ndk/android-ndk-r15/toolchains/mips64el-linux-android-4.9/prebuilt/darwin-x86_64/lib/gcc
/opt/android_ndk/android-ndk-r15/toolchains/x86_64-4.9/prebuilt/darwin-x86_64/libexec/gcc
/opt/android_ndk/android-ndk-r15/toolchains/x86_64-4.9/prebuilt/darwin-x86_64/lib/gcc
/opt/android_ndk/android-ndk-r15/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/libexec/gcc
/opt/android_ndk/android-ndk-r15/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc
/opt/android_ndk/android-ndk-r15/toolchains/mipsel-linux-android-4.9/prebuilt/darwin-x86_64/libexec/gcc
/opt/android_ndk/android-ndk-r15/toolchains/mipsel-linux-android-4.9/prebuilt/darwin-x86_64/lib/gcc
/opt/android_ndk/android-ndk-r15/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/libexec/gcc
/opt/android_ndk/android-ndk-r15/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/lib/gcc

I have a couple of other installed too. It is weird that none can be found.
What is the likely cause? Thanks.

Dear @sf-wind, I'm currently trying to reproduce your case.
Can I ask why the android-ndk-r15 directory ended up in /opt/android_ndk on your machine?
Did you just choose to put it there yourself, or was it some kind of automatic installation?

Dear @sf-wind , I have made a patch that addresses your issue some time ago:
https://github.com/ctuning/ck-env/pull/63/commits/66e51465b21b59bd2cd61500692e11b1cc685fbf
Could you please pull the ck-env repository and have another go?
It would be very helpful to know whether it fixed your issue or not.
Many thanks in advance.

Since we didn't get a user feedback and it seems that we solved the problem, I close this ticket - we will reopen it if we encounter similar issue again... Thanks!


empty cluster status when cluster is offline

related issue: https://github.com/open-cluster-management/backlog/issues/13596

/assign @qiujian16

/lgtm


Leaderf rg does not search in working directory?

vim or neovim?

[x] vim
[x] neovim

Output of vim --version or nvim --version:

NVIM v0.3.4
Build type: RelWithDebInfo
LuaJIT 2.0.5
Compilation: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe /DWIN32 /D_WINDOWS /W3 /MD /Zi /O2 /Ob1 /DNDEBUG -DMIN_LOG_LEVEL=3 /W3 -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -D_WIN32_WINNT=0x0600 -DINCLUDE_GENERATED_DECLARATIONS -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -IC:/projects/neovim/build/config -IC:/projects/neovim/src -IC:/projects/neovim/.deps/usr/include -IC:/projects/neovim/build/src/nvim/auto -IC:/projects/neovim/build/include
Compiled by appveyor@APPVYR-WIN

Features: -acl +iconv -jemalloc +tui
See ":help feature-compile"

   system vimrc file: "$VIM\sysinit.vim"
  fall-back for $VIM: "C:/Program Files/nvim/share/nvim"

Output of :echo has("python"):
0
Output of :echo has("python3"):
1
Output of :echo &pythondll(only vim, not neovim):
Output of :echo &pythonthreedll(only vim, not neovim):
Output of :py print(sys.version):
E319 No "python" provider found.
Output of :py3 print(sys.version):
3.7.2
Output of :echo g:Lf_Debug_Cmd:
Operating system:

[ ] Linux
[ ] Mac OS X
[x] Windows
[ ] Etc.

Configurations related to LeaderF in vimrc:

let g:Lf_RootMarkers = ['.project', '.root', '.svn', '.git']
let g:Lf_WorkingDirectoryMode = 'Ac'
let g:Lf_WindowHeight = 0.36
"nnoremap <A-p> :LeaderfFunction!<CR>
nnoremap <C-p> :Leaderf file<CR>
" search word under cursor, the pattern is treated as regex, and enter normal mode directly
noremap <C-F> :<C-U><C-R>=printf("Leaderf! rg -e %s ", expand("<cword>"))<CR>
" search word under cursor, the pattern is treated as regex,
" append the result to previous search results.
noremap <C-G> :<C-U><C-R>=printf("Leaderf! rg --append -e %s ", expand("<cword>"))<CR>
" search visually selected text literally, don't quit LeaderF after accepting an entry
xnoremap gf :<C-U><C-R>=printf("Leaderf! rg -F --stayOpen -e %s ", leaderf#Rg#visual())<CR>
" recall last search. If the result window is closed, reopen it.
noremap go :<C-U>Leaderf! rg --stayOpen --recall<CR>

Describe your question, feature request, or bug.
I found that Leaderf! rg search string under directory same with :pwd, but Leaderf file search files under working directory which indicated by g:Lf_RootMarkers. Why they have different behaves?
I already set this in my init.vim:
let g:Lf_RootMarkers = ['.project', '.root', '.svn', '.git']
let g:Lf_WorkingDirectoryMode = 'Ac'

Can I get the root working directory and set it to rg path?
Steps to reproduce
directory structure:
my-project (root working directory)
  - .git
  - sub-folder
    - test.c

open test.c using neovim, use Leaderf rg -e to search something.
Actual behaviour
searching under my-project path.
Expected behaviour
searching under sub-folder path.

Yes, Leaderf rg always starts from cwd, g:Lf_RootMarkers and g:Lf_WorkingDirectoryMode are only for Leaderf file, so you want that Leaderf rg has the same behavior as Leaderf file when using g:Lf_RootMarkers and g:Lf_WorkingDirectoryMode?

@Yggdroot ,
Yes, I think project-wide searching is useful. Is there/Could you provide an option or a method to do this?

Actual behaviour
searching under my-project path.
Expected behaviour
searching under sub-folder path.

I don't understand your expectation, I think the current behavior is the expected behavior.

sorry, my mistake. The actual behaviour is searching under sub-folder path, and my expected behaviour is searching under project path, always, just like LeaderfFile. As your explained, this is not bug, but a feature request. That is provide an option to make:

Leaderf rg has the same behavior as Leaderf file when using g:Lf_RootMarkers and g:Lf_WorkingDirectoryMode

Now you can use Leaderf rg like this:
Leaderf rg --wd-mode=ac -e xxx

--wd-mode <MODE>      Specify the working directory mode, value has the same
                        meaning as g:Lf_WorkingDirectoryMode.

帅

Thanks 👍


ParquetReader's builder should use Configuration from the InputFile

ParquetReader can be built using an InputFile, which may be a HadoopInputFile and have a Configuration. If it is, ParquetHadoopOptions should be be based on that configuration instance.
Reporter: Ryan Blue / @rdblue
Assignee: Ryan Blue / @rdblue
PRs and other links:

GitHub Pull Request #464
PR #464

Note: This issue was originally created as PARQUET-1263. Please see the migration documentation for further details.

Ryan Blue / @rdblue:
Merged #464.


Suggested README improvement: add note how to use key formatter without conversion

Hey. Great package, thanks for sharing this 😊!
I had the issue that the API I am consuming returns JSON payloads with camelCase property key names, so mapping firstName in the response array to $firstName in the value object did not work for me. However, after looking into the code I realized that I can use the KeyFormatterWithoutConversion class as keyFormatter argument in the constructor to disable key name conversion. So this solves my problem 👌.
$mapper = new ObjectMapperUsingReflection(
    new DefinitionProvider(
        keyFormatter: new KeyFormatterWithoutConversion(),
    ),
);

I would suggest adding a small note about this in the README. I can imagine that more people might run into this little issue.
If you like I can also open a PR.

Hi :) A PR would be very welcome, I'll check out if I can add a docs website for this project soon.

Nice. I've created a MR.

Thank you!


Conversion tool scope

Hi.
Congrats for your work.
Do you think that it will be possible to use your conversion tool with our attached firebase json file configuration?
Thanks.
Manuel
example.txt

Hi there! The file you've attached seems to be a JSON file. This tool only converts CSV to JSON, and automatically picks the schema/structure/configuration.
Please let me know if you have any specific questions.

Hi. Thanks for your reply.
Yes, I know that your tool only converts CSV to JSON. My question was if is it possible to generate a JSON file with that structure from a CSV file that, for sure, we also need to create/structure.
Thank you, in advance, for your kind attention.
Kind regards,
Manuel

Ah okay, sorry for misinterpreting. It's not possible to generate a JSON file automatically with that structure from a CSV file because you have JSON arrays as values in your example (ex: openHours, annotations, days).