false values in views should be coerced to zero length text nodes

I'm surprised this isn't in while undefined and null are translated — the irony is that an undefined value is more likely to be indicative of a fault in application logic (author expected a value when there was none), but Mithril papers over this, which could lead to frustration as bugs fail silently. But I digress.
Conditional logic is essential to clever views. Even the most restrictive of templating languages (consider Handlebars, used as the basis for Ember, where the prevailing attitude is decidedly against Turing-complete views) implement their own if handlers.
Mithril can't do ifs without resorting to temporary assignment or split returns, which represent an unpleasant deviation into imperative coding in an idiom that favours functional, point-free code.
Ternary operators are always possible but I'm not the first to complain at the ugliness of condition ? content :  '' — especially when success content may be voluminous it's inelegant to leave a hanging else, especially when so often the else outcome is just a dangling empty string; even more contrived is !condition ? '' : content, which makes it clearer early on that there is no else content, but introduces a lot of cruft.
The ultimate use case for false virtual nodes outputing empty text nodes is the ability to write condition && content or condition || content for simple ifs without elses.
 Wouldn't it be awesome?

The ultimate use case for false virtual nodes outputing empty text nodes is the ability to write condition && content or condition || content for simple ifs without elses.

But then, it follows that true should also yield a zero length text node, e.g. https://jsfiddle.net/0a8835be/1/ especially since foo || bar is far more intuitive than foo && bar (since "or" has a connotation of "either foo or bar, by process of elimination", but "and" has no such connotation)
I know Angular and PHP have similar behavior wrt to false, but it's more of a dev (mis?-)feature, not something you'd explicitly use for production code.
I'd like to hear what others think of this.

I recently re-started following the mailing list, and of course, the first new thread peaked my interest. Quick background: I use mithril in production to provide native-like experiences. I use npm, browserify, and cordova to target cross-platform iOS and Android apps.
This is what I have settled with:
m('div.container', [
  shouldBeHere() ? [
    m('div.child')
  ] : null,
]),

It's looks alright, albeit verbose.
I did initially attempt this, and still in some places, would prefer:
m('div.container', [
  shouldBeHere() && m('div.child')
]),

I'm on-board w/ false being equivalent to null or undefined, but allowing true to do the same feels a bit strange.
For this use-case I'm not really convinced by Leo's && vs || argument, but that seems like a pretty personal-code-style type of thing. I'd use && all over the place w/ this change and be perfectly happy w/ that.

Oh, I'm not arguing for making true yield empty text node. I'm just saying I find foo || bar clear, but not foo && bar. I agree that true yielding empty text node is weird.
What I was getting at is that special casing false makes boolean handling inconsistent (such that flipping a conditional during a refactor would cause true to print out where nothing did with a false).

Yeah, the inconsistency bugs me too.
After a lot of soul-searching over the past year or so I don't have a huge problem w/ ternaries, but something a little more terse w/o the requirement to handle the else case would really be nice.

@lhorie it took me a while to get what you're saying :)

it follows that true should also yield a zero length text node

Agreed. Handlebars does if and unless. We should allow the same (except terser, and using Javascript). Besides, for people who don't find these logical expressions intuitive, it makes a lot of sense to simply say that Booleans aren't valid virtual DOM entities and will resolve to empty text nodes — authors can use this simple rule as they see fit to abstract whatever view patterns make sense to them.
This might help elucidate the issue:
m( Header ),
authenticated && m( AdminBar ),
m( Content )

m( '.exclusive-media-item',
  m( TeaserCard, item ),
  authenticated ||
  m( 'a', {
    href : '/login'
  },
    'Log in to read exclusive content'
  )
)

Digression:

foo || bar is far more intuitive than foo && bar (since "or" has a connotation of "either foo or bar, by process of elimination", but "and" has no such connotation)

This is the part that threw me off the scent: that doesn't ring true (haha) to me. A series of AND-delimited operands will return the last operand up until either termination, or an  atomic operation evaluates to false. You might argue that that's not obvious to you and the explanation requires a deep understanding of low level language behaviour, but it's honestly totally intuitive to me (although I did have to think hard to formulate the technical description!).
if is a fundamental part of basic logic in any introduction to Javascript: unless isn't. What I'm getting at is the ability to use either of those confidently in Mithril views.

tl;dr
Let's allow the equivalent of if and unless in Mithril views via && and || respectively, by making boolean values in virtual DOM notation output empty text nodes.

hmm, maybe just write helper that print nothing? here some equivalent for if and unless that print your vdom if true, end empty if false.  Take a look here, it use church boolean encoding:
https://jsfiddle.net/syaiful6/yptL16e8/

i am not sure if we should print nothing for boolean true or false. Use simple function for that task is prefered..hehe

@syaiful6 The justification is things like this:
m(".page", [
  ctrl.admin && m(AdminButtons),
  ctrl.status === "unverified" || m(ProfileSelector),
  // etc...
])

Basically, allowing a shorthand for very simple and common cases.

Tagging w/ rewrite, since this is now implemented in v0.2.x stream

:D

What do you think of coercing NaN also to a zero length text node?

@sebastiansandqvist in what scenario would it be useful?

@pygy I view it more as a consistency issue than anything else. It's the only falsy value that gets displayed (besides 0 which obviously should be displayed).
The case I encountered is having an input[type=number] whose value determines another component's text content by some equation. While there absolutely is good value in explicitly handling the case where the output is NaN, if it ever does occur I can't think of a single case where you'd want it in the ui.

@sebastiansandqvist Could you give an example? I'm not entirely convinced it's common enough. And if necessary, you could always just do Number.isNaN(value) || m(Component).

@isiahmeadows On second thought I think it's better handled at the application level

Currently, the rewrite render engine skips null node, where the stable branch creates placeholders "" text nodes. This means that alternating between non-null and null vnodes shifts the next siblings back and forth, and is likely to cause a re-creation of the DOM nodes...
@lhorie wouldn't it be better to use placeholders as well? I suppose it would require patching both Vnode.normalize and render/render.js.

I'd forgotten about this and thought I'd pop in and try to patch the old behaviour into new.
I was surprised to find there are all sorts of hyperscript tests relating to true and false which seem to explicitly invalidate the behaviour I describe in the OP. I don't understand why these are here. My instinct was to rip them out.
The special treatment of null - which as @pygy says is a breaking change - is baffling to me.
It seems that the behaviour I advocated for which got merged into v0.2.x has diverged dramatically in v1 but this seems more to do with oversight than intention - from a git blame it seems all of these tests and the null behaviour came in on the initial commit so the code and reasoning presumably pre-dates this issue.

@pygy I don't like the idea of sentinel values. { subtree : 'retain' } fulfilled such a function and was removed. Despite your suggested API being cleaner, it's an exotic concept which increases API and adds cognitive load for what is essentially an extremely simple feature with (what I think is) a much more intuitive and less magical current working method.

So: would anybody have any objection if I ripped out the tests that check against the logic in the OP, and merged the functionality into rewrite?

@pygy I don't like the idea of sentinel values. [snip]

@barneycarroll did you mean to ping me here? I don't remember suggesting API changes related to this... By "placeholders", I meant empty text nodes.

I completely misunderstood — thought you were suggesting something like m.NOT_A_NODE to replace false.
So you're saying we should reintroduce placeholder nodes — because it ends up being more logical during diff?

Yes!

I was actually wrong about the collapsed nulls, sorry for the noise.

I've come to the realisation that fragments make placeholder nodes redundant, while also making logical expressions easier to parse in hyperscript code, because it introduces delimiters.
One of the problems with simple logical operators is that the general assumption when visually parsing a chunk of hyperscript is that you can read the code sequentially and assume that each discrete reference will be interpolated as a vnode, and operators violate that assumption - you encounter the operator and have to re-assess the significance of the preceding operand. This is borne out by recent efforts in JS style guides to formalise strict whitespace rules concerning ternary operators. Fragments offer a nice delimiter for this purpose, which while strictly speaking exotic, I think makes things easier to parse.
The following is a strawman PoC that shows how all these features work together - don't judge it as a whole, because it isn't logically sound or rational in its focus & granularity - but take account of how each vnode & logical expression is parseable in context.
var Post = {
  view : vnode =>
    m(".wrapper",
      [
        vnode.state.loggedin
      ? m(ProfileWidget)
      : m("a", {
          href   :"/login",
          oninit : m.route
        }, "Log in")
      ],

      [
        vnode.state.writePermissions
      && m("p.status", "You can edit this document")
      ],

      m("h1", "Hello"),
      m("p", {
        contenteditable : vnode.state.editing
      },
        m("span", "foo"),
        m("span", "bar")
      ),

      [
         vnode.state.writePermissions
      && [
           vnode.state.editing
         ? m(EditButton)
         : [
             m(CancelButton),
             m(SaveButton)
           ]
         ]
      ]
    )
}

So we now have a nice visual outline which IMO makes declarative virtual DOM easier to understand as a dynamic structure. Fragments act as delimiters. This means they can contain conditional nodes or lists of nodes. You can tell which kind at a glance via alignment (people who believe in comma-first lists will benefit from a stricter consistency). This bears out to the rendering logic, where eg the user logging out will not result in a dud placeholder DOM node being created to replace the write permissions status indicator, but neither will the diff engine get confused about the location of the subsequent h1 when that condition is toggled.
@pygy what do you think?

@barneycarroll
I think using parentheses rather than fragments for this purpose is both more logical and avoids extra logic-only vnode layers and unnecessary array allocation in the template. It doesnt eliminate the need to coerce false but does nicely flatten things without incurring vtree overhead.

@lhorie as discussed I'm removing the tests which validate Javascript's ability to coerce types when this is simply mundane native Javascript engine behaviour - with the exception of those where Mithril does perform special logic of its own - ie ensuring that empty strings are respected and zeros are coerced - because these represent edge cases to the falsey behaviour we're discussing.

@leeoniya you're absolutely right - that's a much more general solution to the readability issue. Less exotic conventions, unambiguous localised logic rather than deferred processing. For the sake of comparison:
var Post = {
  view : vnode =>
    m(".wrapper",
      (
        vnode.state.loggedin
      ? m(ProfileWidget)
      : m("a", {
          href   :"/login",
          oninit : m.route
        }, "Log in")
      ),

      (
        vnode.state.writePermissions
      && m("p.status", "You can edit this document")
      ),

      m("h1", "Hello"),
      m("p", {
        contenteditable : vnode.state.editing
      },
        m("span", "foo"),
        m("span", "bar")
      ),

      (
         vnode.state.writePermissions
      && (
           vnode.state.editing
         ? m(EditButton)
         : [
             m(CancelButton),
             m(SaveButton)
           ]
         )
      )
    )
}

