text:
K8s HA installation failing in some cases on task "Get token from master"

Describe the bug
K8s HA installation failing in some cases on Ansible task:

"Get token from master"

To Reproduce
Steps to reproduce the behavior:

Fresh deployment of epi v0.6.0

Expected behavior
HA installation went through well
Config files
---
kind: configuration/kubernetes-master
name: default
provider: azure
specification:
  advanced:
    networking:
      plugin: canal

OS (please complete the following information):

OS: RHEL

Cloud Environment (please complete the following information):

Cloud Provider: Azure

Additional context
2020-03-25T18:03:25.5814698Z 18:03:25 INFO cli.engine.ansible.AnsibleCommand - TASK [kubernetes_master : Get token from master] *******************************
2020-03-25T18:03:34.6037763Z 18:03:34 INFO cli.engine.ansible.AnsibleCommand - fatal: [ci-haazurrhelcanal-kubernetes-master-vm-2 -> 51.136.78.216]: FAILED! => {"changed": false, "cmd": "kubeadm token list | grep -w authentication | grep -vwi invalid | awk '{print $1}' | head -1\n", "delta": "0:00:07.185579", "end": "2020-03-25 18:03:34.398996", "failed_when_result": true, "rc": 0, "start": "2020-03-25 18:03:27.213417", "stderr": "failed to list bootstrap tokens: etcdserver: request timed out\nTo see the stack trace of this error execute with --v=5 or higher", "stderr_lines": ["failed to list bootstrap tokens: etcdserver: request timed out", "To see the stack trace of this error execute with --v=5 or higher"], "stdout": "", "stdout_lines": []}

@przemyslavic can you review if that bug is still valid?

@przemyslavic or @sk4zuzu please provide fallowing informations:

os related
cloud related
epicli version related

I am not able to reproduce with the latest epicli version. If the error occurs again, a new issue  will be created.

authors: mkyc przemyslavic rafzei

repo: epiphany-platform/epiphany


text:
fix delete and import for redundant l2 connections

Description:
Field RedundantUUID was used to check if there was a secondary connection. This field is not been returned for new connections anymore. This field can be deleted from the schema but then it will be required a full scan for all connections in the read function to ensure the terraform import command works also for redundant connections.
From terraform import function docs:

This function requires the Read function to be able to refresh the entire resource with d.Id() ONLY

Without redundantUUID field returned from the API there is no way to know if it is a redundant connection just with the primary connection ID, since all connections both single and redundant have a redundancyGroup. Therefore it will be needed a full scan in the read function to search for a connection with same RedundancyGroup.
To handle that without a full scan I propose to keep RedundantUUID but without using the value returned from the API. Instead value will be set in:

Create function
https://github.com/equinix/terraform-provider-equinix/blob/e13dbf15a15a165ed08ec74a38907e8dbd4853d2/equinix/resource_ecx_l2_connection.go#L620-L625
Importer will require users to specify both primary and secondary ID
https://github.com/equinix/terraform-provider-equinix/blob/e13dbf15a15a165ed08ec74a38907e8dbd4853d2/equinix/resource_ecx_l2_connection.go#L130-L141

Depends on:

[x] new ecx-go version v2.1.1 https://github.com/equinix/ecx-go/pull/5

Tasks:

[x] Fix check for redundancy connections and wait for secondary connection to be deleted - fixes #98
[x] Add deleted value as valid target status in delete function  - fixes #61
[x] Add named_tag uppercase values field and changes comparison not case-sensitive - fixes #97
[x] Update l2_connection documentation
[x] Update e2e test

Is this the only way users would be able to get Terraform details for the redundant connection?

Since secondary connection has its own UUID/name it could be retrieved independently:
data "equinix_ecx_l2_connection" "primary" {
  name = var.primary_conn_name
  redundancy_group_id = var.redundancy_group_id
}

data "equinix_ecx_l2_connection" "secondary" {
  name = var.secondary_conn_name
  redundancy_group_id = var.redundancy_group_id
}

Codecov Report

Merging #103 (c790f7f) into master (4c6eea2) will decrease coverage by 0.63%.
The diff coverage is 7.07%.

@@            Coverage Diff             @@
##           master     #103      +/-   ##
==========================================
- Coverage   61.70%   61.06%   -0.64%
==========================================
  Files          65       65
  Lines       11134    11062      -72
==========================================
- Hits         6870     6755     -115
- Misses       4013     4053      +40
- Partials      251      254       +3

Impacted Files
Coverage Δ

equinix/resource_ecx_l2_connection.go
43.78% <7.07%> (-7.73%)
:arrow_down:

equinix/errors.go
62.96% <0.00%> (-4.63%)
:arrow_down:

equinix/resource_metal_device.go
64.13% <0.00%> (-2.62%)
:arrow_down:

equinix/helpers_device.go
71.66% <0.00%> (-0.56%)
:arrow_down:

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 4c6eea2...c790f7f. Read the comment docs.

source: gharchive/pull-request

authors: codecov-commenter ocobleseqx

repo: equinix/terraform-provider-equinix

license: MIT

license_type: permissive

license_source: github-api


text:
Address lines maximum characters

When an address is given using address lines, a maximum of 4 address lines is set. Should we also set a maximum amount of characters for each line?
(fyi: in our system it is limited to 8 lines and maximum 50 characters in each line. This way the entire address is visible when printed and placed in an envelope with a standard window.)

I don't think there's any standard for this. This means that other systems might have 60 characters, while others would have 40. You must be prepared to receive any kind of input, and - possibly - split or join the lines appropriately.
https://github.com/erasmus-without-paper/ewp-specs-types-address/blob/master/schema.xsd#L77

I also think that there is no standard.
I suppose that most client who work with non-structured addresses, will have a maximum set for each address line and maybe also for the total. If the xsd does not set a maximum, the client must be able to process an address which is longer than its internal maximum. Which will probably mean cutting the address.
If some restrictions are set, a client can decide to cut the addresses if it is bigger then it can handle or change in order to handle everything.

I have no strong opinions in this matter. Perhaps some other developers will? @erasmus-without-paper/all-members
Regardless of what we choose, clients will need to do some splitting or concatenating if they want to import the address into their database.
It looks a bit differently for servers though. In the current solution, the servers don't need to either split nor concatenate, they just output. If a limit is present (e.g. 30 characters), then some servers will be required to split their data.
This is the only reason why I didn't set a limit here - to make server development easier. Since servers will be developed first (before the clients), this seemed a reasonable choice.

I agree with Nico that we should define a maximum nr of characters that is still acceptable for printing purposes.

some client systems of ours restrict it to 50 characters, in our database we don't restrict the length.
I am not sure if we should restrict the length for printing purposes in erasmus without paper :-)

It seems that OASIS is currently the only partner to request this.

Address datatype got approved to stable-v1, so I'm closing topics about backward-incompatible features.

source: gharchive/issue

authors: NicoVanMoortel georgschermann huntering wrygiel


text:
Release 1.7.3

PR in preparation for release 1.7.3.

I was going to add that we need to update the version number in the Doxyfile but this one disappeared from the repository apparently. I thought that files that were present in the latest master commit were safe from cleaning? In any case, we have to carefully check that no other files were erased (and removed from history) by mistake, and re-introduce them if necessary

I originally intended on protecting the files in the latest branch, but I ultimately opted not to in order to get any large file out of the way. This included several test comparison files that were unnecessarily large.
@tridelat As you suspected, a number of documentation related files were removed that I have added back.

I was going to add that we need to update the version number in the Doxyfile but this one disappeared from the repository apparently. I thought that files that were present in the latest master commit were safe from cleaning? In any case, we have to carefully check that no other files were erased (and removed from history) by mistake, and re-introduce them if necessary

I originally intended on protecting the files in the latest branch, but I ultimately opted not to in order to get any large file out of the way. This included several test comparison files that were unnecessarily large.
@tridelat As you suspected, a number of documentation related files were removed that I have added back.

We are loosing history on those files, but I guess it is not such a big deal.. Are we however certain that those were the only files that were removed by mistake on the latest commit of master before cleaning the repo?
They are not big files, so I would have thought that they would not be selected for cleaning in any case. It could have been safer to keep all files that were present on the latest commit of master (unless they were truly big and unused)

I deleted the fork that the feature branch was on. If additions need to be made, I'll close this PR and open another one.

authors: tridelat zhang-alvin

repo: erdc/proteus


text:
1.7 support

Known issues:

Custom resource definitions are in a different repo.
Was ObjectMeta removed from v1?

Any update on this? I use version v0.2.0 and have trouble watching/listing secrets, services and ingress objects. They all fail with an error similar to
decode error status: payload is not a kubernetes protobuf object
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x990804]

@JorritSalverda this https://github.com/ericchiang/k8s/issues/46?

@ericchiang indeed with legacy authorization enabled it works fine. I'll try and fix my rbac roles so i can disable abac. Thanks for pointing that out.

I'm getting the same decode error status: payload is not a kubernetes protobuf object error when trying to create pods in AWS.
If I'm using RBAC, how do I specify the service account when calling kubeClient.CoreV1().CreatePod()?
Thanks!

@justinliew I would suggest you to read this section about RBAC:
https://kubernetes.io/docs/admin/authorization/rbac/#service-account-permissions
Something similar to this should be enough depending on your requirements:
# define role
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
  name: my-cluster-role
rules:
- apiGroups: [""]
  resources:
  - pods
  verbs:
  - create
---
# apply role to service account
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: my-cluster-role-binding
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: my-cluster-role
subjects:
- kind: ServiceAccount
  name: my-service-account
  namespace: my-namespace

Hope that help.

Thanks Etienne. That helped and also realizing that I needed to specify the appropriate service account names when launching the parent pod vs. the child pod.

authors: JorritSalverda ericchiang etiennetremel justinliew

license_source: bigquery


text:
Fixed opts.destroy, added opts.size, and removed trailing line in files

Come on, dude. Accept this!
Is really simple to integrate.
Also, removed trailing line in files.

Apologies I hadn't seen this! New release coming soon

repo: ericvicenti/ssh-keygen

license: mit


text:
PropertyNumericRangeFilter

[ ] Check https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/fields/#integerrangefield
[ ] Check https://django-filter.readthedocs.io/en/latest/ref/filters.html#numericrangefilter
[ ] Data Population for Django Test Project
[ ] Test Page for Django Test Project
[ ] Filter Support
[ ] Document Filter in Docs
[ ] Filter Test Coverage

Deferred to Later because we need to include new Postgres specific lookups

repo: ericziethen/django-property-filter


text:
Windows build failed.