That is so much nicer, but in practice it raises bugs. I'll split the render / diff concerns off to a new issue and keep this thread about false interpolation.

false handling could also live in the template few as 3 extra chars:
      (
         vnode.state.writePermissions
      && (
           vnode.state.editing
         ? m(EditButton)
         : [
             m(CancelButton),
             m(SaveButton)
           ]
         )
      )
    ) || null

@leeoniya IMO that's unnecessary and confusing. x && y || z is really confusing compared to x ? y : z. An expression consisting of sequential logical operations is extremely smelly IMO, and liable to totally turn off people who might otherwise be amenable to coming round from the idea that you need special 'helpers' for bog standard logical operations.
How is the code above more desirable for having  || null sneakily suffixed at the end? Wouldn't it just be better off if it was semantically equivalent without?
(BTW, still don't understand the rationale for explicit handling of null at all FWIW)

How is the code above more desirable for having || null sneakily suffixed at the end? Wouldn't it just be better off if it was semantically equivalent without?

(BTW, still don't understand the rationale for explicit handling of null at all FWIW)

This may not apply to Mithril. Perhaps null-removal/skipping is particular to domvm; it's the only value that gets spliced out from templates by the preprocessor. true, false, NaN, etc. don't get special processing.

@leeoniya well AFAIC null is a notoriously exotic value in JS. It's confusing and usually signifies an error of some kind, so encouraging authors to supply it as part of your API isn't a priori a good idea IMO. Why not simply replace the null check with a false check? Makes stuff easier in author land without having to introduce extra conditions in your code.

a big part of it is that internally foo == null tests for either null or undefined in a single expression. using null instead of explicit false can be useful in some cases of sloppy template authoring. it also has the benefit of being a distinct type alongside undefined that indicates "absence of explicit value" without introducing two-way split in boolean handling.

I agree that extending the operating logic around falseyness is ugly. We should cut down on that. It's awkward that a range of falsey values should have specific semantics while others don't.
But while it may be nice in the abstract that undefined == null, as a feature this presumes that it's of benefit to the user to be able to explicitly supply null or have an interpolated model's value happen to be undefined and end up with the same outcome. I don't think that holds water. The first scenario is a somewhat arbitrary (and in the case of Mithril, undocumented) hyperscript feature. The second is a silent application error IMO.
Mithril is much more clear in the DOM it produces and easier to debug as an app framework - so you can take some of the sting out of this anecdote - but when working with Ember I found it absolutely infuriating that unexpectedly undefined model values resulted in no DOM. Particularly when you are interpolating a series of model values one after the other in a string this is extremely confusing, and very difficult to debug if you're not familiar with the rendering engine and data flow.
Ultimately you have to ask yourself:

Are people really designing models where they actually expect undefined to silently collapse to nothing when they try to output it to the UI? Should they?
In the case where you expect a model to generate a string or a vnode of some form but it interpolates undefined, and this is an unexpected application error, is it better to gloss over it or stringify "undefined"? Personally, I'd prefer the latter because I can get immediate feedback and quickly identify the problem - the former strikes me as unaccountably opinionated about fault tolerance (some of your model is broken but eh, we'll do the other bits anyway).

In contrast, false being a unique special case makes a lot of sense. Aside from the huge convenience of condition && outcome, it matches the behaviour of boolean attrs, where false indicates the attribute node should be removed.

Those are good points. Will have to give this a shot, maybe even a perf boost is in there.

@barneycarroll @leeoniya
Nodes that are == null are currently ignored in the rendered tree in both 0.2 and 1.x. Just thought I'd clear that up.
Also, relying on !node is generally slower than node == null, simply because here's what each does:

node == null tests if node is either null or undefined. This can easily be JIT compiled by most engines into something like this pseudo-assembly, with the right constants for null and undefined:
test $node, $NULL_OR_UNDEFINED_BIT
jz .not_null_or_undefined

!node has to do the following:

If node is an object, let value be node.valueOf(). Else, let value be node.
If value is a string, let result be true if value is the empty string, false otherwise.
If value is a number, let result be true if value is non-zero and not NaN, false otherwise.
If value is null or undefined, let result be false.
If value is a boolean, let result be value.
If value is anything else, let result be true.
If result is true, return false for this expression, otherwise, return true.

In practice, with inline caches, the latter can be optimized to something close to as fast as the former if the types are consistent, but in this particular scenario, it won't happen in practice because the nodes' types are usually very highly polymorphic.

@isiahmeadows agreed — testing for falsey vnodes would be both expensive and undesirable.


Gravatar Images not being fetched

Running verson <IP_ADDRESS>5.  Gravatar images are not being fetched. I do not see any php errors. My ./data/data*/default/logs/ is empty.
Does the client or server fetch the gravatar images? Running Firefox 42.0 on the client. Let me know what additional information I can provide.
Thanks

Hi @JavierGallego

My ./data/data*/default/logs/ is empty.

Have you enabled logs in application.ini

Does the client or server fetch the gravatar images?

Server fetches avatars using php_curl

HI @RainLoop yes I have enabled logs in application.ini and php_curl is enabled

One more thing:
Admin Panel / General / Interface
Allow Gravatar

@RainLoop  Gravatar is allowed in the admin section.

Any addon in Firefox that can block that (Ghostery, Disconnect, uBlock, etc)?

I don't use addons in Firefox, or chrome or IE, mail don't display gravatar


Cherry pick doc comment clean-up

Cherry pick #58619 and #58930 into the 5.7 release branch.

@swift-ci Please test.

@swift-ci please test


[WIP] Fix issue #285 : save hive partitioned dataset using NativeExecutionEngine and DaskExecutionEngine

Enable saving hive partitioned dataset using Native (pandas) or Dask execution engine. Work still in progress as test_take with Dask is failing.
Related to https://github.com/fugue-project/fugue/issues/285

I looked at the tests here and from what I see, the only failure is in the duckdb execution engine for the io tests that you added. Below is a log of the test. The test_take tests seem to be fine.
self = <tests.fugue_duckdb.test_execution_engine.DuckBuiltInTests testMethod=test_io>

    def test_io(self):
        path = os.path.join(self.tmpdir, "a")
        path2 = os.path.join(self.tmpdir, "b.test.csv")
        path3 = os.path.join(self.tmpdir, "c.partition")
        with self.dag() as dag:
            b = dag.df([[6, 1], [2, 7]], "c:int,a:long")
            b.partition(num=3).save(path, fmt="parquet", single=True)
            b.save(path2, header=True)
        assert FileSystem().isfile(path)
        with self.dag() as dag:
            a = dag.load(path, fmt="parquet", columns=["a", "c"])
            a.assert_eq(dag.df([[1, 6], [7, 2]], "a:long,c:int"))
            a = dag.load(path2, header=True, columns="c:int,a:long")
            a.assert_eq(dag.df([[6, 1], [2, 7]], "c:int,a:long"))
        with self.dag() as dag:
            b = dag.df([[6, 1], [2, 7]], "c:int,a:long")
            b.partition(by='c').save(path3, fmt="parquet", single=False)
            b.save(path2, header=True)
>       assert FileSystem().isdir(path3)
E       AssertionError

So the issue here appears to be that the added tests support partitioned files as output (which is what the PR is for), but duckdb fails the test because it doesn't support partitioning yet.
How do we proceed with this @goodwanghan ?

The failure on duckdb test is expected because duckdb itself does not have partitioning feature. But it is quite straightforward to convert duckdbdataframe to arrow table (as_arrow), and then save to parquet with partition, so we should also make that change, then this looks super nice.

I apologize for the delay, my daughter was born in Feb, so I am extremely busy recently.
The PR looks great, we just need to change duckdb io function to pass the test suite.
You can see we have other work items to redesign the IO part for all engines. Because the current design is a bit messy. But please continue working on this PR and merge first. The code refactoring can happen later. As long as we have good unit tests, we can ship this feature first.
Thank you!

Hi! No problem at all with the delay.
Congrats for the recent birth of your daughter!
I'll try to fix the duckdb io function that is failing to pass the test.
I did some prototyping this week to try to fix issue #288 related to
reading of hive partitioned dataset with Native and Dask execution engine.
I think I'm close to a solution in native mode, but it seems more dificult
to deal with dask categorical type, as category values are set to string
type. So the inference of partition column type is more tricky.
Laurent
On Fri, Mar 4, 2022, 11:24 PM Han Wang @.***> wrote:

I apologize for the delay, my daughter was born in Feb, so I am extremely
busy recently.
The PR looks great, we just need to change duckdb io function to pass the
test suite.
You can see we have other work items to redesign the IO part for all
engines. Because the current design is a bit messy. But please continue
working on this PR and merge first. The code refactoring can happen later.
As long as we have good unit tests, we can ship this feature first.
Thank you!
—
Reply to this email directly, view it on GitHub
https://github.com/fugue-project/fugue/pull/306#issuecomment-1059575931,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFZ7LJVWTKVI4ALB4ETAFQTU6KERLANCNFSM5PRIYHVQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID:
@.***>

@LaurentErreca do you plan to finalize this PR soon?

I've been working on this issue. For duckdb to pass the test, it must be able to write hive partitioned dataset. I propose to use arrow with param partition_cols instead of the duckdb write function which uses a COPY TO function under the hood. This function doesn't support hive partitioned write.

I've been working on this issue. For duckdb to pass the test, it must be able to write hive partitioned dataset. I propose to use arrow with param partition_cols instead of the duckdb write function which uses a COPY TO function under the hood. This function doesn't support hive partitioned write.

Yes exactly, we should just convert it to arrow and save (only if this partition key is specified). It is straightforward to convert duckdbdataframe to arrow table (as_arrow), and then save to parquet with partition.

Codecov Report

Merging #306 (d4fa047) into master (281fe2a) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #306   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files          101       102    +1
  Lines         9480      9511   +31
=========================================
+ Hits          9480      9511   +31

Impacted Files
Coverage Δ

fugue/_utils/interfaceless.py
100.00% <100.00%> (ø)

fugue/_utils/register.py
100.00% <100.00%> (ø)

fugue/execution/__init__.py
100.00% <100.00%> (ø)

fugue/execution/factory.py
100.00% <100.00%> (ø)

fugue/execution/native_execution_engine.py
100.00% <100.00%> (ø)

fugue/extensions/_utils.py
100.00% <100.00%> (ø)

fugue/workflow/utils.py
100.00% <100.00%> (ø)

fugue_dask/execution_engine.py
100.00% <100.00%> (ø)

fugue_duckdb/_io.py
100.00% <100.00%> (ø)

fugue_duckdb/execution_engine.py
100.00% <100.00%> (ø)

... and 4 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 281fe2a...d4fa047. Read the comment docs.

It looks good you only have a linting issue left @LaurentErreca

I've been working on this issue. For duckdb to pass the test, it must be able to write hive partitioned dataset. I propose to use arrow with param partition_cols instead of the duckdb write function which uses a COPY TO function under the hood. This function doesn't support hive partitioned write.

Yes exactly, we should just convert it to arrow and save (only if this partition key is specified). It is straightforward to convert duckdbdataframe to arrow table (as_arrow), and then save to parquet with partition.

This is done by replacing:
        if p.file_format not in self._format_save:     self._fs.makedirs(os.path.dirname(uri), recreate=True)     ldf = ArrowDataFrame(df.native.arrow())
with:
if (p.file_format not in self._format_save) or ("partition_cols" in kwargs):     self._fs.makedirs(os.path.dirname(uri), recreate=True)     ldf = ArrowDataFrame(df.native.arrow())

I've been working on this issue. For duckdb to pass the test, it must be able to write hive partitioned dataset. I propose to use arrow with param partition_cols instead of the duckdb write function which uses a COPY TO function under the hood. This function doesn't support hive partitioned write.

Yes exactly, we should just convert it to arrow and save (only if this partition key is specified). It is straightforward to convert duckdbdataframe to arrow table (as_arrow), and then save to parquet with partition.

This is done by replacing:  if p.file_format not in self._format_save: self._fs.makedirs(os.path.dirname(uri), recreate=True) ldf = ArrowDataFrame(df.native.arrow()) with: if (p.file_format not in self._format_save) or ("partition_cols" in kwargs): self._fs.makedirs(os.path.dirname(uri), recreate=True) ldf = ArrowDataFrame(df.native.arrow())

I think you should use df.as_arrow() instead of df.native.arrow() because as_arrow is working on any dataframe. df.native assumes it is a duckdb relation, sometimes it is not.


draggable sidebar width

I think one enhancement that I would like to see on this great tool is making the sidebar width draggable.  I have started playing with the code to enabled this option but I am wondering if anyone has experimented with this already.

since the width is defined in SASS/CSS and responsive instead of handling it in pure JS I have my doubts that this would be easy to implement... feel free to experiment though!


Wrong bind 'this' in .vue file's methods.

Vue.js version
2.1.10
Code
.vue file
<template>
  <div>
    <button v-on:click="start">start</button>
  </div>
</template>

<script>
  export default {
    data: () => ({
      value: false,
    }),
    methods: {
      start: () => {
        console.log(this) // return undefined
      },
    },
  };
</script>

What is Expected?
I expected this will have this.value as false, but this was undefined.
What is actually happening?
I found that if I change mothods's functions from arrow function to general function, It's solved.
I mean, with below code,
    methods: {
      start: funciton start() {
        console.log(this) // return { ..., value: false, ... }
      },

there are no problem.
But I think .vue file should provide ES2015, including arrow funciton.
Am I wrong?

That's not Vue's fault.  You shoud not use arrow function like this, use object shorthand syntax:
someMethod() {
  this.value = true; // this = vm
}

This article will probably explain it you better - thttps://rainsoft.io/when-not-to-use-arrow-functions-in-javascript/

@sqal is right. Arrow function captures lexical this. In this case, your () => this will return undefined in strict mode. So this is expected.


OpenCensus Support for Cloud Pub/Sub

Adds OpenCensus context propagation to the CPS Publisher and Subscriber. This pr is initially meant for discussion between OpenCensus and CPS.

@igorbernstein2, we need someway to configure whether or not to turn it on.  Can we piggyback your tracing configuration settings for this?

I wasn't planning on letting end users configure tracing per service. The gapic stub settings are meant for service owners to mark their client as ready for tracing. My understanding is that if opencensus-impl is on the classpath and an exporter is configured all components should contribute traces.
I think forcing the user to opt-in per service is going to create too much friction. Why is this different from grpc auto creating spans?

@sduskis what is this blocked on?

@JustinBeckwith, we need approval from the Pub/Sub team. and we also need a way to configure whether or not this feature is active.

Note: I developed the design of the OpenCensus Pub/Sub integration in conjunction with the Cloud Pub/Sub team.
Also, as previously noted, similar to Google Cloud Bigtable and Spanner (and other libraries e.g. gRPC), this feature is inactive unless a dependency on an OpenCensus implementation is added to the application.

Thanks!


fix: support modules with for_each or count

This updates the module key matching to ignore anything inside square brackets so we can match what is stored in the manifest

Hey guys, I was about to open an issue, but it looks like you already resolved it.
module "service_consumer" {
  for_each = { for v in var.service_consumers : v.hostname => v }
  source   = "git::ssh://git@redacted.com/abc/abc.git//modules/consumed-service?ref=v1.2.3"
  . . .
}

$ terraform init -backend=false
Initializing modules...
. . .
$ infracost breakdown --log-level info --path .
time="2022-07-20T15:24:37-04:00" level=info msg="Evaluating Terraform directory at ."
time="2022-07-20T15:24:37-04:00" level=info msg="Starting: Downloading Terraform modules"
time="2022-07-20T15:24:37-04:00" level=info msg="Starting: Evaluating Terraform directory"
. . .
time="2022-07-20T15:24:37-04:00" level=warning module_path=. module_name=root error="missing module with source 'registry.terraform.io/git::ssh://git@redacted.com/abc/abc.git//modules/consumed-service?ref=v1.2.3 git::ssh://git@redacted.com/abc/abc.git//modules/consumed-service?ref=v1.2.3' -  try to 'terraform init' first" routine=0 project_name= module_source= project_path=. parser_path=. provider=terraform_dir msg="failed to load module module.service_consumer[\"redacted\"] ignoring"
$ cat .terraform/modules/modules.json | jq
{
  "Modules": [
    . . .
    {
      "Key": "service_consumer",
      "Source": "git::ssh://git@redacted.com/abc/abc.git?ref=v1.2.3//modules/consumed-service",
      "Dir": ".terraform/modules/service_consumer/modules/consumed-service"
    },
    . . .
  ]
}

I cloned and built this branch from source.
~/.../infracost/build/infracost breakdown --log-level info --path .
time="2022-07-20T15:45:15-04:00" level=info msg="Evaluating Terraform directory at ."
time="2022-07-20T15:45:15-04:00" level=info msg="Starting: Downloading Terraform modules"
time="2022-07-20T15:45:15-04:00" level=info msg="Starting: Evaluating Terraform directory"
time="2022-07-20T15:45:17-04:00" level=info msg="Starting: Retrieving cloud prices to calculate costs"
. . .

Success! Any ETA on when this will make it into a release?

Success! Any ETA on when this will make it into a release?

Thanks for confirming it works for you! This will be in the v0.10.9 release - we don't have a target release date yet for it but it will probably be sometime next week.

@jrarmstro this has now been released in v0.10.9. Thanks for your help testing the fix 🙏 .


Netty will not complain if port 8080 is already used

Environment Details

Helidon Version: SE latest (via mvn archetype)
Helidon SE or Helidon MP : SE
JDK version: 1.8.0_171
OS: OS X 10.13.6 (17G65)
Docker version (if applicable): N/A

Problem Description
When the 8080 port is already used by another process, Netty will sill claim that it is up and running!
Steps to reproduce

make sure that you have another process using port 8080

mvn archetype:generate...

-> test will fail  MainTest.testHelloWorld:60 HTTP response1 ==> expected: <200> but was: <404>
or

add <skipTests>true</skipTests> in the pom.xml

mvn package

java -jar target/quickstart-se.jar

[DEBUG] (main) Using Console logging
2018.12.10 10:46:22 INFO io.netty.util.internal.PlatformDependent Thread[main,5,main]: Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system instability.
2018.12.10 10:46:22 INFO io.helidon.webserver.netty.NettyWebServer Thread[nioEventLoopGroup-2-1,10,main]: Channel '@default' started: [id: 0x8e333db7, L:/0:0:0:0:0:0:0:0:8080]
WEB server is up! http://localhost:8080

But clearly, WEB server is not up! I would accept an error message telling me that it wasn't able to start as the port was already occupied.
This issue also apply to Helidon MP:
2018.12.10 11:18:21 INFO io.helidon.webserver.netty.NettyWebServer Thread[nioEventLoopGroup-2-1,10,main]: Channel '@default' started: [id: 0x3d2cbe90, L:/0:0:0:0:0:0:0:0:8080]
2018.12.10 11:18:21 INFO io.helidon.microprofile.server.ServerImpl Thread[nioEventLoopGroup-2-1,10,main]: Server started on http://localhost:8080 (and all other host addresses) in 97 milliseconds.
http://localhost:8080/greet

I have experienced this on MacOS only. Please do netstat -an | grep 8080 and post the result.
Netty actually does listen - there is a problem between IPv4 and IPv6 sockets.

I'm using 0.10.5.
Netty does not listen on port 8080. In my case, it was Fn.
netstat -an | grep 8080
tcp6       0      0  ::1.8080               *.*                    LISTEN
tcp4       0      0  *.8080                 *.*                    LISTEN

curl localhost:8080
{"goto":"https://github.com/fnproject/fn","hello":"world!"}

Hi, according to the log it seems that netty started on ipv6 (L:/0:0:0:0:0:0:0:0:8080)
also your netstat output shows a process listening on tcp6 - maybe that is netty?
I am just trying to pinpoint the problem and possible solution.
Maybe by default, we should try to occupy both v4 and v6 and fail if either is already used. The current behavior seems to succeed if either succeeds (even if the other fails).
Would that be a good approach?
We should have a configuration option that would allow us to choose whether to use tcp4 or tcp6 or both.

@tomas-langer @spericas @barchetta How do you feel about targeting this one for 1.0 ?

@romain-grecourt Yes, we should fix this for 1.0.

I have trouble reproducing this.
I can run helidon on the same port twice only when using different addresses (e.g. one on <IP_ADDRESS> and another on my local address):
# this is a webserver started with InetAddress.getLocalHost()
tcp4       0      0  <IP_ADDRESS>.8080     *.*                    LISTEN
# this is a webserver started with address <IP_ADDRESS>
tcp46      0      0  *.8080                 *.*                    LISTEN

Which is a different case from the one described by @delabassee ; when I tried to start the server on a port already occupied, I always get a
INFO: Channel '@default' startup failed with message 'Address already in use'.

I have also tried using a port that is already occupied on tcp4 and tcp6:
tcp4       0      0  *.5900                 .                    LISTEN
tcp6       0      0  *.5900                 .                    LISTEN
Still get a nice Address already in use exception :(

This problem manifests only when listening on the all hosts ("<IP_ADDRESS>" or "::"), as java automatically binds these address to both IP v4 and IP v6 - unfortunately there is no option to modify this behavior.
So in our case the docker seems to start on tcp4 and tcp6 sockets which are separated and java starts on a combined tcp46 socket, which for some reason do not conflict on MacOS.
I could not find a way to invoke the tcp46 socket from curl or browser, so it is in fact a "zombie" server with no possibility to access it, even though it started correctly.
When I start webserver on the loopback address (<IP_ADDRESS>), it can be reached through http://<IP_ADDRESS>, though http://localhost hits the docker machine.
I need to request help from somebody with better understanding of the network stack to find if there is a fix to this.


Add windows CI via AppVeyor

Hey i want to play with imgui-rs and i'm on windows so i added CI for it.
I tried really hard to cache cargo, but AppVeyor insisted in rebuilding the world.

Thanks!
Appveyor has been on my TODO list for a long time so this is very nice to have :smile:
Could you squash the pull request into a single commit? 50 WIP commits is a lot of noise...
I also noticed two minor things:

README.md appveyor badge should point to the main repository, not the fork
There's a forced recompilation change in test_window_impl.rs that shouldn't be included in this pull request

Sorry for the long response time !
Will address your comments.
2017-08-14 4:47 GMT-03:00 Joonas Javanainen<EMAIL_ADDRESS>
Thanks!
Appveyor has been on my TODO list for a long time so this is very nice to
have 😄
Could you squash the pull request into a single commit? 50 WIP commits is
a lot of noise...
I also noticed two minor things:

README.md appveyor badge should point to the main repository, not
the fork
There's a forced recompilation change in test_window_impl.rs that
shouldn't be included in this pull request

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Gekkio/imgui-rs/pull/69#issuecomment-322122022, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AANY8zQUw8nQ5s5uJT9_ufIup-Pgj86lks5sX_ulgaJpZM4O1kC7
.

This is quite old, and we have Windows CI now via Github Actions.


Background for Monster Widget

Would it be possible for the Monster Widget to have a dark, semi-transparent background (like the harvest box) to aid in visibility? It can be difficult to read details off the widget in bright areas (particularly coral highlands/hoarfrost reach).

You can change the styles for it by changing the HunterPie.Resources/UI/Overwrite.xaml file.
Widget Background
Paste the following code inside the ResourceDictionary tags in your Overwrite.xaml. It will make the widget background darker.
<Style x:Key="OVERLAY_MONSTER_BACKGROUND" BasedOn="{StaticResource OVERLAY_MONSTER_BACKGROUND}" TargetType="StackPanel">
    <Setter Property="Background" Value="#50000000"/>
</Style>


feat_refine_modile

   I noticed a function:  ''**feature_refine_cuda.forward**(features, best_rbboxes)'' in FR stage to refine feature,but I can't see the details.  Can you point out where the specific code is, or explain how some features are refined ？
  looking for your reply,thank you!

FRM is not implemented by cuda in this repo


1.21.1 neoforge please?

minecraftPlayerAnimator is required for Better combat and Combat roll to work. Those mods have 1.21.1 releases, this mod does not. I would really love a 1.21.1 update, as i had been using those in a shared modpack.
I had the mod working on my local modpack instance by simply changing the META-INF neoforge.mods.toml file to read  versionRange = "[1.21.1,)" which surprisingly worked without issues. I know a bit more will need changed for the build to work. I tried briefly, but the built jar file was not working for some reason. I thought i got the gradle settings right, but i get dozens of errors from the library files compiling.
But given 1 simple change to the jar file worked, i still think a 1.21 to 1.21.1 port should be a very simple change.

i also want a a 1.21.1 neoforge version: the old one crashes

These 2 work perfectly fine with either neoforge or fabric. My packs have over 250 mods and I have zero issues BUT yes I agree seeing this bumped to 1.21.1 for both would be very appreciated only because of the the curseforge app and exporting modpacks

should be done


Allow editing headers

Hi,
here's a quick go at modifying HTTP headers (#11).

Nice!
Have you tried running the test locally. Curious to know why it broke.

I did and they pass. Not sure why they fail on Travis.

Well, I confirmed that locally this does what the PR says, so thanks!
I know this problem existed before this PR, but would you mind expanding the value text box so that it fits the length of the table? It was weird when adding a header value, but now I think the problem is exacerbated when trying to edit!

Done

Aaaand the test passes because magic. Cool, cool.
Thank you!

Has this been released yet?

@hardchor it was merged into master the 16th September.

I don't think it was released yet. I'll try to deploy one when I get the chance.

still no release?


Document how to run all tests locally

Story
When a developer wants to run RSPEC tests locally, they need to run each sample RSPEC independently.
Issue
The developer needs to test each RSPEC by hand. There is no Rakefile with a task to call sub RSPEC automatically.
Possible-Solution
Add a Rakefile with a task to run all sample RSPEC. A developer can run tests with one CLI command instead of one per sample.

We added a simple BASH script that kicks off all of the local integration tests: spec/run-all.sh
This, however...

is not documented anywhere
will not run on Windows

Renaming to keep this open until this support is documented.
Windows support is not required to close this.  That can be included in a follow up as part of #73

Greetings, we're closing this due to inactivity. Please let us know if the issue needs to be reopened.


Getting **We couldn’t find that file to show. **

Above image is shown in my gist, I followed all procedures

I found that my github actions are not running...
I have no particular idea what to be done with this, help needed

first, you need to update your schedule.yml and push again


Add libzip 1.9.2

the latest libzip from https://libzip.org/

Thanks for the PR @bucanero! It seems the automated build fails because xz is not available. Could you add it to the apk add steps found in this file?: https://github.com/pspdev/psp-packages/blob/master/.github/workflows/build.yml

hi @sharkwouter , I have added xz based on your feedback
Btw, libzip also provides a .tar.gz release, so if needed/preferred I can switch to https://libzip.org/download/libzip-1.9.2.tar.gz and update the sha256 hash.

It seems the automated build is still failing.

my bad, I committed a fix so it can change directory as expected cd "$pkgname-$pkgver" (cd libzip-1.9.2)

another fix, seems like prepare() can't be empty

You can probably just remove prepare

You can probably just remove prepare

prepare() { } removed. Let's see if it works. 😄

thanks for the feedback and tips on the .pc file. 👍
I've re-added prepare() and added a patch to update libzip.pc.in as needed. Everything should work as expected now. 😄

Thanks! Looks good to me


None of the default config pack biomes generate.

Title. Allow both this and the default Overworld pack's biomes to generate.

Unfortunantly they are imcompatible with each other out of the box. They both use different distribution methods and Origen uses some custom calculations that the Default Pack does not use. A few months ago I spent several hours merging the two packs with a few minor issues due to the above mentioned details. Now that things have updated I will be revisiting this and seeing if I can achieve the same thing but with perfect results. I would be more than happy to post results once complete. WIth that being said however, there are some biomes from the default pack that I remove, so it really does come to a having to put in the work for a truly custom pack.

Ah, alright.

Stopping most of the default overworld biomes from generating was intentional, as most of them don't quite fit the Origen theme.


glib-macros: add proc_macro_error attribute to clone

Should hopefully fix #124

Please add a test for the error message (in ./glib/clone_tests/clone_compilation_errors.py).

What error message? For a test that this doesn't regress again we have the book tests (once the PR is merged).

Just double-checked and indeed, just a cryptic error. Really strange it didn't appear before... Thanks!

What error message? For a test that this doesn't regress again we have the book tests (once the PR is merged).

Not only the book, the examples fails to build as well


TypeError: Semaphore is not a constructor

Is there a trick to using this module in a Typescript project?
import Semaphore from 'semaphore-async-await';
const lock = new Semaphore(1);

TypeError: Semaphore is not a constructor

I was able to work around the issue by changing the import statement to this, but it seems a bit dodgy:
import SemaphoreModule from 'semaphore-async-await';
// Not sure why we need to do it this way...
const Semaphore = (SemaphoreModule as any)['default'];

const lock = new Semaphore(1); // works now

Am I doing something wrong?

Can you attach some playground or zipped example?

Here's an example: example.zip
Run it via:
npm install
npx ts-node index.ts

It looks like the issue is around module handling.  If my code isn't a module then it seems to work, but once I configure it to work as a module that's when it seems to dislike the Semaphore constructor.

I'm getting the same error.


'dcos marathon groups add' error when dependencies defined

I'm testing marathon's application groups via dcos and created a sample json. When I'm posting it via curl to Marathons REST api, it is successfully started. However via dcos cli I get errors.
If I add a toplevel empty
"apps": [ ]
property into the json, then I get:
RefResolutionError: Unresolvable JSON pointer: u'definitions/pathType'
Without the apps property just a lengthy stacktrace.
This is the command I'm using:
dcos marathon group add multi.json
The json:
{
  "id": "/multi-test7",
  "groups": [ {
    "id": "/multi-test7/persistence",
    "apps": [ {
      "id": "/multi-test7/persistence/mongo",
      "cmd": "while [ true ] ; do echo 'Fake MongoDB server' ; sleep 5 ; done",
      "cpus": 0.1,
      "mem": 64.0,
      "instances": 1
    }]
  },{
    "id": "/multi-test7/persistence2",
    "apps": [ {
      "id": "/multi-test7/persistence2/mongo",
      "dependencies": ["/multi-test7/persistence/mongo"],
      "cmd": "while [ true ] ; do echo 'Fake MongoDB server' ; sleep 5 ; done",
      "cpus": 0.1,
      "mem": 64.0,
      "instances": 1
    }]
  } ]
}

After some testing it turned out that if I remove the dependencies property from the json, it will be posted successfully to Marathon via dcos cli.

Just a clue @mgummelt: from the error the jsonschema ref might be missing a leading #.  Also we must be missing a test case for groups with dependencies!
@akerekes thanks for reporting this.

Hey @akerekes, thanks for the bug report.  Looks like our jsonschema was buggy.  Fix is in review.  This should be out when we push our next CLI version in ~1 week

@mgummelt  Sounds good, thanks!

@akerekes - could you see if this issue has been resolved and report back? We pushed a new version out yesterday (make sure to uninstall entirely before reinstalling, as per: https://docs.mesosphere.com/install/cli/). Thanks!

Closing for now, please let us know if you're still seeing this issue.


FC6 not working in modbus-write

version 0.9.5 modbus-write node returns the following error:
Modbus Write client: {"errorCode":134,"exceptionCode":11,"message":"GATEWAY TARGET DEVICE FAILED TO RESPOND"}
Can successfully write to a single holding register in version 0.9.5 with FC16.

please try npm install<EMAIL_ADDRESS>

please try npm install<EMAIL_ADDRESS>

in the new version 0.11.7 you have to try setup Queue commands with true and play with the queue command delay time

My testing flow with unbufferd and buffered VServer ( PLC Sim on Windows ) and some hardware (Schneider PLC TCP and Renu Panel Modbus Serial)

Serial Modbus Panel


feat(ci): Goreleaser workflow and config is created

Add GH action for goreleaser
Add goreleaser config for gpg checksum signing
TODO: generate gpg keypairs, assign subkeys and passwords to each repo
issue CIRC-8124

Tags: goreleaser workflow config gpg todo

Will also need docker hub integration since goreleaser generates and publishes the docker images and manifest. see docker login


Add test that DES works in multi-datacenter situations (CASSANDRA-13074)

This test adds test coverage for DES in multi-datacenter situations.
It does this by populating scores for the local datacenter and ensuring that read metrics are not incremented on the degraded host when doing local quorum reads.
A multiplexer run shows this passing 90 times when the patches for CASSANDRA-13074 are applied. This should not be merged until CASSANDRA-13074 has been merged.

The Cassandra ticket has been merged. This is ready to merge after review.


Fixes #2249. CharacterMap isn't refreshing well non-BMP code points on scroll.

Fixes #2249 - Also improves the searching glyph by selecting and make visible the related value found in the ListView.
Pull Request checklist:

[x] I've named my PR in the form of "Fixes #issue. Terse description."
[x] My code follows the style guidelines of Terminal.Gui - if you use Visual Studio, hit CTRL-K-D to automatically reformat your files before committing.
[x] My code follows the Terminal.Gui library design guidelines
[x] I ran dotnet test before commit
[x] I have made corresponding changes to the API documentation (using /// style comments)
[x] My changes generate no new warnings
[x] I have checked my code and corrected any poor grammar or misspellings
[x] I conducted basic QA to assure all features are working

Also fixes this;

With WindowsDriver and with windows console host I can achieve this:

But with Windows Terminal it's all mess up:

With WindowsDriver and with windows console host I can achieve this:

But with Windows Terminal it's all mess up:

Is there an Issue filed against Windows Terminal on this?

Is there an Issue filed against Windows Terminal on this?

I don't think there is. I think you may ask them. I don't know if I'm doing something wrong.

Is there an Issue filed against Windows Terminal on this?

I don't think there is. I think you may ask them. I don't know if I'm doing something wrong.

They are quite responsive. I suggest you file an Issue
https://github.com/microsoft/terminal/issues

FWIW, U+1D53D MATHEMATICAL DOUBLE-STRUCK CAPITAL F and friends are all indicated in the Unicode character database as occupying one column (ea=N Emoji=N EPres=N).
If I had to guess, it's actually a bug that they're being displayed in two columns in the old Windows console host! 🙂
(Terminal has broadly better Unicode compatibility than the Console does, because it has a faster release cycle and we've been able to fix it much more quickly.)

Thanks for your answers @DHowett. The problem is if I consider it as one column it also appear misaligned. Where can I get the information about how many columns a code point occupies?

@BDisp -should this be marked as a draft PR?

@BDisp I pulled this down locally. I noted this. I'm not sure if this is the same issue you are attempting to fix with this PR, but I thought I'd let you know:

@BDisp I pulled this down locally. I noted this. I'm not sure if this is the same issue you are attempting to fix with this PR, but I thought I'd let you know:

Yes it's. Non-BMP cannot be used with the current WindowsDriver because it only allow handle it by using two blocks or columns and not all them occupies two columns. I'm working on changing the write API to another type which can handle 32 bits characters.

@BDisp I pulled this down locally. I noted this. I'm not sure if this is the same issue you are attempting to fix with this PR, but I thought I'd let you know:

Yes it's. Non-BMP cannot be used with the current WindowsDriver because it only allow handle it by using two blocks or columns and not all them occupies two columns. I'm working on changing the write API to another type which can handle 32 bits characters.

Got it.
Do you have an ETA for the fix? I'm asking because we need to get a release out. I'm thinking that if you need more time, then I'll do a PR for CharMap that disables those ranges for now. What do you think?

Do you have an ETA for the fix? I'm asking because we need to get a release out. I'm thinking that if you need more time, then I'll do a PR for CharMap that disables those ranges for now. What do you think?

No, sorry I don't have an ETA for the fix, so is better you do a PR for disable those ranges for now. Thanks.

@tig the fixes included in this PR for Toplevel and ListView are in #2267 and #2270, so we can leverage them for the new package while the non-BMP fixes aren't ready for the others drivers.


Can't compile Hello world

Hello.
I'm trying to compile example described in https://book.drone-os.com/hello-world.html.
Getting compile error:
cargo build --features "" --release
warning: the cargo feature `resolver` is now stable and is no longer necessary to be listed in the manifest
   Compiling drone-sandbox v0.1.0 (/home/bazhenov/Developer/drone-sandbox)
error[E0405]: cannot find trait `AllocRef` in module `core::alloc`
  --> src/lib.rs:36:1
   |
36 | / heap! {
37 | |     /// A heap allocator generated from the `Drone.toml`.
38 | |     heap => pub Heap;
39 | | }
   | |_^ not found in `core::alloc`
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

For more information about this error, try `rustc --explain E0405`.
error: could not compile `drone-sandbox`

To learn more, run the command again with --verbose.
error: Recipe `build` failed on line 26 with exit code 101

AllocRef available only in nightly, AFAIK
$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/bazhenov/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu
nightly-2019-02-08-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu

installed targets for active toolchain
--------------------------------------

thumbv7m-none-eabi
x86_64-unknown-linux-gnu

active toolchain
----------------

nightly-x86_64-unknown-linux-gnu (overridden by '/home/bazhenov/Developer/drone-sandbox/rust-toolchain')
rustc 1.51.0-nightly (f4eb5d9f7 2021-01-25)

Seems like I install invalid toolchain or something. Can't figure it out. Any diagnostic directions would be appreciated :)

Try and set the value of the rust-toolchain file to nightly-2020-11-25.

Try and set the value of the rust-toolchain file to nightly-2020-11-25.

Choosing nightly-2020-11-25 as a toolchain produces new error:
error: linking with `drone-ld` failed: exit code: 1
  |
  = note: "drone-ld" "--eh-frame-hdr" "-L" "/home/bazhenov/.rustup/toolchains/nightly-2020-11-25-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7m-none-eabi/lib" "/home/bazhenov/Developer/drone-sandbox/target/thumbv7m-none-eabi/release/deps/drone_sandbox-ac9e8445b3407fab.drone_sandbox.1joba40v-cgu.0.rcgu.o" "-o" "/home/bazhenov/Developer/drone-sandbox/target/thumbv7m-none-eabi/release/deps/drone_sandbox-ac9e8445b3407fab" "--gc-sections" "-L" "/home/bazhenov/Developer/drone-sandbox/target/thumbv7m-none-eabi/release/deps" "-L" "/home/bazhenov/Developer/drone-sandbox/target/release/deps" "-L" "/home/bazhenov/.rustup/toolchains/nightly-2020-11-25-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7m-none-eabi/lib" "--start-group" "--end-group" "-Bstatic" "/home/bazhenov/.rustup/toolchains/nightly-2020-11-25-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7m-none-eabi/lib/libcompiler_builtins-5c89f77703585ef6.rlib" "-Bdynamic"
  = note: Error: Couldn't find `llvm-size`

llvm-size is located in llvm-tools component which is missing in this toolchain. But I've found llvm-tools-preview in the same toolchain. So following command installs llvm-size (correct toolchain should be selected first):
$ rustup component add llvm-tools-preview

Now everything builds just fine.
Maybe some clarifications should be added to Getting Started guide? I could provide MR for that.
Anyway, thank you for your help!

Choosing nightly-2020-11-25 as a toolchain produces new error:
error: linking with `drone-ld` failed: exit code: 1
  |
  = note: "drone-ld" "--eh-frame-hdr" "-L" "/home/bazhenov/.rustup/toolchains/nightly-2020-11-25-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7m-none-eabi/lib" "/home/bazhenov/Developer/drone-sandbox/target/thumbv7m-none-eabi/release/deps/drone_sandbox-ac9e8445b3407fab.drone_sandbox.1joba40v-cgu.0.rcgu.o" "-o" "/home/bazhenov/Developer/drone-sandbox/target/thumbv7m-none-eabi/release/deps/drone_sandbox-ac9e8445b3407fab" "--gc-sections" "-L" "/home/bazhenov/Developer/drone-sandbox/target/thumbv7m-none-eabi/release/deps" "-L" "/home/bazhenov/Developer/drone-sandbox/target/release/deps" "-L" "/home/bazhenov/.rustup/toolchains/nightly-2020-11-25-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7m-none-eabi/lib" "--start-group" "--end-group" "-Bstatic" "/home/bazhenov/.rustup/toolchains/nightly-2020-11-25-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7m-none-eabi/lib/libcompiler_builtins-5c89f77703585ef6.rlib" "-Bdynamic"
  = note: Error: Couldn't find `llvm-size`

llvm-size is located in llvm-tools component which is missing in this toolchain. But I've found llvm-tools-preview in the same toolchain. So following command installs llvm-size (correct toolchain should be selected first):
$ rustup component add llvm-tools-preview

Now everything builds just fine.
Maybe some clarifications should be added to Getting Started guide? I could provide MR for that.
Anyway, thank you for your help!

You should run just deps. That installs llvm-size.

You should run just deps. That installs llvm-size.

Yep, you right!

Yep, you right!


1.46 and configurable version

Hi!
happy to make changes, but these made sense to me:

don't specify the patch version of Jaeger so we can get important updates without changing the chart so often
Allow users to specify their version so we can use newer versions of Jaeger without having to update the chart (because I don't /think/ you can override the chart's AppVersion?)

I agree with your points, so thanks! Merging in your changes.


RPD - fix volume pump and add building under tile

About the PR
Fixed volume pump building a pressure pump. It now builds a volume pump as intended. Also took out the rule requiring pipes be built on subfloors. For parity with the build menu, they can now be built under tiles.
Why / Balance
RPD was not working as intended
Technical details
Changed some yaml properties
Requirements

[X] I have read and am following the Pull Request and Changelog Guidelines.
[X] I have added media to this PR or it does not require an ingame showcase.

Breaking changes
None
Changelog
:cl:

tweak: RPD can now build under tiles
fix: RPD can now build volume pumps

Ignore the build fail, just the game being stupid.


Column names are converted to ?

(Tables have been renamed.)
In AppSignal, queries instrumented through Sequel appear to parameterize column references that are fully-qualified.
Example below:
SELECT count(*) AS "count"
FROM (SELECT "foo"."ops".*
FROM "foo"."ops"
INNER JOIN "foo"."ihcs" ON ("foo"."ihcs"."id" = ?."ops"."ihc_id")
INNER JOIN "foo"."incs" ON ("foo"."incs"."id" = ?."ihcs"."inc_id")
WHERE ((?.?.? = ?)
  AND (?.?.? IN (SELECT "foo"."inc_cats"."id"
FROM "foo"."inc_cats"
WHERE ((? = ?)
  AND (?.?.? IS NOT ?))))))

Hi! Thanks for reporting!
Can you share the prepared statement this came from? Then we can add a test case for it and see where it goes wrong

@kenaniah It's fine if you scrub any sensitive information from the query, in that case just replace it with some example data.


Report results fails when running in Github Enterprise

Hello,
I'm trying to run your actions in GHE github.mycompany.com.
The action fails with an error:
Run<EMAIL_ADDRESS>  with:
    repo-token: ***
HTML report saved to report/html/
Markdown report saved to report/jscpd-report.md
/var/actions-runner/share/runner/_work/_actions/actions/jscpd-github-action/v1.2/node_modules/octokit/node_modules/@octokit/request/dist-node/index.js:88
      const error = new requestError.RequestError(toErrorMessage(data), status, {
                    ^

RequestError [HttpError]: Bad credentials
    at /var/actions-runner/share/runner/_work/_actions/actions/jscpd-github-action/v1.2/node_modules/octokit/node_modules/@octokit/request/dist-node/index.js:88:21
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Job.doExecute (/var/actions-runner/share/runner/_work/_actions/actions/jscpd-github-action/v1.2/node_modules/bottleneck/light.js:405:18) {
  status: 401,
  response: {
    url: 'https://api.github.com/repos/cia/rpl-tools/pulls/264',
    status: 401,
    headers: {
      'access-control-allow-origin': '*',
      'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
      connection: 'close',
      'content-length': '80',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Mon, 03 Jul 2023 12:56:35 GMT',
      'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
      server: 'GitHub.com',
      'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
      vary: 'Accept-Encoding, Accept, X-Requested-With',
      'x-content-type-options': 'nosniff',
      'x-frame-options': 'deny',
      'x-github-media-type': 'github.v3; param=diff',
      'x-github-request-id': '4C99:01DD:8EAF359:9347154:64A2C583',
      'x-ratelimit-limit': '60',
      'x-ratelimit-remaining': '58',
      'x-ratelimit-reset': '1688392272',
      'x-ratelimit-resource': 'core',
      'x-ratelimit-used': '2',
      'x-xss-protection': '0'
    },
    data: {
      message: 'Bad credentials',
      documentation_url: 'https://docs.github.com/rest'
    }
  },
  request: {
    method: 'GET',
    url: 'https://api.github.com/repos/cia/rpl-tools/pulls/264',
    headers: {
      accept: 'application/vnd.github.v3.diff',
      'user-agent': 'octokit.js/2.0.10 octokit-core.js/4.1.0 Node.js/16.16.0 (linux; x64)',
      authorization: 'token [REDACTED]'
    },
    request: { hook: [Function: bound bound register] }
  }
}

It appears to me that it tries to post the report to github.com instead of github.mycompany.com. Where can I set up the correct endpoint for a report upload?

I am clueless as there is no mention of github.com in the code : https://github.com/getunlatch/jscpd-github-action/blob/main/main.js
If you find a lead, don't hesitate to open a PR :pray:

It started to work since the last July.
Cannot really say what was the problem or when it started to work.
Feel free to close the issue.


[CUR-473] Added group role, aria-label and aria-pressed to domain/subject/tier buttons

Description

Added role="group" and aria-label to container divs for domain/subject/tier filters in curriculum visualiser
Add aria-pressed="true" to currently active button in each filter group.

Issue(s)
CUR-473
How to test

Go to https://deploy-preview-2520--oak-web-application.netlify.thenational.academy/teachers/curriculum/science-secondary-edexcel/units
Test using voice over

@rightsaidjames was this what you were thinking for CUR-473?

Looks like sonar isn't happy https://github.com/oaknational/Oak-Web-Application/pull/2520#issuecomment-2179222138
Fair comment @rightsaidjames lets chat best approach

:tada: This PR is included in version 1.464.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


add SignKey gpg entity param to allow easier pgp signing of commits

Reopening of https://github.com/google/go-github/pull/1142
This PR creates a new param for the Commit struct called SignKey.
SignKey is an openpgp.Entity type which is the standard way of reading and validating pgp keys.
When specified the key will be used to sign the commit. This makes it so the user does not have to sign the key externally and duplicate some of the logic the CreateCommit function does.
To maintain backward compatibility, if the Verification.Signature is defined SignKey will have no effect.
This provides similar functionality that go-git has: https://github.com/src-d/go-git/commit/7b6c1266556f59ac436fada3fa6106d4a84f9b56
Note from the git docs: https://github.com/octokit/routes/blob/152c0b5d156844e17a1805d0509c9a0b7cfc848f/routes/api.github.com/git.json#L282
To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line]

So I wanted to make it less complicated 😄

@gmlewis fixed most of the comments you left. The only issue was with using getters on the createCommit object. they do not exist so I left those as is but used getters on the sub-objects that had them.
I also updated all the short names in the test file and defined them more verbosely.

I also updated all the short names in the test file and defined them more verbosely.

Just FYI... the other names were fine.  As you'll see in a lot of other tests, we use o for org and r for repo all over the place, and it would be nice to be consistent for these...
But is was just a bit challenging at a quick glance to figure out in the tests that:
...

m

was the commit message.  Thanks.

@gmlewis ready for round 2 👊.

added nil checks to both functions
added respective tests for those nil checks
renamed variable to start lower case

@gmlewis Just pushed, lmk if there is something else.

@gmlewis Fixed the issues.

checked for empty message
added respective test
simplified adding message (removed sprintf)

friendly ping @gauntface

@gauntface I would assume if commit.Verification is set then the user wants to use that to sign instead of the commit.SigningKey.
My assumption is that a default SigningKey is always passed and that Verification would only be passed in special cases which should override SigningKey.
Are my assumptions invalid?

Good discussion. Thanks, @gauntface and @anandkumarpatel !
I like the fact that the comment for SigningKey says Ignored if Verification.Signature is defined. so there shouldn't be much confusion in this regard.
Merging.

Thank you, @anandkumarpatel!
Merging.


Is there a way to get a Ref on a MaterialUI LeftNav Component?

This might be an enhancement request and not a bug but here is what I'm trying to do:
https://gist.github.com/railcar88/856b88d0f77ae046ffa0
My touch event goes into Header Handlers however the "leftNav" node cannot be found. Is this a bug and it should work, is there another way to gain access to the leftNav node or is there no way yet to find the material nodes?

That sounds as a bug - looks like transformation from DUs array to plain JavaScript object is not working well if embedded DUs are used. Will try to fix it soon

Should be fixed, please check it and let me know.

I get "TypeError: clo2 is not a function" where clo2 is derived from:
...
var onMenuClick = (function(e)
{
var node = Fractal__findDOMNode$Object_Object_(((c.refs)["leftNav"]));
var clo2 = (node["toggle"]);
var _1017;
var ignored0 = (function(arg20)
{
return clo2(arg20);
})(_1017);
});
...

Interestingly, if I change my HeaderHandlers module to this:
module HeaderHandlers =
let onMenuClick (c : Header) (e : Fractal.Component.SyntheticEvent) =
c.refs.["LeftNav"]?toggle()

Which is transpiled to this:
HeaderHandlers__onMenuClick$Unit_Unit_ = (function(c,e)
{
var clo2 = (((c.refs)["leftNav"])["toggle"]);
var _1020;
return (function(arg20)
{
return clo2(arg20);
})(_1020);
});

That's actually OK. According to Material UI docs FindDOMNode call is not needed - http://material-ui.com/#/components/left-nav


Unintelligible Pronunciation after Training from Scratch

Checks

[X] This template is only for usage issues encountered.
[X] I have thoroughly reviewed the project documentation but couldn't find information to solve my problem.
[X] I have searched for existing issues, including closed ones, and couldn't find a solution.
[X] I confirm that I am using English to submit this report in order to facilitate communication.

Environment Details
torch==2.3.0+cu121
Steps to Reproduce
Hi there, I'll try to detail as much as possible with my training setup and please let me know if I need to clarify some other things.
I'm training on a combination of English + Indonesian + Swahili audio, 44.1kHz. About 2h worth of data. I'm training from scratch with the following config:
target_sample_rate = 44100
n_mel_channels = 128
hop_length = 256
mel_spec_type = "bigvgan"

and am planning to use nvidia/bigvgan_v2_44khz_128band_256x since I cannot find 44.1kHz version of Vocos.
Here's the sample inference output: https://voca.ro/15EqoXsQYxVG
The voice quality sounds great, but it's just the content that is completely unintelligible. The audio should've contained the quick brown fox jumps..
I've double-checked with tokenization and confirmed that the input id mappings are correct.
Please let me know how I could solve this issue. Thanks in advance.
✔ Expected Behavior
No response
❌ Actual Behavior
No response

the smallest corpus we have tried is 24 hours LJSpeech, and with batch_size_per_gpu 38400 (8gpus)
100K updates to get pretty good result
so not sure if 2 hours set will work to train from scratch, maybe merge some open-source 44khz corpus to increase the data amount?

Thanks for reply @SWivid. I'am the modeler using your model and I also have same question like @w11wo.
Is the training command @w11wo is use is alright? README.md say the training using train.py..
@SWivid  Could you share the training command from the scratch showing the above "the smallest corpus we have tried is 24 hours LJSpeech, and with batch_size_per_gpu 38400 (8gpus) 100K updates to get pretty good result"
Best regards

def clear_text(text):
"""Clean and prepare text by lowering the case and stripping whitespace."""
return  [" "] + [syllabel for syllabel in text.lower().strip()]
this is tokenizer I used

You mentioned that you achieved good results at 100k updates with a setting of batch_size_per_gpu 38400 (8 GPUs). At that time, what was the value of max_samples?
Based on the default settings in train.py, LJSpeech consists of 30 batches per epoch. Did you achieve good results after training up to 100k under these conditions?
In my case, if I set max_samples to 8 and grad_accumulation_steps to 8, the number of batches increases to 200, which is about 7 times more. Does that mean I need to train up to approximately 700k updates to achieve good sound quality?

Hi @yuseungwoo ,

max_samples?, mixed_precision:?

64, fp16

if I set max_samples to 8 and grad_accumulation_steps to 8, the number of batches increases to 200, which is about 7 times more. Does that mean I need to train up to approximately 700k updates to achieve good sound quality?

Maybe not max_samples to 8, but only change the batchsize.
If use 1/8 batchsize, grad_accumulation_steps to 8, and train to 100k*8=800k updates

Hi all, I am also interested in training on the LJSpeech dataset and have not managed to train a competitive model.
My general settings are:
model: F5TTS_Small
batch_size_per_gpu: 19200
grad_accumulation_steps: 4
epochs: 4000
I'm training on 4 80GB A100s at fp16 precision. Specifically I'm training on the train split defined by NVIDIAs tacotron implementation.
After 4000 epochs / 400,000k steps, the model still fails to pronounce many sentences e.g. "The Warren Commission report by the president's commission on the assassination of President Kennedy"
It sounds like the alignment gets mixed up e.g. saying words like "assassikennedy"
Are there any tips on how to successfully train a model on LJSpeech?

@SWivid I fixed my parameters according to your comment.
exp_name = "F5TTS_Base" # F5TTS_Base | E2TTS_Base learning_rate = 7.5e-5
batch_size_per_gpu = 4800 # 8 GPUs, 8 * 38400 = 307200 batch_size_type = "frame" # "frame" or "sample" max_samples = 64 # max sequences per batch if use frame-wise batch_size. we set 32 for small models, 64 for base models grad_accumulation_steps = 8 # note: updates = steps / grad_accumulation_steps max_grad_norm = 1.0
epochs = 10000 # use linear decay, thus epochs control the slope num_warmup_updates = 20000 # warmup steps save_per_updates = 5000 # save checkpoint per steps last_per_steps = 5000 # save last checkpoint per steps

any updates ? I'm also working on training a small model with a limited dataset of around 100 hours. Curious to hear your progress. 😃


Allowing a developer to add further instructions to the generated Dockerfile for additional customisation.

In relation to the issue that was raised ( https://github.com/micronaut-projects/micronaut-gradle-plugin/issues/98 ) regarding the customisation of the Dockerfile generated, here is a PR that allows the addition of further instructions to be added.
The primary change was how the dockerfile and dockerfileNative tasks were being setup and executed.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

To highlight the output of this:
Extract from build.gradle:
dockerfile {
  args('-Dcom.sun.management.jmxremote', '-Xmx128m')
  instruction 'HEALTHCHECK CMD curl -s localhost:8090/health | grep \'"status":"UP"\''
  instruction 'RUN apk --update-cache --no-cache add tzdata curl && \\\n' +
    '    cp /usr/share/zoneinfo/Europe/Zurich /etc/localtime && \\\n' +
    '    echo "Europe/Zurich" >  /etc/timezone && \\\n' +
    '    apk del tzdata'
  environmentVariable('JDK_JAVA_OPTIONS', '""')
}

dockerfileNative {
  args("-Xmx64m")
  instruction 'HEALTHCHECK CMD curl -s localhost:8090/health | grep \'"status":"UP"\''
  instruction 'RUN apk --update-cache --no-cache add tzdata curl && \\\n' +
    '    cp /usr/share/zoneinfo/Europe/Zurich /etc/localtime && \\\n' +
    '    echo "Europe/Zurich" >  /etc/timezone && \\\n' +
    '    apk del tzdata'
}

This then results in the following Docker files being created:
Dockerfile
FROM openjdk:15-alpine
WORKDIR /home/app
COPY build/layers/libs /home/app/libs
COPY build/layers/resources /home/app/resources
COPY build/layers/application.jar /home/app/application.jar
EXPOSE 8080
ENTRYPOINT ["java", "-Dcom.sun.management.jmxremote", "-Xmx128m", "-jar", "/home/app/application.jar"]
HEALTHCHECK CMD curl -s localhost:8090/health | grep '"status":"UP"'
RUN apk --update-cache --no-cache add tzdata curl && \
    cp /usr/share/zoneinfo/Europe/Zurich /etc/localtime && \
    echo "Europe/Zurich" >  /etc/timezone && \
    apk del tzdata
ENV JDK_JAVA_OPTIONS=""

DockerfileNative
FROM oracle/graalvm-ce:20.3.0-java11 AS graalvm
RUN gu install native-image
WORKDIR /home/app
COPY build/layers/libs /home/app/libs
COPY build/layers/resources /home/app/resources
COPY build/layers/application.jar /home/app/application.jar
RUN native-image -H:Class=ch.osian.Application -H:Name=application --no-fallback -cp /home/app/libs/*.jar:/home/app/resources:/home/app/application.jar
FROM frolvlad/alpine-glibc
RUN apk update && apk add libstdc++
COPY --from=graalvm /home/app/application /app/application
ENTRYPOINT ["/app/application", "-Xmx64m"]
HEALTHCHECK CMD curl -s localhost:8090/health | grep '"status":"UP"'
RUN apk --update-cache --no-cache add tzdata curl && \
    cp /usr/share/zoneinfo/Europe/Zurich /etc/localtime && \
    echo "Europe/Zurich" >  /etc/timezone && \
    apk del tzdata

Thanks for the contribution!

Thanks for the contribution!


Bool fields are getting ignored when Post type is "form"

The bug is here: https://github.com/parnurzeal/gorequest/blob/85e45d300dea2897330729470524f2eaf2d7896e/main.go#L577
We are only looking for strings and numbers but SendStruct adds the boolean directly and gets skipped on s.Data key/value iteration.
https://github.com/parnurzeal/gorequest/blob/85e45d300dea2897330729470524f2eaf2d7896e/main.go#L520

Can be closed due PR https://github.com/parnurzeal/gorequest/pull/93


Failed to handle stdin with docker exec -i

The following case is failing trying to send some date by through a pipe.
echo data | docker exec -i "${container}" bash -c "cat > /f"
Here a script to run and confirm.
Note that it works for runc as runtime.
#!/bin/bash
content="test"

test_stdin() {
runtime=$1
#Run a container to run for 30 seconds
docker run --rm --runtime "${runtime}" -d ubuntu bash -c "sleep 30"
last_container=$(docker ps -l -q)
#Send by stdin to text to container | the container will save it in a file
echo $content | docker exec -i "${last_container}" bash -c "cat > /f"
#Check the file has the cogent previously saved
docker exec -i "${last_container}" bash -c "cat /f" | grep "${content}" || echo "failed"
}

echo "Check with runc"
test_stdin "runc"
echo "Check with cc-runtime"
test_stdin "cc-runtime"

this is a regression from 2.x to 3.0

From @amshinde "I tried reproducing the issue and was able to do so. The command just hangs.
But I do see that the file is successfully created inside the container with the right content, the container process does not seem to send the exit code to the shim process.
I can verify this from the shim logs as well, the contents of the file are sent, but it never receives an exit code."

@jcvenegas good news, https://github.com/clearcontainers/proxy/pull/170 and https://github.com/clearcontainers/agent/pull/162 fix this issue.
The root cause was both the proxy not redirecting empty messages, and the agent not handling the closure of stdin in such cases.

@jcvenegas I think this issue could be closed since clearcontainers/proxy#170 and clearcontainers/agent#162 have been merged. We might want to wait for the agent patch to reallly land into our clear-containers.img though.


Default content type for mailer incorrect

Hi,
Just been having some trouble with the mailer and sending multipart emails to gmail. If you configure the email as described in the "mailer guide" like so
email :email_notification do
    ...
    provides :plain, :html
    render 'notifier/new_notification_email'
end

the default content type is "multipart/mixed" not "multipart/alternative" as the guide incorrectly states.
Having "multipart/mixed" causes gmail to display both the plain and html versions of the email. Changing the email config as below (adding content_type)
email :email_notification do
    ...
    content_type 'multipart/alternative'
    provides :plain, :html
    render 'notifier/new_notification_email'
end

ensure the email is displayed correclty

I don't know if is possible to reopen this one... now some MUAs, and over some MTAs, shows only the last part, for example an attachement. No text content and no html content, because all are multipart/alternative, suggesting each part is just an alternate view of the same message.
I've tried to workaround it, but no results.

This looks like mail gem problem: https://github.com/mikel/mail/issues/522
I don't think it's related to the original issue.

I'll take a look but in my case the problem is with pdf attachments too. I think you are right and is a mail gem problem. Thank you very much, @ujifgc.


add lib to search path for inspect

closing in favor of https://github.com/Cyfrin/moccasin/pull/138


Fix: Handle Principal IDs in the front-end

Overview
Introduction of Principal IDs as the id type meant we couldn't use profile.id in the front-end in the same way. This PR introduces a naive application state for LinkedUp and manages actions that way.
Changes

Declare an application state to store search results and connections
Refer to search results / connections by their index instead of profile.id
Prettier

Note: Prettier wreaked havoc on formatting, so I'll explicitly call out changes as comments.

Quick test--Search result is returned and I see the Connect button, but clicking it didn't seem to do anything (or it is taking a really long time).


[Backport:1.11] DCOS-21122: fix(ServiceForm): fixes focus/change/blur behaviour

ℹ Backport of: #2761

This ~commit~ PR changes the onChange handler of the ServiceForm so that
it no longer implicitly sets state.editingFieldPath, instead a new
internal function handleFormFocus is introduced.
Closes DCOS-21122

LGTM! 👍

integration tests were green 👍
https://jenkins.mesosphere.com/service/jenkins/job/Frontend/job/dcos-ui-pull-requests-integration/640/

@juliangieseke did you change anything to make them green?

yes, i had to fix the tests, see commit message and:
https://github.com/dcos/dcos-ui/pull/2772/files#diff-0796ef68862d3b5d45e239ff56ee5be7R994,
https://github.com/dcos/dcos-ui/pull/2772/files#diff-d54799ec9bd45b564a6c8d09458706fb and
https://github.com/dcos/dcos-ui/pull/2772/files#diff-01382146b0071328e199fe6bff580fcd

hm, the first one slipped into the wrong commit :(

^ fixed, hopefully jenkins isnt acting up again 🤞


Add option to export audio files as .ogg

I would definitely appreciate a feature like this, as ogg would be a more efficent way to export audio. Plus I would prefer it over MP3.
Apparently Abyssbox is trying to implement this + opus exporting, which I would really love to see backported to Ultrabox. Opus exporting on Abyssbox seems to be in testing right now though.


Group byron commands in cardano-cli

Issue

No linked issue.

This PR results in breaking changes to upstream dependencies.

Checklist

[x] The work contained has sufficient documentation to describe what it does and how to do it.

[x] I have committed clear and descriptive commits. Be considerate as somebody else will have to read these.

[x] I have added the appropriate labels to this PR.

bors merge


Allows users to exclude a parameter from having an example

Includes 'No-example' in the doc-block
Useful for optional params in the request, or those that conflict with other params (ie only one of two are allowed)
Implement with a simple strpos() search

@mpociot If this is something you would consider adding I will add tests and documentation for this feature.

Pinging @mpociot @shalvah

@MarnuLombard thanks. Sure thing, just go ahead and add tests.

Codecov Report

Merging #552 into master will increase coverage by 0.1%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master   #552     +/-   ##
=========================================
+ Coverage     90.89%    91%   +0.1%
- Complexity      290    293      +3
=========================================
  Files            14     14
  Lines           692    700      +8
=========================================
+ Hits            629    637      +8
  Misses           63     63

Impacted Files
Coverage Δ
Complexity Δ

src/Tools/Generator.php
95.87% <100%> (+0.17%)
89 <3> (+3)
:arrow_up:

Continue to review full report at Codecov.

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

@MarnuLombard thanks. Sure thing, just go ahead and add tests.

Have added.
I've not updated docs (not sure if they're public)
I've not updated changelog (it seems that's done on merge)
Please let me know if there's anything else.

Before you look at this, I'd like to modify the approach I've taken as the parameters should still appear in the table of parameters, but not in the example.
The current approach excludes it completely.

Alright. Please update the docs in the docs/ folder. (They require a manual trigger by me, though.)

@shalvah I have refactored my approach.
Essenttially all params will end up in the ...Parameters arrays, but the No-example tags will be excluded from the clean...Parameters arrays.
I have ensured that all the blade files use only the clean...Parameters values. It was half and half.
As best I can imagine it, this couldn't cause a BC - but I'm not 100% sure

@shalvah Tests now pass.

@shalvah Tests now pass.

Well, they pass to the same extent that the tests pass with Travis CI on master.

@shalvah  Are you happy with this

Awesome. Thank you.


LiveShare support

Two parts to this:

enable VS to be a LiveShare client via the Python Language Server
prevent regular Python support interfering when VS is a LiveShare host

🎉


Refactor banners and show them based on domain so same build can be deployed to production

Mirrors how we handle banners in web wallet:
https://github.com/oasisprotocol/oasis-wallet-web/pull/1447
https://github.com/oasisprotocol/oasis-wallet-web/pull/1491/commits/7729c966e2105d9f6c2d17a0927983b0cc3f89f6
https://github.com/oasisprotocol/oasis-wallet-web/pull/1457

Do we really need a banner when developing locally?

Generally I'm OK with this, except that I would treat localhost as an exception, and don't show any banners there.

That seems safe :+1:


Okta sign-in integration for front-end

FOR PURVIEW ONLY DO NOT MERGE 🦖
Description
Added flow for Okta Sign in for the Front End as well as a PrivateRoute Component
DEPENDENCIES CHANGED:
react-router v6alpha => v5.1.2
react-router-dom v6alpha => v5.1.2
DEPENDENCIES ADDED
crypto-broswerify
nanoid
local-storage
querystring
COMPONENTS ADDED
(all in ./src/components/util)
generic-redirect.jsx
login-redirect.jsx
private-route.jsx
Dashboard route made private
changed react-router syntax to v5 acceptable
add onClick handler in /login for okta login redirect
Type of change
Please delete options that are not relevant.

[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] This change requires a documentation update

Change Status

[x] Incomplete/work-in-progress, PR is for discussion/feedback

Checklist

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] My code has been reviewed by at least one peer
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] There are no merge conflicts

@Aaroneld please resolve merge conflicts and remove "DO NOT MERGE" message in description since you indicated this is ready. Thanks!


Configuration should not be global

Different instances of TurboNavigationController might need to use different user agents and web view configurations (see #6). Having a single global source makes this impossible.
Ideally, a developer can pass an instance of TurboConfig to the controller instead of relying on global state.

I haven't had a single time where this was actually relevant yet. So I'm going to close this for now.
Please comment if you have a need for this!


In order to build an operating system using the stable channel rust, what problems need to be solved?

All the operating system articles about rust you have seen so far are compiled using nightly channel rust.
This works very well at present, and the articles you write are also very interesting and easy to understand. This has provided us with a lot of help in learning about operating system knowledge. I am very grateful for this.
But building a new operating system with the stable channel rust sounds more interesting and practical. Such a new operating system will also make it easier for ordinary users (non-developers) to accept and try, after all, nightly always has a latent meaning of instability.
So, based on your knowledge and information from the community, what other issues need to be resolved in order to use the stable channel rust to build a new operating system? A to-do list suggestion might be a good idea, thank you very much!

A probably incomplete list of noghtly only features currently being used:

[ ] Inline asm (https://github.com/rust-lang/rfcs/pull/2850)
[ ] Custom target specifications
[ ] #![feature(custom_test_frameworks)]
[ ] extern "x86-interrupt" fn
[ ] #![feature(alloc_error_handler)]

In my lib.rs file, I also have the following:

#![feature(const_fn)]
#![feature(core_intrinsics)]
#![feature(custom_test_frameworks)]
#![feature(trait_alias)]
#![feature(alloc_layout_extra)]
#![feature(const_in_array_repeat_expressions)]

But since I tried to extend the OS's features a bit, a couple might not be part of the original blog OS.
That seems quite a lot to be honest, I wouldn't be surprised if all those features stay on the nightly channel for a few years (tho I'm sure workarounds do exist sometimes).

Many of these features could be replaced by some stable features, but it would be cumbersome. For example, inline assembly can be replaced by using an external assembler, but this adds another compilation dependency and probably results in slower code (since the compile can't optimize external assembly).
The two blockers (i.e. features that are strictly necessary) of the mentioned features are in my opinion:

Custom target specifications: While stable rustc can compile for a custom target in theory, the core library is not available for the custom target. Since core uses unstable features itself, compiling it is only possible with a nightly compiler. (You can set the RUSTC_BOOTSTRAP environment variable to bypass this, but this is stricly discouraged because that variable should only be used for building Rust itself.) See https://github.com/rust-lang/wg-cargo-std-aware/ for ongoing work to fix this.
alloc_error_handler: There is no way around this feature if you want to use the alloc crate. See https://github.com/rust-lang/rust/issues/51540 for more info.


Remove create and delete options for datasources

Description
[Describe what this change achieves]
Issues Resolved
[List any issues this PR will resolve]
Check List

[ ] New functionality includes testing.

[ ] All tests pass, including unit test, integration test and doctest

[ ] New functionality has been documented.

[ ] New functionality has javadoc added
[ ] New functionality has user manual doc added

[ ] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Spoke with @derek-ho no need to keep this PR.


cmd/go: run with "--" leaks "--" into os.Args

When -- is used to separate arguments from input files to go run, the -- is passed to the executed program as os.Args[1]. It should not be. To reproduce:
x.go:
package main

import (
	"fmt"
	"os"
)

func main() {
	fmt.Println(os.Args)
}

x2.go:
package main

Execute:
$ go run x.go x2.go -- abc

Result:
[/var/folders/jw/xrvq7wz95p5bwvjyx9yc2npm390cfb/T/go-build390645411/command-line-arguments/_obj/exe/gr -- abc]

Want:
[/var/folders/jw/xrvq7wz95p5bwvjyx9yc2npm390cfb/T/go-build390645411/command-line-arguments/_obj/exe/gr abc]

I don't think -- is an explicitly supported feature. In fact, I think it was explicitly rejected in the past. What you're seeing is a side effect: once files no longer match *.go, they're arguments.
Yes, cmd/go/run.go's func runRun seems to confirm:
func runRun(cmd *Command, args []string) {                                                                  |Warning (server): Unable to start the Emacs server.
        raceInit()                                                                                |There is an existing Emacs server, named "server".
        var b builder                                                                                |To start the server in this Emacs process, stop the existing
        b.init()                                                                                |server or call `M-x server-force-delete' to forcibly disconnect it.
        b.print = printStderr                                                                               |
        i := 0                                                                                |
        for i < len(args) && strings.HasSuffix(args[i], ".go") {                                            |
                i++                                                                                |
        }                                                                                |
        files, cmdArgs := args[:i], args[i:]                                                                |

Blech. And adding it was explicitly rejected? Sigh, ok. Guess it is working as intended. (Yes, yes, I know, don't use go run.)