C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared\dxgi.h(1,1): error C2220: the following warning is treated as an error [C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\plugins\audiotags\audiotags_plugin.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared\dxgi.h(1,1): warning C4821: Unable to determine Unicode encoding type, please save the file with signature (BOM) [C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\plugins\audiotags\audiotags_plugin.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared\winapifamily.h(1,1): warning C4821: Unable to determine Unicode encoding type, please save the file with signature (BOM) [C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\plugins\audiotags\audiotags_plugin.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared\sdkddkver.h(1,1): warning C4821: Unable to determine Unicode encoding type, please save the file with signature (BOM) [C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\plugins\audiotags\audiotags_plugin.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\windows.h(32,28): warning C4067: unexpected tokens following preprocessor directive - expected a newline [C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\plugins\audiotags\audiotags_plugin.vcxproj]
C:\Users\sani\Documents\GitHub\simple_music_player\windows\flutter\ephemeral\flutter_windows.h(121,5): error C2061: syntax error: identifier 'HWND'
...
...
C:\Users\sani\Documents\GitHub\simple_music_player\windows\flutter\ephemeral\cpp_client_wrapper\include\flutter/plugin_registrar_windows.h(96,9): error C2451: a conditional expression of type 'std::optional' is not valid [C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\plugins\simple_audio\simple_audio_plugin.vcxproj]
C:\Users\sani\Documents\GitHub\simple_music_player\windows\flutter\ephemeral\cpp_client_wrapper\include\flutter/plugin_registrar_windows.h(97,8): error C2065: 'result': undeclared identifier [C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\plugins\simple_audio\simple_audio_plugin.vcxproj]
Building Windows application...
Exception: Build process failed.

I will take a look at this when I have the time.

Hello.
I am able to build and run the example app with no errors. Maybe try flutter clean?

@erikas-taroza not sure if its this packages fault but got this error after upgrading to audoitags 1.1.1.
lib/main.dart(16,7): error GC9768DF9: Undefined name 'NotificationActions'. [C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\flutter\flutter_assemble.vcxproj]
lib/main.dart(17,7): error GC9768DF9: Undefined name 'NotificationActions'. [C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\flutter\flutter_assemble.vcxproj]
lib/main.dart(14,5): error GC6690633: No named parameter with the name 'androidCompactPlaybackActions'. [C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\flutter\flutter_assemble.vcxproj]
lib/utils/utils.dart(34,30): error G75B77105: Member not found: 'Icon'. [C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\flutter\flutter_assemble.vcxproj]
lib/utils/utils.dart(35,24): error G75B77105: Member not found: 'Png'. [C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\flutter\flutter_assemble.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): error MSB8066: Custom build for 'C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\CMakeFiles\346ec51341759c40164bbd4237fd13ff\flutter_windows.dll.rule;C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\CMakeFiles\b16c681d098d89377f86e7eb3427e6e6\flutter_assemble.rule' exited with code 1. [C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\flutter\flutter_assemble.vcxproj]
Building Windows application...
Exception: Build process failed.

@erikas-taroza not sure if its this packages fault but got this error after upgrading to audoitags 1.1.1 (previously using 1.1.0).
lib/main.dart(16,7): error GC9768DF9: Undefined name 'NotificationActions'. [C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\flutter\flutter_assemble.vcxproj]
lib/main.dart(17,7): error GC9768DF9: Undefined name 'NotificationActions'. [C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\flutter\flutter_assemble.vcxproj]
lib/main.dart(14,5): error GC6690633: No named parameter with the name 'androidCompactPlaybackActions'. [C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\flutter\flutter_assemble.vcxproj]
lib/utils/utils.dart(34,30): error G75B77105: Member not found: 'Icon'. [C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\flutter\flutter_assemble.vcxproj]
lib/utils/utils.dart(35,24): error G75B77105: Member not found: 'Png'. [C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\flutter\flutter_assemble.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): error MSB8066: Custom build for 'C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\CMakeFiles\346ec51341759c40164bbd4237fd13ff\flutter_windows.dll.rule;C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\CMakeFiles\b16c681d098d89377f86e7eb3427e6e6\flutter_assemble.rule' exited with code 1. [C:\Users\sani\Documents\GitHub\simple_music_player\build\windows\flutter\flutter_assemble.vcxproj]
Building Windows application...
Exception: Build process failed.

Please read the changelog. Breaking changes were added.

@erikas-taroza please follow semver rule 0.[breaking change].[bug fix]
Sorry, it was my fault to not check my code beforehand.

@erikas-taroza please follow semver rule 0.[breaking change].[bug fix]

Ah sorry. I will keep in mind :)

@erikas-taroza didn't really solve the problem, I'm trying it in brand-new instance in a vm. do I have to do any setup beforehand?

@erikas-taroza didn't really solve the problem, I'm trying it in brand-new instance in a vm. do I have to do any setup beforehand?

Should work OOTB. Maybe you need to update the Windows SDK via Visual Studio?

authors: erikas-taroza sanihaq

repo: erikas-taroza/audiotags


text:
Conflict between class mocks and partial mocks

It seems that adding a partial mock will disable an existing class mock. We had a test case similar to the one below, where we wanted to mock access to a shared object and then mock a method on that shared object.
@interface TestClassWithClassMethods : NSObject
@property (copy, nonatomic) NSString *identifier;
@end

@implementation TestClassWithClassMethods
+ (instancetype)sharedObject {
  static TestClassWithClassMethods *sharedObject = nil;
  static dispatch_once_t onceToken;

  dispatch_once(&onceToken, ^{
    sharedObject = [[self alloc] init];
    sharedObject.identifier = @"shared object";
  });
  return sharedObject;
}
@end

@interface OCMockObjectClassMethodMockingTests : XCTestCase
@end

@implementation OCMockObjectClassMethodMockingTests
- (void)testClassAndPartialMock {
  TestClassWithClassMethods *mockObject = [[TestClassWithClassMethods alloc] init];
  mockObject.identifier = @"mock object";
  id mock = [OCMockObject mockForClass:[TestClassWithClassMethods class]];
  [[[[mock stub] classMethod] andReturn:mockObject] sharedObject];

  [[[OCMPartialMock([TestClassWithClassMethods sharedObject]) stub] andReturn:@"mocked method"] identifier];

  NSString *identifier = [TestClassWithClassMethods sharedObject].identifier;
  XCTAssertEqualObjects(identifier, @"mocked method", @"expected \"mocked method\", got \"%@\"", identifier);
}
@end

When setting up the partial mock:
[[[OCMPartialMock([TestClassWithClassMethods sharedObject]) stub] andReturn:@"mocked method"] identifier];

the sharedObject is the one we mocked out with the class mock, and it ends up with the partial mock as expected. However, the class mock is also disabled, so future calls to sharedObject go through to the real shared object instead of hitting the mocks.
I saw that you can only have one class mock on a class at a time (http://ocmock.org/reference/#advanced-topics) – is that true for a partial mock and class mock as well? If so, it would be really useful to have an assert to help catch that.

This is expected behaviour. Partial mocks are class mocks and OCPartialMockObject inherits from OCClassMockObject. The documentation clearly says that only one mock object should mock class methods on a given class. I know this is awkward but the alternatives seem worse.
On the bright side, there is a simple solution in your case: simply use the partial mock to stub the class method:

(void)testClassAndPartialMock {
TestClassWithClassMethods *mockObject = [[TestClassWithClassMethods alloc] init];
mockObject.identifier = @"mock object";
id mock = OCMPartialMock(mockObject)
[[[[mock stub] classMethod] andReturn:mockObject] sharedObject];
[[[mock stub] andReturn:@"mocked method"] identifier];
NSString *identifier = [TestClassWithClassMethods sharedObject].identifier;
XCTAssertEqualObjects(identifier, @"mocked method", @"expected "mocked method", got "%@"", identifier);
}

What would you think about adding an assert when two class mocks are added to the same class? This issue caused a really subtle and hard to track bug in our test suite. I'd be happy to provide the patch.

There is an obvious place in the code where to do this: https://github.com/erikdoe/ocmock/blob/master/Source/OCMock/OCClassMockObject.m#L85-88
However, there is a reason why the code is as it is. It is basically the consequence of another design decision. In OCMock you use the same kind of mock object to mock class methods and instance methods. And because it is often necessary to have two mock objects for the same class, when mocking instance methods, not allowing two mocks for the same class is just not practical.
The ideal solution would be to allow two mock objects to mock class methods on the same class. That's not so straight forward. Have a look at the code and see if you can think of a solution for that case.

Here's a work-in-progress branch for getting two class mocks working at once: https://github.com/mglidden/ocmock/commits/mglidden-double-the-mocks
There are still a few things to fix (expectations don't work yet, and releasing the original class mock won't stop its stubs from firing) but I think the basic approach will work.

Thanks for the outline of a solution. It does look like it can be made to work along these lines. That said, have you had a chance to look into this further and address the known problems? I'm asking because I have been super busy otherwise, and I'm not sure I can take this over from where it is at right now, at least not for a while.

In the meantime it occurred to me that it is possible to copy the stubs from the previous mock for the class to the new one. Somehow like this:
- (void)prepareClassForClassMethodMocking
{
    ...

    /* copy class method stubs from other mock */
    if(otherMock != nil)
    {
        for(OCMInvocationStub *s in [otherMock stubs])
        {
            if([s recordedAsClassMethod])
                [self addStub:s];
        }
    }
}

Of course, this is not entirely correct because now the lifetime of these stubs would be determined by the new mock and not the one that they were added with. However, it would solve this common problem and we're "safe" because the documentation simply says the effect of using two mocks to manipulate the same class is undefined. We'd just change the undefined behaviour Any opinions? Anything that I'm missing?

That would work, but I feel that the new behavior might be more confusing that the current one, since stopMocking wouldn't work on the first one anymore (and calling it on the second would would disable the first one). We ran into this issue when a global mock (setup at the start of our test suite) conflicted with a local mock for a single test. This new behavior would have still given us a bug.
I'm close to a solution – just a couple more bugs to squash.

I am confused. This doesn't work:
TMLoginManager *loginManager = [TMLoginManager new]; // paste here id classMock = OCMClassMock([TMLoginManager class]); OCMStub([classMock sharedInstance]).andReturn(loginManager); id loginManagerMock = OCMPartialMock(loginManager); // cut XCTAssertEqual([TMLoginManager sharedInstance], loginManager);
But if you move the line (see comments) then it works just fine.

This is expected behaviour.

I find this very unintuitiv. If it can be improved I would love to have it different than now.
And now I here that there can

As explained above, I would also like to improve it but I don't know how. The alternatives seem worse at this stage.

authors: erikdoe judos mglidden

repo: erikdoe/ocmock


text:
Python code standard

It would be nice if project would follow common python coding standards
$ pep8 . | wc -l
1080
$ pep257 . 2>&1 | wc -l
264

Thanks. I will try to get around to fixing this soon.

authors: eriklindernoren kmmbvnr

repo: eriklindernoren/ML-From-Scratch


text:
Feature/buttonfix

Review plz

Något är weird, 44 filer ändrade...
Den första commiten du gjorde inkluderar väääldigt mycket!

authors: JoacimNilsen erikpantzar

repo: erikpantzar/starting-strength


text:
Normalize FieldArray

How do I need to use FiledArray to get such data:
[{ "input1value" : input2value }].
But not [{ "key": input1value, "value": input2value }]
const renderField = ({ input, type, meta: { touched, error } }) => (

    <input
      {...input}
      className={css.stringField}
      type={type}/>
    {touched && error && {error}}

);

const MappingFields = ({title, fields, meta: { touched, error }}) => {
  return (

{title}

        {fields.map((method, index) =>

            <Field
              name={`${method}.key`}
              type="text"
              component={renderField}/>

            <Field
              name={`${method}.value`}
              type="text"
              component={renderField}/>

 fields.remove(index)}/>

        )}

 fields.push({})}>+ Add

  );
};

...
<FieldArray
    component={MappingFields}
    name="contentGroupings"
    title=""
/>

@rusandreev you can make a component that handles the entire value of e.g. contentGroupings[0]. So e.g.
class RenderField extends React.Component {
  constructor() {
    this.state.value = {}
  }

  onChangeKey = (key) => {
    this.setState({ key }, () => this.props.input.onChange(this.state.value))
  }

  onChangeValue = (value) => {
    this.setState({ value }, () => this.props.input.onChange(this.state.value))
  }

  render() {
    const ({ input, meta, ...custom }) = this.props

  return (

       <input value={input.value.key} onChange={this.onChangeKey}>
       <input value={input.value.value} onChange={this.onChangeValue}>

  )
}

Because these types of use cases are fairly use-specific, it is difficult to put tooling like this into the library itself, however if you can formulate a general problem statement from this, please don't hesitate!

As this issue is old, I'm going to eagerly close it, however feel free to re-open if necessary.

authors: danielrob rusandreev

repo: erikras/redux-form


text:
How to contribute?

Hi,
I've made an update to allow a fallback to plain text when the query source doesn't support a RichMessage.  I'm trying to run the tests, but calling phpunit from the cloned repository directory gives me the error:
Cannot open file "/var/www/common/dialogflow-fulfillment-webhook-php/vendor/autoload.php".
I see there is a require-dev section in composer.json, but I'm not too familiar with the ins-and-outs of composer or phpunit.  Is there an easy way to resolve this so I can write a new test and contribute a pull request?

Have you tried run vendor/bin/phpunit under /var/www/common/dialogflow-fulfillment-webhook-php? like so,
$ cd /var/www/common/dialogflow-fulfillment-webhook-php
$ vendor/bin/phpunit

That did it.

authors: eristemena quasipickle


text:
Less lines on console

I output the lager logs on console and it is flooded with poor formatted outputs
Formatting with ~p tries to break after 80 chars, so my output looked like this:
09:07:23.201 [error] Lager failed to install handler lager_journald_backend into lager_event, retrying later : {'EXIT',
                                                                                {undef,
                                                                                [{lager_journald_backend,
                                                                                init,
                                                                                [[{level,
                                                                                debug}]],
                                                                                []},
                                                                                {gen_event,
                                                                                server_add_handler,
                                                                                4,
                                                                                [{file,
                                                                                "gen_event.erl"},
                                                                                {line,
                                                                                434}]},
                                                                                {gen_event,
                                                                                handle_msg,
                                                                                5,
                                                                                [{file,
                                                                                "gen_event.erl"},
                                                                                {line,
                                                                                279}]},
                                                                                {proc_lib,
                                                                                init_p_do_apply,
                                                                                3,
                                                                                [{file,
                                                                                "proc_lib.erl"},
                                                                                {line,
                                                                                240}]}]}}

This commit changes it to
09:18:08.396 [error] Lager failed to install handler lager_journald_backend into lager_event, retrying later :
  {'EXIT',{undef,[{lager_journald_backend,init,[[{level,debug}]],[]},
                  {gen_event,server_add_handler,4,[{file,"gen_event.erl"},{line,434}]},
                  {gen_event,handle_msg,5,[{file,"gen_event.erl"},{line,279}]},
                  {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}}

which does not flood the console so fast.

If the newline is not wanted then we need a higher number, like ~230p .

I'm sympathetic to this change, but I'm wary of using 100 columns. Can we make it "~n~p" and add a comment that we're using a newline so the stack trace is easier to read?

@Vagabond pointed out that lager has a formatter for this kind of message already which is in error_logger_lager_h:format_reason/1 so we should use that.

I'm going to close this PR due to lack of activity.  Thanks for the patch.

repo: erlang-lager/lager


text:
Enabling ppc64le support

The current version of the library supports ppc64 big-endian, but does not support ppc64 little-endian. I am trying to enable ppc64le support (see https://github.com/pozdneev/Simd/tree/enabling-ppc64le-support).
@ermig1979, Could you please advise on the endianness-sensitive code?
These are the tests that fail:
-fe=AddFeatureDifference \
-fe=BgraToBayer \
-fe=BgraToYuv420p \
-fe=BgraToYuv422p \
-fe=BgraToYuv444p \
-fe=BgrToYuv420p \
-fe=BgrToYuv422p \
-fe=BgrToYuv444p \
-fe=Bgr48pToBgra32 \
-fe=AveragingBinarization \
-fe=ConditionalCount16i \
-fe=ContourMetricsMasked \
-fe=AlphaBlending \
-fe=MeanFilter3x3 \
-fe=GaussianBlur3x3 \
-fe=SobelDx \
-fe=SobelDy \
-fe=ContourMetrics \
-fe=Laplace \
-fe=HistogramMasked \
-fe=HogDirectionHistograms \
-fe=NeuralConvert \
-fe=VectorProduct \
-fe=ReduceGray5x5 \
-fe=ShiftBilinear \
-fe=GetStatistic \
-fe=GetRowSums \
-fe=GetColSums \
-fe=GetAbsDyRowSums \
-fe=GetAbsDxColSums \
-fe=ValueSum \
-fe=SquareSum \
-fe=CorrelationSum \
-fe=TextureBoostedSaturatedGradient \
-fe=TextureBoostedUv \
-fe=Yuv444pToBgr \
-fe=Yuv422pToBgr \
-fe=Yuv420pToBgr \
-fe=Yuv444pToHue \
-fe=Yuv420pToHue

So far, I modified (see https://github.com/ermig1979/Simd/compare/master...pozdneev:enabling-ppc64le-support):
src/Simd/SimdLoad.h
src/Simd/SimdMath.h
src/Simd/SimdStore.h
src/Simd/SimdVmxFill.cpp

I write here some notes about you code:
    template <> SIMD_INLINE v128_u8 Load<false>(const uint8_t * p)
    {
#ifdef __LITTLE_ENDIAN__
        return vec_vsx_ld(0, p);
#else
        v128_u8 lo = vec_ld(0, p);
        v128_u8 hi = vec_ld(A, p);
        return vec_perm(lo, hi, vec_lvsl(0, p));
#endif
    }

I tried to use vec_vsx_ld(0, p). I did it for Power7 (maybe in case of Power8 and Powe9 this instruction has another behavier). If input address is not aligned then vec_vsx_ld is performed is very slowly (about in 1000 times). Instruction vec_vsx_st has the same behavier. So I avoid to use them. So I avoid to use them. In your case the loading of unaligned vector is the same for BIG_ENDIAN and LITTLE_ENDIAN.

The main difference between BIG_ENDIAN and LITTLE_ENDIAN is using of constants for bytes manipulation. I see problem in the following constants (the list is not full of course) in file SimdConst.h:
 const v128_u8 K8_PERM_UNPACK_LO_U8 = SIMD_VEC_SETR_EPI8(0x10, 0x00, 0x11, 0x01, 0x12, 0x02, 0x13, 0x03, 0x14, 0x04, 0x15, 0x05, 0x16, 0x06, 0x17, 0x07);
 const v128_u8 K8_PERM_UNPACK_HI_U8 = SIMD_VEC_SETR_EPI8(0x18, 0x08, 0x19, 0x09, 0x1A, 0x0A, 0x1B, 0x0B, 0x1C, 0x0C, 0x1D, 0x0D, 0x1E, 0x0E, 0x1F, 0x0F);

 const v128_u8 K8_PERM_UNPACK_LO_U16 = SIMD_VEC_SETR_EPI8(0x10, 0x11, 0x00, 0x01, 0x12, 0x13, 0x02, 0x03, 0x14, 0x15, 0x04, 0x05, 0x16, 0x17, 0x06, 0x07);
 const v128_u8 K8_PERM_UNPACK_HI_U16 = SIMD_VEC_SETR_EPI8(0x18, 0x19, 0x08, 0x09, 0x1A, 0x1B, 0x0A, 0x0B, 0x1C, 0x1D, 0x0C, 0x0D, 0x1E, 0x1F, 0x0E, 0x0F);

Obviously for LITTLE_ENDIAN these constant must have another values.

@ermig1979, thank you for your comments!

The non-aligned loads should be much faster on little-endian P8 and P9. Moreover, the usage of vec_lvsl() is deprecated on little-endian. I will put a reference to an official ABI document into the code later.
I adjusted K8_PERM_UNPACK_LO_U8, K8_PERM_UNPACK_HI_U8, K8_PERM_UNPACK_LO_U16, K8_PERM_UNPACK_HI_U16, and K8_PERM_MUL_HI_U16. It helped to fix a lot of tests!

This is the current list of tests that fail:
'BgraToBayer'
'BgraToYuv420p'
'BgraToYuv422p'
'BgraToYuv444p'
'Bgr48pToBgra32'
'AveragingBinarization'
'NeuralConvert'
'ShiftBilinear'
'GetStatistic'
'Yuv444pToBgr'
'Yuv422pToBgr'
'Yuv420pToBgr'
'BgrToYuv420p'
'BgrToYuv422p'
'BgrToYuv444p'
'ReduceGray4x4'
'Yuv444pToHue'
'Yuv420pToHue'

I have not yet checked what is wrong there.
There is also a minor issue in VectorProduct that I overlooked. I will need to roll my commit back. I believe, I know how to fix that.
I will keep you posted. Meanwhile, if you recall any further places in the code that might be endianness-sensitive, please, let me know.

BgraToBayer  - there are a constants in file SimdVmxBgraToBayer.cpp (I would recommend to search there).
Other functions also have permute constants witch assuming BIG_ENDIAN.

@ermig1979 , thank you I'll check.
BTW, GetStatistic was failing because of an issue with a compiler. I filed a bug there and switched to another version of a compiler.


text:
Does it work on wayland?

Hello
I've followed the instructions but I can't get any transparency
After checking what the install script did, the chome folder contains all the css files, and the user.js file contains the right settings.
I did try enabling/disabling the dark theme a few times. Restarting thunderbird didn't help.
Starting thunderbird with or without MOZ_ENABLE_WAYLAND=1 doesn't help. Setting the option to MOZ_ENABLE_WAYLAND=0 just gives a greyer background.
Is a specific version of thunderbird required? I'm using 102.9.0-1 on arch with hyprland
Thanks for any help or suggestion!

I got the same problem on Wayland using TB version 128.1.1esr on NixOS.

authors: Hafflationist csdvrx

repo: eromatiya/thunderblurred


text:
Serialize contents of a message

Add additional fields to message logging and serialize contents
Do not let a failed write to InfluxDb crash system + version update

LGTM :+1:

authors: erwinvaneyk trensen

repo: erwinvaneyk/distributedrmi


text:
Fixed minor errors

This PR includes minor error fixes for updating to es2023:

Fixed typo
Error fix about numeric equality operation between mathematical value and ±Infinity

The result of this PR:
fail.json : 661 lines → 37 lines

Typo in rule.json in src/main/resources/manuals/default/:

- "Return a new Symbol whose [[Description]] is _descString_.": "return (new descString)",
+ "Return a new Symbol whose [[Description]] is _descString_.": "return (new 'descString)",

which occured many errors including "[InterpreterError] assertion failure: (? argument: \"Object\")".
Found by checking INTRINSICS.Symbol.ir:
def <BUILTIN>:INTRINSICS.Symbol(
  this: ESValue,
  ArgumentsList: List[ESValue],
  NewTarget: Object | Undefined,
): Unknown {
  if (< 0 ArgumentsList.length) let description = (pop < ArgumentsList) else let description = absent
  if (! (= NewTarget undefined)) {
    return comp[~throw~/~empty~]((new OrdinaryObject("Prototype" -> @EXECUTION_STACK[0].Realm.Intrinsics["%TypeError.prototype%"], "ErrorData" -> undefined)))
  } else {}
  if (= description undefined) {
    let descString = undefined
  } else {
    call %0 = clo<ToString>(description)
    let descString = [? %0]
  }
  return (new descString()) // should return (new 'descString)
}

Some errors about equality operation between mathematical value and ±Infinity.
For example:

"[InterpreterError] wrong type for the operator ==: -1.0 and Infinity"

This error could be fixed by adding some cases in eval function in src/main/scala/esmeta/interpreter/Interpreter.scala:
+ case (Equal, POS_INF, Math(_))     => Bool(false)
+ case (Equal, Math(_), POS_INF)     => Bool(false)
+ case (Equal, NEG_INF, Math(_))     => Bool(false)
+ case (Equal, Math(_), NEG_INF)     => Bool(false)

There are two remaining major errors:

Unicode version problem: The latest unicode version is 15.0.0 but the current esmeta supports up to 14.0.0
Mathematical value precision problem: "[InterpreterError] return not undefined: #4064"

Unicode version should be updated.
Test tests/test262/test/language/expressions/equals/bigint-and-number-extremes.js seems to be solved manually in src/main/resources/manuals/default/test262/categorized.json

fail.json : 661 lines → 37 lines

Is it still a valid result?
I performed test262-test on this branch as follows:
esmeta test262-test -test262-test:progress -test262-test:concurrent -test262-test:log

And, the following summary is produced:
- time: 734,509 ms [12:14]
- total: 49,741
  - not-supported (N): 28,753
  - fail (F): 7
  - pass (P): 20,981
- pass-rate: P/P+F = 20,981/20,988 (99.97%)

Only 7 cases failed. Am I missing something?

I run test262-test again using
esmeta test262-test -test262-test:progress -test262-test:concurrent -test262-test:log

and it says the following summary with 35 lines of fail.json.
- time: 1,463,729 ms [24:23]
- total: 49,741
  - not-supported (N): 28,743
  - fail (F): 27
  - pass (P): 20,971
- pass-rate: P/P+F = 20,971/20,998 (99.87%)

By comparing two fail.json file in KU-PLRG Google Drive, eval-230905_09_08/fail.json and eval-230905_12_21/fail.json(my case) have difference of 'StackOverflowError'. I think this error might stem from testing environment.
And I still don't know why #issue-1872887831 had 37 lines of fail.json. Mine was 35 lines (with 27 fail cases)

Now, we can retrieve following summary:
- time: 1,783,837 ms [29:43]
- total: 49,741
  - not-supported (N): 28,769
  - fail (F): 1
  - pass (P): 20,971
- pass-rate: P/P+F = 20,971/20,972 (100.00%)

with one remaining error from fail.json:
{
  "No result when parsing failed" : [
    "language/destructuring/binding/syntax/property-list-followed-by-a-single-comma.js"
  ]
}

Should we resolve this error manually?

I checked this test, and it failed when parsing the first parameter {x,} with ObjectBindingPattern. I will let you know how to debug parsing bugs later.

I merged this PR. Thanks! 👍🏻

authors: d01c2 jhnaldo minseok-choe

repo: es-meta/esmeta


text:
import in referenced typescript project fail to load

Bug description

When working with composite projects, our tests failed because it seems that tsx is not taking the reference project's baseUrl or path into consideration.
Reproduction

Test project:
https://github.com/steabert/esbuild-kit-tsx-composite.git
To reproduce the issue:
yarn install
yarn fail

Running yarn bundle and yarn types shows the result with e.g. esbuild or tsc.
It seems this does not work with ts-node either, but I don't know how they handle composite typescript projects.
Environment
npx envinfo --system --npmPackages tsx --binaries
System:
  OS: Linux 5.4 Ubuntu 20.04.4 LTS (Focal Fossa)
  CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
  Memory: 23.58 GB / 31.21 GB
  Container: Yes
  Shell: 5.0.17 - /bin/bash
Binaries:
  Node: 16.14.2 - ~/.node/bin/node
  Yarn: 3.2.3 - ~/.npm-global/bin/yarn
  npm: 8.5.0 - ~/.node/bin/npm
npmPackages:
  tsx: 3.9.0 => 3.9.0

Can you contribute a fix?

[x] I’m interested in opening a pull request for this issue.

Also, looks similar to #76 maybe?

Yes, this is the same problem as reported in #76. unlike esbuild, tsx ignores tsconfig.json in referenced packages.

How does esbuild handle custom tsconfig.json paths via the tsconfig CLI flag for multiple projects?
e.g. If project A uses tsconfig.a.json and its dependency project B uses tsconfig.b.json, how is it configured?

I don't need to specify any configuration, esbuild seems to find the correct tsconfig associated with an imported module. However, I think it only does that when bundling. I forgot where I read that, I think it was in the comments on one of the esbuild issues, I'll try to find it again.

My own (naive?) way would be to walk up the directory tree of an imported file if there is no associated tsconfig, and if a new tsconfig.json file is found, check its include files and cache it for later use. That way, each included file would have an associated tsconfig file.

My question is more about API design than your specific use-case.
Understanding how esbuild's API handles custom tsconfig.json paths across multiple projects would help.

The esbuild author replied in my issue, but that seems to be also about how esbuild itself finds tsconfig files. That doesn't seem to be the info you're after, I'm afraid I haven't dealt with the esbuild API at all.

To be fair, you asked him a different question from the one I asked you.
I don't have time for this now, but if you're interested in helping, you can investigate by setting up a project with the structure I described here and trying to make it work with esbuild. Maybe @IlyaSemenov can help.
Based on what Evan said, I'm skeptical if esbuild is also following TS behavior correctly (not that tsx currently is either). For example, does it even allow for custom tsconfig.json paths? And does it check against tsconfig.json#files/includes/excludes?

We are also running into this problem. I might be able to help but I'm not sure what you mean by

you can investigate by setting up a project with the structure [...] and trying to make it work with esbuild.

How does esbuild handle custom tsconfig.json paths via the tsconfig CLI flag for multiple projects?
e.g. If project A uses tsconfig.a.json and its dependency project B uses tsconfig.b.json, how is it configured?

Like @steabert described, with esbuild it already works. Do you want to know whether it still works if we additionally specify tsconfigs manually, even though that's not required?

I'm skeptical that esbuild would successfully build. My understanding is that it only detects tsconfig.json, and not tsconfig.b.json.
To prove that this works, please create a repository containing a monorepo with two tsconfigs under custom names and add a build script to demonstrate that esbuild can successfully build it. If you'd like, you can reuse https://github.com/steabert/esbuild-kit-tsx-composite but rename the tsconfig.json of the dependency and test if it builds.
And if that doesn't build, please find out what configuration esbuild offers to specify a custom tsconfig.json name.

We should figure out how custom tsconfig paths are handled in nested projects: https://github.com/esbuild-kit/tsx/issues/96#issuecomment-1253726116

I am not following why the custom configs matter so much? It would suffice if nested projects worked at least with default configs. Supporting custom configs in nested projects could be the Phase 2 implemented by whoever cares about that use case.
Chances are esbuild doesn't support custom configs in nested projects at all, then what? That doesn't prevent it from working with default configs; and neither should it prevent tsx from supporting the same case.

I am not following why the custom configs matter so much? It would suffice if nested projects worked at least with default configs.

Why it matters: https://github.com/esbuild-kit/tsx/issues/76#issuecomment-1274526403
tsx has a lot of users and handles many use-cases. Custom tsconfig files are very common so I think the more appropriate question you should be answering is "why should we dismiss those use-cases without even doing an hour of research?".

Supporting custom configs in nested projects could be the Phase 2 implemented by whoever cares about that use case.

FYI, I don't benefit from this use-case but I'm happy to implement it in the future. With regards to your attitude, I'm wondering why you haven't implemented this yourself? As with anything open-source, you should also feel free to implement it yourself and use your own fork.

Chances are esbuild doesn't support custom configs in nested projects at all, then what? That doesn't prevent it from working with default configs; and neither should it prevent tsx from supporting the same case.

That's fine too. But no one has provided a definitive answer with research.
When I decide to take this on, I would like to think of the best solution possible and would investigate different use-cases and solutions. Since ya'll are asking how you can help, I provided one of the questions I would research.

I'm not sure how this thread will be productive if my answers to your "how can I help?" is met with "why is that important?".
If no one is going to provide insight into potential problems and how other projects handle it, it might be best to lock this thread until I'm ready to tackle it and do the research myself.

Thank you for the response. I apologize if I sounded rude. I know how open-source works, I authored and support a number of npm and python modules myself, and I am happy to provide users the right direction if they ask (or point them where they're wrong).
My point here was that making fully broken system half-broken would still be a good thing. I gathered that the current implementation blocker was that it wasn't clear how to configure esbuild to use different tsconfig's in different sub-projects. In my thinking that should not be a blocker even if that's not possible.
I did make the initial research back then when you asked the first time and it immediately appeared that the public esbuild API only allowed to customize the root/entrypoint tsconfig: https://esbuild.github.io/api/#tsconfig
I didn't share that finding as it appeared too obvious for me.
In light of that, I was merely asking if you could provide your initial high level thoughts of where the source could be extended to load paths from nested tsconfigs (considering the limitation of not being able to use custom-name tsconfig), outline the frames of the possible required architectural changes. I surely understand it's not always possible to answer that kind of questions, but sometimes it is.

Hello everyone 👋,
I also hit this issue. There is no way to specify custom tsconfig.<whatever>.json config files for external packages bundled with esbuild. It only looks for the regular tsconfig.json.
As far as I understand, just supporting the regular tsconfig.json files would solve my issue. For that, we should not pass an explicit  --tsconfig option when calling esbuild, as it will use this single tsconfig file and ignore all the others.
So paths defined in tsconfig.json can work but in a limited way (every tsconfig files need to be named tsconfig.json, including the root one).
Do you think we could add an option to enable this behavior? Maybe --resolve-tsconfigs or something like this?
I'm happy to make a PR if you can point me to the relevant files! 😄

If people are stuck on this, I had success with vite-node combined with vite-tsconfig-paths.
It also plays nice with vitest as it's reusing the same pipeline. 👍

I'm very sorry for this triple post, but I played some more with my TypeScript monorepo and I think I gained interesting insights for this issue.
Big picture

tldr; TypeScript project references are the way to hint about which tsconfig.json file to apply to parts of the dependency chain

First, the "one true way" of connecting TypeScript projects together is project references. This is the only mechanism that enables TypeScript to split the dependency chain between multiple TypeScript projects and use each project's tsconfig.json.
Custom tsconfig.json files are handled by this mechanism as well:
{
    "compilerOptions": {
        // The usual
    },
    "references": [
        { "path": "../api/tsconfig.build.json" },
        { "path": "../sdk/tsconfig.whatever.json" },
    ]
}

Without references, if you require a TypeScript file from an external package (through either monorepo workspaces or paths alias, I personally recommend avoiding paths alias as you break your package isolation), only the tsconfig.json file of the root package will be used, this is why external packages paths alias break, because the root package is not aware of their internals (and it should not be 😄).
How to have this implemented in tsx
Project references were discussed in esbuild repository, and the conclusion was that it's beyond the scope of esbuild, but could be implemented as a plugin!
A plugin exists: esbuild-plugin-ts-references but it's not working on paths alias, it's only rewriting the import statements to link directly to the references. But it shows that it's possible with esbuild API to walk through each package's tsconfig.json by following references and build some kind of map.
So the solution would be to write an esbuild plugin similar to esbuild-plugin-ts-references that can rewrite imports based on the file's local tsconfig.json gathered through references analysis. The main blocker is that tsx is using esbuild's Transform API and not the Build API, so it can't consume a plugin.
@privatenumber How hard of a requirement is it to use the Transform API vs the Build API? Reading esbuild doc it seems like Transform is just a small subset of Build?
Another solution would be to have tsx do the references analysis work outside of esbuild to build the map and then apply the rewrites somehow with the Transform API, but I'm not familiar with it enough to know if it's possible. 😅

I opened PRs to esm-loader and cjs-loader to support project references which should solve this issue.
@steabert @IlyaSemenov If you can give it a try it would be great! 👍

I was able to get this working using a custom exports field on all my monorepo package.json files, and then passing conditions to tsx:
  "exports": {
    ".": {
      "bundler": "./src/index.ts",
      "default": "./out/index.js"
    }
  }

Then
tsx --conditions=bundler ...

I had a similar issue in a monorepo where path aliases of imported workspaces were not being resolved using their own tsconfig.json. I think tsx should be able to detect the config file associated with each module, so I changed this behavior locally and here's my version of src/utils/tsconfig.ts:
import { getTsconfig, createPathsMatcher } from 'get-tsconfig';

const configCache = new Map<string, any>();

export function fileMatcher(filename: string) {
  return getTsconfig(filename, 'tsconfig.json', configCache)?.config;
};

export function tsconfigPathsMatcher(specifier: string, parentPath: string = process.cwd()) {
  const resolvedConfig = getTsconfig(parentPath, 'tsconfig.json', configCache);
  return resolvedConfig
    ? createPathsMatcher(resolvedConfig)!(specifier)
    : [];
};

export const allowJs = false;

export const loadTsconfig = (configPath?: string) => {};

The idea is that when fileMatcher or tsconfigPathsMatcher are called they use a reference file path to resolve the appropriate tsconfig.json. Note that I had to add an argument to tsconfigPathsMatcher and change its calls. This code suits my needs and I don't know tsx enough to provide a pull request. To continue on this approach one would have to:

Change the logic of the allowJs export to be dynamic.
Completely remove loadTsconfig.
Continue supporting tsx tsconfig option and define a logic to support both strategies.

Another approach could be to change the get-tsconfig package to handle project references. In monorepos we can have a root tsconfig that references every workspace tsconfigs. Given a root tsconfig and a specified file path get-tsconfig could generate a config that represents all the options applied to it. This way we could provide a single config in tsx options.

Why was my comment marked off-topic when I directly provided a solution to this issue and some of the related issue that were closed in favor of this one?
This issue was created 2 years ago and have been inactive for a year and a half. Rejecting contribution at this point is just ridiculous.
@privatenumber you insist on this project being open-source and yet you disregard contribution that does not satisfy your exclusive scrutiny. This issue is not about esbuild, it's about tsx. If you don't agree that my contribution is the way to go then someone else certainly might.
You mentioned that the maintenance of these threads uses your time. Don't forget that very often these issues save time for users that are still looking for a solution. Your contribution of marking my contribution off-topic is likely to waste someone's time. I think your contribution is off-topic.

@guillaume-macquat

Why was my comment marked off-topic when I directly provided a solution to this issue and some of the related issue that were closed in favor of this one?

I understand your frustration, but your comment appeared to be more of a workaround than a step towards a concrete solution for tsx itself. It also didn't indicate any intent or effort to contribute to the codebase, which is a crucial aspect of this project's collaborative nature. For instance, you said:

This code suits my needs and I don't know tsx enough to provide a pull request.

In the future, I would recommend starting by asking how you can contribute these changes into tsx instead and I'd be happy to guide you.
I encourage you to read the Contribution Guide, which outlines how to contribute effectively and engage in discussions that help move the project forward.

Don't forget that very often these issues save time for users that are still looking for a solution.

I understand and appreciate that sharing workarounds can sometimes be helpful. However, this repository isn't intended as a forum for one-off solutions without contributing to the core code. The Issues tab is specifically for tracking concrete changes or improvements to tsx, and keeping the focus there ensures better organization and maintainability.
I also want to address the tone of your comment, which came off as confrontational. I value open discussions, but they need to remain respectful and productive. I'd recommend adopting a more collaborative tone to foster a positive conversation in any community.
With that said, I'll be hiding off-topic comments (including mine) and locking this thread, as this issue will be addressed in the upcoming major release.

authors: IlyaSemenov guillaume-macquat jgoux mtqperson pokey privatenumber steabert

repo: esbuild-kit/tsx


text:
Unable to generate tag from a repository without previous tag

Describe the bug
When you run the tag-and-push script on a repository without any previous tag/release, the script is unable to generate the initial version.
Steps to reproduce

Create or use any Github repository that doesn't have any tag/release
Run the tag-and-push script

Expected behavior

Read all repository commits since the first one
Show all the changes since repository creation
Show the new SemVer number base on commits messages, or suggest a first version when there's no previous

Actual behavior

Don't show any change
Suggest a tag without SemVer

Yikes, this is a nasty bug. Let's fix it.
According to the SemVer spec, it is recommended to start at 0.1.0, so we should adopt that as the initial version.

repo: escaletech/releaser


text:
Decorations Refactor

Summary
Bring over the original set of chart decorations.
Actual Behavior
Expected Behavior
Decorations from original continue to work, subject to refactor.
Additional Details

The ValueBand was actually easier to implement with the magic of ExpressionAnimation.

repo: escape-llc/yacc-composition


text:
自动化命令的疑问

请问自动化命令 这个功能是做什么用途? 希望可以了解一下这个功能

请自行研究。


text:
[BUG] "TypeError: option values must be strings" when writing apiversion to config

Describe the bug
When trying to setup pylips with an old PhilipsTV (model 42PFL6097K/12 using apiversion 1) it throws a TypeError, because in line 156 it tries to write an integer to the config.
Console output

python pylips.py --host 192.168.178.24

Checking API version and port...
Trying http://192.168.178.24:1925/6/system
Trying http://192.168.178.24:1925/5/system
Connection refused
Trying http://192.168.178.24:1925/1/system
Could not find a valid API version! Pylips will try to use ' 1 '
Traceback (most recent call last):
  File "pylips.py", line 477, in <module>
    pylips = Pylips(args.config)
  File "pylips.py", line 83, in __init__
    if self.find_api_version(self.verbose):
  File "pylips.py", line 156, in find_api_version
    self.config["TV"]["apiv"] = api_version
  File "C:\Users\davod\AppData\Local\Programs\Python\Python38\lib\configparser.py", line 1258, in __setitem__
    self._parser._validate_value_types(option=key, value=value)
  File "C:\Users\davod\AppData\Local\Programs\Python\Python38\lib\configparser.py", line 1185, in _validate_value_types
    raise TypeError("option values must be strings")
TypeError: option values must be strings

How to fix
Change line 156 to:
self.config["TV"]["apiv"] = str(api_version)

Thanks @DavidSchmidt00!
Wow, this is embarrassing - I guess I've been spending too much time with JS lately... Fixed now, sorry about that!

Thanks @DavidSchmidt00!
Wow, this is embarrassing - I guess I've been spending too much time with JS lately... Fixed now, sorry about that!

Thanks :)

Thanks :)

repo: eslavnov/pylips


text:
fix!: align Node.js version support with ESLint 9

Fixes eslint-community/eslint-utils#232 and considering the feedback in https://github.com/eslint-community/eslint-utils/issues/233#issuecomment-2357382532 it seems like there will be no real downsides to this.

Superseded by #242

authors: MichaelDeBoey voxpelli

repo: eslint-community/eslint-utils


text:
Bug: cursor in the code editor jumps to the top while typing.

What did you do?
In the code editor, I selected the code path preview option in the right pane and began typing some code.
What did you expect to happen?
The cursor should move smoothly and as intended while typing, without jumping to the top.
What actually happened?
When I started typing in the code editor, the cursor jumped to the top.
https://github.com/user-attachments/assets/e69dee87-64db-4a6a-97e3-093441e38fa9
Participation

[x] I am willing to submit a pull request for this issue.

Additional comments
No response

That is strange. I've tried on Firefox and Edge on Windows, but I'm not seeing this behavior. Do you have any browser extensions enabled that might cause this?

authors: amareshsm nzakas

repo: eslint/code-explorer


text:
Add RMT Output support

This PR adds support for the Output Channel functionality of the RMT peripheral.
Details

The (macro-heavy) implementation is generic and not solely focused on driving pulse-driven RGB LEDs.
The RMT implementation is located in the pulse_control module.
Due to the substantially different register structures of the variants, numerous macros had to be used to achieve a shared implementation.

The ESP32-C3 and ESP32-S3 seem to share a common RMT architecture with a channel either being output or input channel.
In contrast, the ESP32 and ESP32-S2 have a different architecture where any channel can be configured to be either output or input channel.
This difference results in numerous fields being assigned to different registers in different variants.

A SmartLedsAdapter implementation is provided as part of this PR that allows for the RMT peripheral to be used with the functionality provided by the external smart-leds crate.
An example hello_rgb is provided for all variants.

Limitations

The implementation requires the entire pulse code sequence to be present in memory at the time that the RMT send function is called and as such is pretty memory-demanding. This could be improved in the future by generating the pulse code data on the fly from more a more compact representation (e.g., with closures). However, this needs to be pretty performant so that it can keep up with the RMT fifo buffer refilling and the short LED cycle periods (1,2us per LED).
The SmartLedsAdapter needs to be initialized using a macro smartLedAdapter!. This is because generic const expressions are not yet supported and we need the buffer to be of sizex*24+1 with x being the numbers of LEDs. If anybody has a more elegant solution for this, please let me know.
There are three new TODO in the code, all related to the clock configuration and time types that are subject of #24 and #44.

Roadmap:

[x] Add support for ESP32-C3 variant
[x] Add support for ESP32-S2 variant
[x] Add support for ESP32 variant
[x] Add support for ESP32-S3 variant
[x] Add RMT device driver for Smart-leds crate.
[x] Cleanup

Thank you for this effort, very excited to have support for this peripheral!
I just wanted to let you know that I have released new SVDs which include your RMT patches, and have updated the esp-rs/esp-pacs's with_source branch accordingly. You should be able to revert the PACs' git dependencies whenever.

I've pushed some updates which made some small changes to a number of files you've touched, sorry about that. I hope the rebase isn't too bad, but if it's painful please let me know and I will suffer in your place 😁

I felt kind of guilty for making unnecessary work for you, so I've rebased your branch on main myself; you can find the branch here:
https://github.com/jessebraham/esp-hal/tree/feature/rmt
CI seems happy, so hopefully I haven't broken anything in the process 😅
(Also, sorry for all the comments 😁 )

Sorry that it took so long again for some progress on this. Thank you for the rebasing. I used it as basis for the final changes and then did a git squash to clean up the history.
This PR is now ready for review and merge.

Awesome! I just tried the examples w/o really looking into the code.
Works fine on the S2/S3 dev-boards. My C3 dev-boards don't have an addressable LED so I used a 16xWS2812 led-ring - also works
On ESP32 I used the same 16xWS2812 ring but there it lights up all the LEDs ... maybe just my setup however.
Will have a look with a logic analyzer

Thank you for getting this wrapped up, overall I think it looks really good! I took a cursory look at your changes but still need to do a bit more of a thorough read through.
I was able to test this for the ESP32-C3, ESP32-S2, and ESP32-S3; unfortunately I do not have an ESP32 board with an addressable LED on it, and I can't seem to find any external parts laying around either. I'll be sure to pick some up in my next order just so I'm able to test this moving forward. @bjoernQ I'd like to hear what your thoughts are on the issues with the ESP32, mainly if we should consider them blockers at this point in time. Being pre-0.1.0 I'm not sure picky about including "mostly working" things in the repo, personally.

@bjoernQ The example for the ESP32 is different in that it is supposed to address 12 RGB LEDs instead of just one as with the other examples. Also, for this example to work it's important to flash the release version as the debug version is too slow to replace up the buffer. Please let me know if on your RGB LED ring more than 12 LEDs light up when flashing the release version and I'll further investigate this on my side.
Number of expected pulses
As for the number of pulses that you observed, that's how it's supposed to be. 😆 With 12 RGB LEDs being addressed, the RMT peripheral has to send 288 pulses (= 12 LEDs * 3 channels (R,G,B) * 8 bit channel resolution) with a period of 1.2 us every 20 ms.
Why is the release version required?
The buffer for e.g. the ESP32 variant has 64 elements and we have to replace always half of it. So, after half of the buffer has been sent, we get an interrupt and have then as at most as much time as the sending of the remaining 32 elements takes to replace the first 32 entries. This is only 32 * 1.2 us = 38.4 us to detect the state and update the elements. The debug version does not seem to be fast enough to achieve that. Or my implementation is just not optimized enough. 😐

Ah I should have looked into the example a bit deeper. Still slightly surprising  😄 but with that information the amount of pulses make sense
I will recheck this tomorrow morning and also look at the code, then
Anyway a great contribution

So - I had another look and everything looks really good. After reading the code-comments of the ESP32 example (and actually soldering the connections to the LED-Ring ...) the ESP32 example works fine for me with up to 12 LEDs

Macro usage: We have the idea/desire to reduce macro usage in general where possible. That's not easy and definitely not in scope of this PR IMHO. Personally, I'm fine with that
that Utils .... it's really convenient to have that in the HAL but also a bit more than what a HAL usually does. I could imagine to have that in a separate crate like esp-smartled-adapter or something. But it's already feature-gated and can be done later (if we really decide to go that way ... it's just my very personal preference)
Thanks for the really detailed inline-documentation!

Really great work and an awesome contribution. Lots of useful things can be done with it

authors: bjoernQ ducktec jessebraham

repo: esp-rs/esp-hal


text:
Bluetooth Proxy Error

After accepting an OTA firmware update for Bluetooth Proxy (I believe it was v24.8.2), my proxy no longer works.  I see errors like this in the Home Assistant log:
WARNING (MainThread) [aioesphomeapi.connection] esp32-bluetooth-proxy-xxxxxx @ x.x.x.x: Connection error occurred: esp32-bluetooth-proxy-xxxxxx @ x.x.x.x: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (Home Assistant 2024.7.4).
A clean install onto the esp32 from https://esphome.io/projects/?type=bluetooth appears to give the same result.
I also see two different update entities on this device, similar to what was reported in #251.

Have you tried removing and re-adding the device to Home Assistant?

authors: jesserockz jhemak

repo: esphome/firmware


text:
AT MQTT 连接腾讯云失败

AT+MQTT连接腾讯云返回+MQTTDISCONNECTED:0
参照
AT+CWMODE=1
AT+CWJAP="ssid","password"
AT+CIPSNTPCFG=1,8,"ntp1.aliyun.com"
AT+CIPSNTPTIME?

AT+MQTTUSERCFG=0,1,"6H55XGVIWXdev001","6H55XGVIWXdev001;21010406;cCrBd;9223372036854775807","b007455a219557822dff54623830733363e49dce;hmacsha1",0,0,""

AT+MQTTCONN=0,"6H55XGVIWX.iotcloud.tencentdevices.com",1883,1

AT+MQTTSUB=0,"6H55XGVIWX/dev001/control",1
AT+MQTTPUB=0,"6H55XGVIWX/dev001/event","Hello\, this is esp-at!",1,0

https://blog.csdn.net/espressif/article/details/104714464/
我的log
» AT+SYSLOG=1
« AT+SYSLOG=1

OK
» AT+CIPSNTPCFG=1,8,"ntp1.aliyun.com"
« AT+CIPSNTPCFG=1,8,"ntp1.aliyun.com"

OK
» AT+CIPSNTPTIME?
« AT+CIPSNTPTIME?
+CIPSNTPTIME:Fri Jun  5 11:29:50 2020
OK
» AT+MQTTUSERCFG=0,1,"23SI6PNSS9esp32","23SI6PNSS9esp32","hmacsha256",0,0,""
« AT+MQTTUSERCFG=0,1,"23SI6PNSS9esp32","23SI6PNSS9esp32","hmacsha256",0,0,""

OK
» AT+MQTTCONN=0,"23SI6PNSS9.iotcloud.tencentdevices.com",1883,1
« AT+MQTTCONN=0,"23SI6PNSS9.iotcloud.tencentdevices.com",1883,1
+MQTTDISCONNECTED:0

ERROR
» AT+MQTTCONN?
« AT+MQTTCONN?
+MQTTCONN:0,2,1,"","","",0

OK

固件来源
https://github.com/espressif/esp-at/issues/309
https://github.com/espressif/esp-at/files/4001174/target.zip

问题解决
WIFI GOT IP
» AT+MQTTUSERCFG=0,1,"NULL","NULL","NULL",0,0,""
« AT+MQTTUSERCFG=0,1,"NULL","NULL","NULL",0,0,""

OK
» AT+MQTTCLIENTID=0,"23SI6PNSS9esp32"
« AT+MQTTCLIENTID=0,"23SI6PNSS9esp32"

OK
» AT+MQTTUSERNAME=0,"23SI6PNSS9esp32;12010126;3SYGK;1627412020"
« AT+MQTTUSERNAME=0,"23SI6PNSS9esp32;12010126;3SYGK;1627412020"

OK
» AT+MQTTPASSWORD=0,"7d986dc59927b552578b2209bdff035e6f6b834b7abd600e35023069d13517f5;hmacsha256"
« AT+MQTTPASSWORD=0,"7d986dc59927b552578b2209bdff035e6f6b834b7abd600e35023069d13517f5;hmacsha256"

OK
» AT+MQTTCONN=0,"23SI6PNSS9.iotcloud.tencentdevices.com",1883,1
« AT+MQTTCONN=0,"23SI6PNSS9.iotcloud.tencentdevices.com",1883,1
+MQTTCONNECTED:0,1,"23SI6PNSS9.iotcloud.tencentdevices.com","1883","",1

OK
» AT+MQTTSUB=0,"23SI6PNSS9/esp32/control",1
« AT+MQTTSUB=0,"23SI6PNSS9/esp32/control",1

OK
» AT+MQTTPUB=0,"23SI6PNSS9/esp32/event","Hello\, this is esp-at!",1,0
« AT+MQTTPUB=0,"23SI6PNSS9/esp32/event","Hello\, this is esp-at!",1,0

OK

你好
需要分开设置才能连接成功? 单独MQTTUSERCFG无法连接成功?

@edieruby The maximum length of an AT command is 256 bytes. It should be configured separately if the total length of MQTT username, password, clientid, ..., is too long.

@ustccw  need help in https://github.com/espressif/esp-at/issues/566#issue-998191423

authors: edieruby thisisausername-rgb ustccw

repo: espressif/esp-at


text:
ESP_LOG with no newline ?  (IDFGH-9090)

Is your feature request related to a problem?
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/log.html
this Logging Library always add a "\n" to every Printout.
is there a way to not add such ?
Describe the solution you'd like.
No response
Describe alternatives you've considered.
No response
Additional context.
No response

Not really. ESP_LOG is assumed to output a single "log message", and the formatting is handled by the log library.
You can use printf or other stdio functions if you need to get specific output format for some custom message.

I close this issue as no response, you can use printf or other stdio functions to implement any specific output format, feel free to reopen it.

authors: KonstantinKondrashov franz-ms-muc igrr

repo: espressif/esp-idf