[TwigComponent] attributes.has() method

Q
A

Bug fix?
no

New feature?
yes

Issues
-

License
MIT

Provide a ComponentAttributes::has() function to be able to check via {{ attributes.has('foo') }} whether the attribute has been passed.
I would like to show the use case in the following example. Using attributes.has('href'), I check whether the TwigComponent has set an 'href' attribute when it is called. If so, an <a> tag should be rendered, otherwise a <button> tag.
{# templates/components/Button.html.twig #}
{% set element = attributes.has('href') ? 'a' : 'button' %}

<{{ element }} {{ attributes }}>
    {% block content %}{% endblock %}
</{{ element }}>

Could we implement ArrayAccess to simplify all this ?

Solid use case. Trying to think if there's any downsides to @smnandre's suggestion.

Solid use case. Trying to think if there's any downsides to @smnandre's suggestion.

Hmm... let's say we would implement ArrayAccess... would the add() and offsetSet() methods become one? And if so... what would someone expect when using offsetSet(), for example? That you can add any attribute from inside? And what happens then with the custom logic from the current add() method?
And remove() would therefore become offsetUnset(), wouldn't it?

I'd implement only offsetExists and offsetGet, and throw a runtime exception in the two others..
it would "just" be syntaxic sugar to ease usage in templates :)

Because ComponentAttributes is a bit complex and we've been working a lot with subtle additions to it lately, I think we should keep it simple and just add has(). Thanks @barbieswimcrew!


feature: default filters vs opt-in

Checklist:

[x ] I've searched for similar issues and couldn't find anything matching
[x ] I've discussed this feature in the #k8sgpt slack channel

Is this feature request related to a problem?

[ ] Yes
[ x] No

As we start to build out more capabilities, there are those that are not necessarily catching "errors" but more best-practice or good guidance on how to operate with Kubernetes. One such example os PDB ( Pod disruption budget ), it is not an error not to have this on a deployment/sts/ds but it is good practice for when you wish to roll a small deployment without loss of availability.
I propose that we have a mechanism to list/set default filters
e.g.
k8sgpt filters list
> Pod
> Service
> Ingress
etc..

Then you could add or remove a filter
k8sgpt filters add: <Resource>
// Check if its found

k8sgpt filters remove: <Resource>
// Check if its found

This would then form the basis of a new array we would pull from viper and loop over
e.g.
func RunAnalysis(ctx context.Context, filters []string, config *AnalysisConfiguration,
	client *kubernetes.Client,
	aiClient ai.IAI, analysisResults *[]Analysis) error {

      // HERE WE WOULD BUILD THE ANALYZER MAP BASED OFF OF viper.Get("default_filters")

	// if there are no filters selected then run all of them
	if len(filters) == 0 {
		for _, analyzer := range analyzerMap {
			if err := analyzer(ctx, config, client, aiClient, analysisResults); err != nil {
				return err
			}
		}
		return nil
	}

	for _, filter := range filters {
		if analyzer, ok := analyzerMap[filter]; ok {
			if err := analyzer(ctx, config, client, aiClient, analysisResults); err != nil {
				return err
			}
		}
	}
	return nil
}

As we discussed together, I'm fine with it. I'm interested in proposing an implementation for this issue.

@matthisholleville: Assigned this issue to you


When changing layer with tile pattern active, the pattern gets messed up

Godot version
c2a616f
System information
W10
Issue description

The blue and red icon are in different tile atlases.
Steps to reproduce

Draw some tiles using multiple atlases as sources
Use Picker tool to select a pattern
Change layer

Minimal reproduction project
AtlasPatternMess.tscn.txt
EDIT:
This actually happens even if the tiles are from the same atlas:

Reopening. The issue is back in 4.3 dev6, likely after TileMapLayer changes.
CC @groud


Does not work with nuxt i18n

I found out what the problem is, when using nuxt i18n, it constantly triggers when mounting and once does not work, there may be conflicts in other places for the same reason. How can this be solved?

closing due to inactivity


Couple of perf tweaks for Zig and C++

I tried to make this easier to review commit-by-commit.
Couldn’t squeeze a lot of perf out of C++ version in the time limit I set myself. I suspect the JSON parser might not be very good, tbh.
But here are the perf results.
Before

After

Huge improvements, made some additional changes to Zig and merged all this in #11 ... Thank you!!


Advance Restore Options v1

Issue
Work tracker for the first pass on introducing advanced restore options to corso.
V1 addition include:

Item Collision Handling
In-place restore
Restore to alternative resource

Work Tracker

[x] Refactor RestoreConfig struct to own restore configuration.
[ ] oneDrive collision handling.
[ ] exchange collision handling.
[ ] oneDrive in-place restore.
[ ] exchange in-place restore.
[ ] CLI flags for in-place restore.
[ ] https://github.com/alcionai/corso/issues/3382
[ ] oneDrive restore-to-resource.
[ ] exchange restore-to-resource
[ ] CLI flags for restore-to-resource.

Graph api automated handling of file conflicts is either buggy or non-functional for drive items.  I've opened a ticket here: https://github.com/OneDrive/onedrive-api-docs/issues/1702


cargo: don't depend on zbus' async-io feature when we use tokio

Couldn't test this just yet though

Let us assume if it builds on CI, it works. Will do some more testing later


Update date selected and empty input

I cannot update the selected date of my datepicker directly in JS.
And I would like to have my input empty rather than having the default set to today.

Hi, is a problem with the filter "mFormat" and the createMoment function.
I solved with this.
Module.filter('mFormat', function () {
    return function (m, format, tz) {
        if (!(moment.isMoment(m))) {
            if (m) {
                return  m;
            } else {
                return '';
            }
        }
        return tz ? moment.tz(m, tz).format(format) : m.format(format);
    };
});

createMoment: function (m) {
      if (tz) {
        return moment.tz(m, tz);
      } else {
          if (/\d\d\/\d\d\/\d\d\d\d/.test(m)) // Test with my format
              return moment(m, 'DD/MM/YYYY');
          else
              return moment.isMoment(m) ? moment.unix(m.unix()) : moment();
      }
    }


script replace is not work when using single quote

I have a project where the prettier plugin will replace all double quotes with single quotes
The following code is working
<script type='module' src="./main.ts"></script>

The following is the formatted code, and the script replacement will be invalid at this time
<script type='module' src='./main.ts'></script>

Just to confirm, is this only an issue with HMR/dev mode?

Right, yeah, should be simple to fix, thanks


Dns entries

Description
Changes proposed in this pull request:
-added dns Entries as Extention
-(forgot to fork at the first pull request for Kyma Dashboard)
Related issue(s)
closes #1955

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.2 out of 3 committers have signed the CLA.:white_check_mark: mrCherry97:white_check_mark: akucharska:x: Julius-SchmidtYou have signed the CLA already but the status is still pending? Let us recheck it.

/retest


ConfigurationUpdateEvent should have sourceConfig.launch if launch.json deleted

I know you wanted to refactor this, but currently if a user edits a launch.json the ConfigurationUpdateEvent correctly has event.sourceConfig.launch.
However if the user deletes the launch.json another configuration update event is recieved however the event.sourceConfig.launch is missing.
If we decide to continue supporting this I believe that in both cases we should send out the event.sourceConfig.launch.

I am planning to remove the sourceConfig from event and have an API to just get the sourceConfig.

Ok, in that case it would be great if the API could notify me that launch.json got deleted - e.g that sourceConfig.event somehow has launch.
If that is not the case then both Tasks and Debug would have to listen on file events and react properly on tasks / launch.json deletion.
The alternative is to react on all configuraiton change events which feels like too much for me

if getConfiguration('launch)' is undefined, then does that mean launch file is not there?

Yes, but I do not think that would be helpful for me.
Just think of it frmo a debug or tasks point of view, we need an event when something changes in launc.json or tasks.json respectively (including the deletion of that file).
I am opne to suggestions on what to do from my side, though I find it ugly that I would need to listen deletion file events

I see the use case. I think exposing such an event with source does not scale well in a MR workspace. In a MR workspace we can have n+1 launches or tasks.
The general pattern I see in the consumers of configuration API is to listen to the configuration change event and compare the old and previous value to see if the configuration they are interested in is changed or not. Compare can result in following states

created
changed
deleted
not changed

This problem got solved by new fine grained configuration change event. Please reopen if there is anything missing.


Update M1 according to feedback

https://milestones.projectcatalyst.io/projects/1000117/milestones/1

Several changes have been merged in this direction (commits 20f2cfedc5ac85a50c289896d3d355b6cff65f12 to b4b229d4dde68ae4773a5b4435dae3fc23eb76fa)
Still waiting for reviewers feedback to close the ticket


Add demographics to mentor model

Add the following to mentor model

[ ] birthday (required, date) - for age demographics
[ ] gender (required, text field) - for gender demographics
[ ] race_ethnicity (required, M2M?) - for race demographics
[ ] work_place (optional, textfield) - for future job board
[ ] phone (optional, textfield) - for contacting, later
[ ] home_address (optional, textfield) - for mentor reach demographic
[ ] shirt_size

Add to mentor profile page.

[ ] birthday should be date picker
[ ] gender should be text field
[ ] race_ethnicity should be a multi-checkbox
[ ] work_place should be a text field
[ ] phone should be validated field
[ ] home_address should be a google api search

This is a duplicate of #343. We should keep this one though, as it is more descriptive.


Multi day event, but not in a row.

Hi,
I really like this Plugin, it was so easy to implement a calendar for my needs.
But there is one feature left I'm missing. I would like to insert events that can occour on multiple days, but not in a row. More like a seminar that takes places in march and in september.
Of course I could insert them as two events, but when the dates lie in the same month the event gets listed double on the eventlist.
Does someone know a solution to show them in the eventlist only once but mark every date in the calendar ?
Maybe this should be labeled as enhancement or change request.

Thanks at @DasPartyEinhorn, unfortunately there are no plans to build this but I'll tag it enhancement for the future.


Backend linting

@heatherlogan-scottlogic I've added a bunch of rules to the eslint file on the frontend. If you're ok with those, I'll also make a similar file for the backend and go through the code and fix any linting issues.

Closing this as it's covered now by #232


Updating Calling doc for GA

@raosanat : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@raosanat : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@raosanat : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@raosanat : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@raosanat : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@raosanat : Thanks for your contribution! The author(s) have been notified to review your proposed change. @chpalm

#sign-off


Reorder item inside a list

Hello.
Sorry if is not the right place to ask.
How is possible to reorder items inside a list using angular-dragdrop?
Here is my stack overflow question:
http://stackoverflow.com/questions/27799766/angular-dragdrop-how-to-reorder-items

Unfortunately, It's not possible as of now, you have to use ui-sortable instead. I'm in the process to implement sorting in angular-dragdrop but do not want to give any false commitment.

oh thank you very much!
Monday morning i will try it!
If it works i will really build a sculpture in your honor!

@Psabot how can we retrieve elemToInsert i.e. index of new element? I am kinda confused here. I also badly want to implement sorting :(

@Psabot : I'm half-way done with insertInline option but still figuring out how to do animations with ngAnimate. Take a look at: https://github.com/codef0rmer/angular-dragdrop/commit/bbb6ea79f4ee72f203b240e69cdc15aa94a908e0

@codef0rmer : is there any news about insertInline option?
Thank you for your work!


[no-dupe-args][no-redeclare] False positive with object destructuring and inline type

Tell us about your environment

eslint-plugin-typescript:	20.1.1

Please show your full configuration:
module.exports = {
  root: true,
  env: {
    browser: false,
    es6: true,
    node: false
  },
  extends: [
    'plugin:vue/essential',
    '@vue/standard'
  ],
  plugins: ['typescript'],
  parserOptions: {
    parser: 'typescript-eslint-parser',
    jsx: false
  }
}

What did you do? Please include the actual source code causing the issue.
function foo ({ v1, v2 }: { v1: number, v2: number }) {
}

What did you expect to happen?
year and month is not duplicated, its inline type definition
What actually happened? Please include the actual, raw output from ESLint.
Duplicate param 'v1'      no-dupe-args
Duplicate param 'v2'     no-dupe-args
'v1' is already defined   no-redeclare
'v2' is already defined  no-redeclare

issue is with parser not this plugin 👍
visitor-tree is not emitting it as type


feat(quantic): add facet tests

https://coveord.atlassian.net/browse/SFINT-4063
This PR adds a bunch of end to end tests to cover the Quantic Facet component (with the newly added options).
It also improves the configurator to better support numeric and boolean options.
Configurator panel

Preview panel

Closing this PR because test format differs too much from Atomic. Will open a new PR after the refactor.


[MODIFY] #35  inner 클래스 추가

Resolved #35

Codecov Report

Merging #38 (3c3d72c) into main (fb5bbdd) will decrease coverage by 0.44%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##               main      #38      +/-   ##
============================================
- Coverage     18.40%   17.96%   -0.45%
  Complexity        9        9
============================================
  Files            13       13
  Lines           163      167       +4
============================================
  Hits             30       30
- Misses          133      137       +4

Impacted Files
Coverage Δ

...n/enterprise/code/EnterpriseEmployeeCountCode.java
0.00% <0.00%> (ø)

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 fb5bbdd...3c3d72c. Read the comment docs.


Proposed 1.0

This is the state_object branch with the following changes:

The loose parser was also converted to object style
The plugin system is now based on method overriding rather than hooks, to make it easier to override various aspects of the system without us defining a hundred hooks. See the jsx branch for the JSX plugin ported over to this style.
The acorn.tokenize exported function was removed, and replaced with acorn.tokenizer, which simply returns a Parser instance that you can call getToken on to get the next token. (Such objects are now also iterable.)

@RReverser I want to bring something like this out as 1.0.0. Does it still sound okay to you?

Also, if you have any further things about the API you'd like to deprecate or change, now is a good time to start discussing/executing those, since I'd like to get our API in a state where we won't have to change it for a while.

As I mentioned in the other PR, perhaps consider making the prototype of TokenType() take an options parameter instead of four optional parameters so that reading a TokenType instantiation doesn't require looking at the implementation.

var TokenType = exports.TokenType = function(label, opts) {
    this.label = label;
    this.keyword = opts.keyword;
    this.beforeExpr = !!opts.beforeExpr;
    this.isLoop = opts.kind === "loop";
    this.isAssign = opts.kind === "assign";
    this.prefix = opts.kind && opts.kind.indexOf("prefix") > -1;
    this.posfix = opts.kind && opts.kind.indexOf("postfix") > -1;
    this.binop = opts.binop || null;
    this.updateContext = null;
};

...
// Less readable
eq: new TokenType("=", true, null, "assign"),
// More readable
eq: new TokenType("=", {keyword: true, kind: "assign"})

+1 to @Naddiseo
Also, let me bring agreed changes from ESTree (since most of the ES6-related issues are now resolved and agreed) before this release if you don't mind (I'll do it tomorrow or on weekend).

Patch 1255882 cleans up the TokenType constructor arguments. I guess I'm so used to Tern that I assume everyone can see argument names.

@RReverser Do you have a clear vision of how the splitting up and module building should work? In another project, I'm using ES6 modules, and have a pre-publish build step that runs babelify to combine the modules into a single library. But I don't have experience with bundling up a bunch of ES6 modules into separate files (since we do not want to force everybody to load the loose parser and the tree walker when they don't need them). Do you have any ideas on how to approach that?
Also, would you be okay with moving the project to a semicolon-free code style? I've found omitting semicolons to make a surprisingly large (positive) difference in the look and feel of code.

Do you have a clear vision of how the splitting up and module building should work? In another project, I'm using ES6 modules, and have a pre-publish build step that runs babelify to combine the modules into a single library. But I don't have experience with bundling up a bunch of ES6 modules into separate files (since we do not want to force everybody to load the loose parser and the tree walker when they don't need them). Do you have any ideas on how to approach that?

I think, for npm we can simply use ES6 modules with transpilation into CommonJS, so that people can manually load exactly what they need. As for the browser version, we can ship bundled regular parser + loose parser as separate files and for other cases (which are more specific and so rare) propose to do custom builds on their own as do lodash, jquery and others.

Also, would you be okay with moving the project to a semicolon-free code style? I've found omitting semicolons to make a surprisingly large (positive) difference in the look and feel of code.

Not to start bikeshedding, but personally, I find semicolon-free code style pretty unpleasant and would rather leave things as is.

Some incompatible changes in the options:

Replaced strictSemicolons and allowTrailingCommas with onInsertedSemicolon and onTrailingComma (callbacks), since these are usually used for linting, and reporting on them can be done without aborting the whole parse. (The old behavior is trivial to emulate by passing a callback that raises an exception.)

Renamed forbidReserved to allowReserved, inverted its meaning and default value.

I have a couple more things to be fixed on my side. Another thing we should consider (but it should not necessarily be in scope of 1.0) is lookahead - since tokenizer is now self-contained and not controlled by parser, it should be pretty cheap thing to do.
It would especially help to avoid complicated tricks for {x, y} vs {x, y} = 1, [x, y] vs [x, y] = 1, async(x,y,z) vs async (x,y,z) => ... and others.
Do you have any ideas on how we could implement such a "look-out" that would look-ahead after the corresponding closing bracket for current token if it's one of {/[/(?

@RReverser, that might be a useful utility function to have: skipNested(delim, (containedAST) => {}). If you have a '{' and want to skip to the matching '}', or get the ast in-between it'll register a callback to be called when the matching delim is found.

Is {x} = {10} valid ES6? I noticed Babel doesn't accept it, most likely because Acorn currently doesn't allow it.
Anyway, I'm not sure lookahead is a better solution that the current trick. It will definitely have a performance impact (reifying tokens, lots of them, since it has to happen for every {} or [] block) bigger than the current AST-node-transmuting trick.

I think it will be possible to optimize it later (like, caching corresponding closing brackets for nested stuff during the first loop and so), but avoiding tricks and enforcing spec-compliant parsing might give more important benefits.

@marijnh Looks like I'm done on my side, sorry for making it so long. So we just need to fix yield-related stuff and good to go.

Ok, looks like if you want to release now it's better to remove SuperExpression thing since new suggestions appeared and keeping it as Identifier would be safer. In any case, just let me know.

I haven't followed that discussion -- but if you think SuperExpression should go, do add a patch

It's not that it should go, but rather new arguments appeared when we almost agreed on whether it should be SuperExpression or just Super, and it's not clear yet which one will work. And I don't want to have release with controversial name, so if you want to release now, I'll just revert to Identifier.

I'm not sure I'll get around to releasing today -- I also want to set up the module/babel stuff first, and I want to give you a chance to properly look at those. So if you think the discussion will move forward in a few more days, let's wait it out (and put some pressure on the people involved to just make a decision already, since the issue seems somewhat trivial).

A lot of issues are pretty trivial, but you can't just stop bikeshedding :) Anyway, at least Super thing seems to evolve, so we should be fine in couple of days, if not - will release with Identifier and fix later.

@RReverser Re: omitting semicolons. Could you expand on why you find that unpleasant? Say we have...
export function parse(input, options) {
  let p = new Parser(options, input)
  let startPos = p.options.locations ? [p.pos, p.curPosition()] : p.pos
  p.nextToken()
  return p.parseTopLevel(p.options.program || p.startNodeAt(startPos))
}

Doesn't that look wonderful? It's almost as if we've left the language's C heritage behind.

(Context: I'm also working on a sizeable project completely written in ES6/semicolon-less style, and am finding it painful to move back to inserting semicolons everywhere. CodeMirror will be moved to that same style as well somewhere in the future.)

(@RReverser I re-applied your two patches from today on top of my work and force-pushed, since I had no idea how to cleanly rebase on top of them given the huge overhaul in file structure I applied.)

@sebmck  e88a543 should fix the for/in issue

Ok, I'll look into it. And I see that you went with semicolon-free style.

Don't look at 685b51e -- it breaks the build.

This is ready to review now.
I've also updated the jsx branch in a few minor ways to work with the new code.

Awesome work! Most likely I'll review in on Sunday and reply here.

A funny thing is that (on Node & Chrome) the module split actually made the code run faster. I'm have no explanation for that (except "no one can predict what the JIT will do"), but it's nice. The (output) code did get slightly bigger (~10% in lines) due to Babel output junk and extra wrapping closures.

if (!node.body) node.body = []

@marijnh Any chance you would like to enforce braces for consistent styling? One-liners are sometimes cool, but not when you want to read code and have visual separation of concerns (condition and body).

@marijnh Any chance you would agree to enforce braces for consistent styling?

I've never found the argument that braces make code easier to read very convincing. The difference between a condition and a body is perfectly unambiguous even without braces, and adding them for one liners feels like needless ceremony to me. So no, I really do not want to move to enforced-braces style.

The difference between a condition and a body is perfectly unambiguous even without braces

IMO it depends on personality and habits, and having optional stuff like separate block for body included is a common denominator so that code is readable for everyone. Also, it's easier to read diffs in future when new statement to body is added (since only one new line appears instead of affecting entire line with both condition and previous statement).

IMO it depends on personality and habits

It always does. But as the author of the project, I feel entitled to have the code fit my personality. I've never had trouble with this particular habit, and I think brevity is often a valuable property of code.

But as the author of the project

Well, that's kinda valid argument but I want to continue contributing ES6, 7+ support to it, so trying to find some common denominator that would suit at least both of us.

Sure, but, in all seriousness, are brace-less bodies preventing you from effectively contributing to this project? I am willing to take concerns seriously (as I did with project attribution and modularization), but I just don't think that in this case, where we simply have different opinions on a very taste-based issue, I need to yield to your taste.

Well, I prefer KISS principle. Styling and tastes can be different, but rules how they are determines should be at least that simple that you don't even need to think of them while writing some new code.
For example, in general I like AirBnb style. They point both options as valid:
// bad
if (test)
  return false;

// good
if (test) return false;

// good
if (test) {
  return false;
}

Those rules are pretty simple - if you have one statement and it nicely fits on one line, you put it there, if not - create a block. Just indentation is discarded as not visual separation.
But in current code I see things like i.e.:
if (this.options.locations) { node.loc.end = pos[1]; pos = pos[0] }
...
if (startPos) {
    this.pos = startPos
    this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos))
    this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length
}
...
if (!node.body) node.body = []
...
if (!topLevel)
  this.raise(this.start, "'import' and 'export' may only appear at the top level")

So it becomes unclear where border lies - sometimes we do put statements onto separate lines, sometimes we don't, sometimes we do one-liners only for one statement in body, sometimes it's one-liner even for multiple statements (block), sometimes for one statement we put body on the same line, sometimes on separate one and so on and so on.
What I'm asking here is not to change tastes but rather to have same consistent styling across all the code that can be easily followed and doesn't differ on case-by-case basis. Thoughts?

I like being free to lay out statements in any way that happens to feel appropriate in that context.

if (this.options.locations) { node.loc.end = pos[1]; pos = pos[0] }

This is a short aside, which happens to consist of more than a single statement.

if (startPos) {
this.pos = startPos
this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos))
this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length
}

This is a significant branch doing multiple non-trivial things. A block can be appropriate for that.

if (!node.body) node.body = []

Another simple aside, but since it's a single statement, we can do away with the braces.

if (!topLevel)
this.raise(this.start, "'import' and 'export' may only appear at the top level")

Trivial, but rather long, so I gave the body its own line on that account.
Since the JS grammar does not require any deep analysis when distinguishing sub-statements from statements, I prefer to let the writer of the code decide how to format these. I don't expect all contributors to follow the same consistent style because it really does not matter. If you're used to code that enforces a certain narrower style, this might be slightly jarring, but it is something that's easy to get used to.

I prefer to let the writer of the code decide how to format these

But you still did reformat my lines, so I though there should be some kind of rule that would be easy to follow.
But if we really don't care about coding style, I'm not sure there is something else for me to review given that functionality stays pretty much the same, just refactored. (Those commits that did change functionality look good to me and discussions were in relevant issues/PRs)

This has landed, and 1.0.0 has been published.


Roll engine 3ffa36295234..c2fd10ad1d48 (1 commits)

https://github.com/flutter/engine/compare/3ffa36295234...c2fd10ad1d48
git log 3ffa36295234..c2fd10ad1d48 --no-merges --oneline
c2fd10ad1 Roll src/third_party/skia 2a138544646d..05caa69a3f5a (1 commits) (flutter/engine#6512)
The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

@rmistry @liyuqian : New roll has been created by https://autoroll.skia.org/r/flutter-engine-flutter-autoroll

Commit queue failed; closing this roll.


Report uninteresting chain sync candidates

The ChainSyncClient keeps following all candidate chains that we could theoretically still switch to, e.g., longer chains, forks that don't fork off more than k blocks in the past, but also less interesting candidates, e.g., a chain that is behind ours or a recent fork that is shorter than our chain.
In the decentralised era it will become more important to disconnect from such less interesting candidates. They should be degraded from hot to warm nodes.
To detect such nodes, introduce a new thread that watches all chain sync candidate chains and the current chain, so that it can give each candidate chain a "pointlessness" score, which can be used by the P2P governor to cycle out the nodes corresponding to the most pointless candidate chains. By having access to all candidate and the current chain, we have a better, global  view of the node.
Let's make this a new thread as the ChainSyncClient is already complex enough.

@njd42 @coot Now that the P2P governor is has been realized, does this idea still appeal to you?
In particular, I wonder if the existing logic for churning peers already renders this idea moot? If so, we can close this Issue.

I chose the "Help needed" status because it's blocked by my question to Networking in the preceding GitHub comment.

Such nodes would: a) never be the first to supply a new header; b) never be first to be asked to get a block - so never first to supply a block.
As such they would rank towards the bottom in the churn process and therefore get churned out.
If that is sufficient, we already run a mechanism that will discard them (over time) [unless they are in local root peers - they are not subject to that assessment]

We also don't want to prioritise disconnecting from short forks which might win or lose.  Churn works on a larger time scale so that we can accommodate shorter diruptions which naturally occur in the system.

@nfrisby from our perspective this can be closed.


drivers: pinmux: stm32f7: Add FMC pinmux entries to stm32F7, I2C_3/LT…

Add FMC pinmux entries to stm32F7, I2C_3/LTDC/FMC to stm32f746g_disco
Working on #15591, this commit adds the rest of the pins needed ready for future commits with the driver code. I have a proof of concept working, but I'm cleaning it up before committing.

@k0d, do you plan to push more changes soon ?
For now I'm holing on the review waiting for you to push the remaining parts, it's not easy to review incomplete work.

I can push more changes in the next few days. So you can hold off the review. I was trying to not make the pull request too big, so reviews are easier.

I can push more changes in the next few days. So you can hold off the review. I was trying to not make the pull request too big, so reviews are easier.

Sure, this is a good practice thanks for that. What you can do is to split into features like I2C/LTCD rather than by SW components. For instance, I guess that your I2C changes are rather limited and will be sooner ready to be reviwed.

I think I'll split this 'project' into 3 pull requests...

FMC/SRAM (including pinmux entries)
LTDC (including pinmux entries)
Add all missing pinmux/alt funcs entries for STM32 (including the i2c_3 one).

So I'll close this pull request for now...and open a new one when I'm ready.


artwork hierarchical clustering - should we highlight other clusters?

The current cut off (set to recapitulate Phase 1) highlights four non-995 variant carrying clusters - these look to have interesting properties, perhaps we should highlight them.

No, concentrate on kdr variant here, the other non-syn carrying clusters with come out in later analyses.


[SuperEditor] Can't type a space character on web when SuperEditor is the child of a SingleChildScrollView

Package Version
super_editor, git main branch, 304e778
To Reproduce
Wrap the SuperEditor in a SingleChildScrollView in demo_empty_document (see below), run in chrome and attempt to type spaces into the editor.
Minimal Reproduction Code
--- a/super_editor/example/lib/demos/demo_empty_document.dart
+++ b/super_editor/example/lib/demos/demo_empty_document.dart
@@ -35,13 +35,13 @@ class _EmptyDocumentDemoState extends State<EmptyDocumentDemo> {
 @override
 Widget build(BuildContext context) {
   return SafeArea(
-      child: SuperEditor(
+      child: SingleChildScrollView(child: SuperEditor(
       editor: _docEditor,
       document: _doc,
       composer: _composer,
       gestureMode: DocumentGestureMode.mouse,
     ),
-    );
+    ));
 }
}

Actual behavior
Normal characters appear fine as you type, but hitting spacebar results in nothing happening. Itlookslikethis.
Platform
Chrome and Firefox both have this issue. Works fine in Android and as a desktop Linux app. Haven't tested other platforms.
Flutter version
Flutter 3.19.0-4.0.pre.36 • channel master
Additional context
This looks similar to this issue and this corresponding PR. Could be an edge case that wasn't handled, or just a regression.
It seems like other odd things are happening around this, but I haven't really nailed them down. I can't seem to brink up the developer tools with ctl-shift-i when the editor is focused, for example.

I just had this same issue. But to me it only happens in Windows PCs in flutter Web. In MacOS it works fine. My theory is that it has something to do with the default Windows behaviour of scrolling down when pressing space.


Support for karaf 4.2.1 and running under JDK 11

Works with apache/brooklyn-server#1002
Removes the use of a Service-Component which is no longer supported by karaf.
Specifies the pax-web component versions as a property.

LGTM, thanks a lot @kemitix !
Jenkins failed but that is because this requires https://github.com/apache/brooklyn-server/pull/1002 to be merged first. Will trigger another build then

I've built brooklyn with this and brooklyn-server#1002, and tried running it with Java 11
java version "11" 2018-09-25
Java(TM) SE Runtime Environment 18.9 (build 11+28)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11+28, mixed mode)

by tweaking setenv as follows at line 57:
if [ "x$JAVA_HOME" = "x" ] && [ "$darwin" = "true" ]; then
    JAVA_HOME="$(/usr/libexec/java_home -v 11)"
fi

This runs brooklyn:
ps aux | grep karaf
geoff            28307   1.0  2.4  8245476 410588 s001  S    10:08pm   0:22.25 /Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home/bin/java -Xms128M -Xmx2G -XX:+UnlockDiagnosticVMOptions -Dcom.sun.management.jmxremote -Dbrooklyn.persistence.dir=~/.brooklyn/brooklyn-persisted-state
..etc etc etc...
...org.apache.karaf.main.Main

but brooklyn fails to start with a bunch of Unresolved requirements errors. I've attached the brooklyn.info.log.
Is this the wrong way to go about testing this?
info.log

@geomacy I made a couple of additional pushes yesterday to the brooklyn-server PR that I think should clear those missing dependencies.

:recycle:

retest this please

retest this please


Feature Improvements: Allow for more flexible formatting on the frontmatter of content/blog documents.

Similarly to issue #88, build breaks on having a ? in the title of a post as well.
Example:

Not the same error, but also on having quoted text (any of '', "", backticks) on the description of a post, dev server breaks with errors such as this one.
Parsing the titles and descriptions more intelligently would help authors write more versatile titles.
Also, currently, markdown formatting is not supported in the frontmatter title or description, which would be a nice added functionality.

This bug is going to be solved in AstroPaper v3.


Added App System Username question and inserted it in the path

The default script assumed the username was "serverpilot" but I create each of my apps with their own unique usernames since my individual users often need to ssh in to manage their app and I don't want them accessing any of the other apps on the server.
I don't know what percentage of ServerPilot users create multiple users, but it's so easy to do through ServerPilot I assume quite a few of them do, so this might be useful for them.

That sounds like what the paid for tier on SP does?
When I first set up ServerPilot I started deploying multiple websites (client) under the default serverpilot account. Everything worked great. Then one of the users asked "Can I get SSH access to my site?" ... Dang, if I gave them the serverpilot credentials they would have access to all of the sites hosted on the server... that was obviously a bad idea.
So I upgraded, created a new user account for them, migrated their site to their own SP account, and granted them SSH access, problem solved.
From then on, every new website gets their own user account with the site deployed within it. So when I need to set up the SSL certificates for them, I need to make sure it's set up for the right accounts, not just defaulting to the serverpilot user account.
Hope that helps explain it! Your script is a great time saver, thanks!
Side note: I have run in to the issue where I have to manually run "sudo service nginx-sp restart" after the script completes. I see it right there in the script, I know it should totally do it on it's own, but at least twice I've had to manually restart it to get the sites back online. Weird.

Ahh! I thought you had found a way of setting up the separate user accounts in the free tier. It's not my script ☺ but it is awesome so I follow it for updates.
I wouldn't have thought you would need this script if your paying for SP? I thought SSL was included as part of the paid tiers? I've only run sites on the free tier so this is perfect for me.
Completely understand the need for separate SSH logins, luckily all the sites I manage on my droplets don't allow clients SSH access.
Chris

@DanDawson, great addition 👍
I will merge your PR soon.
Thanks

You're right @caroseuk I shouldn't need it anymore, but I used the free version for so long that I confess I've never even tried certificates in the paid version yet :-) Old habits die hard.
Thanks again @lesaff, appreciate your work on this project.

@lesaff This is great, but as @caroseuk mentioned, it's unnecessary 99% of the time.
Could you allow users to skip that value (ie: leave it blank) and it'll default to serverpilot?

Please enter the System User name for the app: (leave blank for "serverpilot")

Excellent suggestion @lindseydiloreto, I'm not an expert at how to implement that (if response is empty then set it to serverpilot?) so maybe @lesaff can make that update. If I find some time I'll test it and implement a new pull request.

if response is empty then set it to serverpilot

Yup, exactly that. :)

ok, will do

Not sure if that's really necessary? This script should only be used for the free tier of Server Pilot?
If your paying for Server Pilot then you get free SSL anyway, which would make this script irrelevant?
I can understand if you were running sites as different users on the free tier though. However, does the SP agent not overwrite site settings?
Kind Regards,
Chris Rose
07595 526416

On 13 Apr 2017, at 23:38, Rudy Affandi<EMAIL_ADDRESS>wrote:
ok, will do
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@caroseuk brings up a good point and it's worth the research before pursuing this too far. For a time I had a specific use case where I was still using sple even after switching to a paid tier of ServerPilot, but I no longer have that need and am no longer using it.
If any free tier users are manually making new user accounts and needing certificates, this might still be useful (even though those accounts wouldn't be managed by ServerPilot) but if that's not common (I assume it's not) then this might just be adding an extra step that almost nobody needs.
So I won't feel bad at all if my addition gets removed at this point :-)


The URL in the quickstart step is inappropriate

[Enter feedback here]
Importing the URL "https://docs.microsoft.com/azure/cognitive-services/qnamaker/troubleshooting" listed in the section below into KB creates only one QNA pair. This is an inappropriate URL as an example.

Create your first QnA Maker knowledge base

+ Add URL       https://docs.microsoft.com/azure/cognitive-services/qnamaker/troubleshooting|

I suggest changing to a URL like the below.

+ Add URL       https://azure.microsoft.com/en-us/support/faq/

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

ID: 3f8a5292-8ba9-c9ab-1afc-978a418eddf6
Version Independent ID: 2ac8bca8-c650-d4e1-0e75-a054f09dae9d
Content: Quickstart: Create, train, and publish knowledge base - QnA Maker - Azure Cognitive Services
Content Source: articles/cognitive-services/QnAMaker/Quickstarts/create-publish-knowledge-base.md
Service: cognitive-services
Sub-service: qna-maker
GitHub Login: @nerajput1607
Microsoft Alias: nerajput

@jpwdkblog Thanks for spotting this. It looks like the QnAMaker troubleshooting page has changed formatting which is causing the KB to not load correctly. @nerajput1607 Could we look at adding an alternate URL as an example as this needs updating the corresponding screen shots in the subsequent steps?

Thanks for reporting this. We will update the page.

Submitted a fix. Changes should go live in a day
#please-close


<slot> should have a shorthand syntax that mirrors <template>'s shorthand

What problem does this feature solve?
It's a more intuitive syntax to use named scoped <slot> by unifying the slotProps-binding syntax between <template> and <slot>
Shorthand for template:
<template #text="{ str }"><p>{{ str }}</p></template>
Shorthand for slot:
<slot #text="{ str: 'Hello' }" />
What does the proposed API look like?
Before:
<slot name="text" :str="'Hello'" />
After:
<slot #text="{ str: 'Hello' }" />

This seems more confusing than the existing syntax, especially given than both are supported since slot would be used in different cases and could lead to breaking existing cases. If you still think this is worth pursuing, please follow the RFC process in the rfcs repo.


Please enable k8s.io/ingress repository

Hey,
I tried to go get k8s.io/ingress, what did not work go get k8s.io/ingress                                                                                package k8s.io/ingress: unrecognized import path "k8s.io/ingress" (parse https://k8s.io/ingress?go-get=1: no go-import meta tags).
Seems like the k8s.io repository(?), isn't configured properly yet..
Getting the source via github.com/kubernetes/ingress works fine, but it's not possible to use the package via k8s.io/ingress/.., like it's done internally in this package..

Workaround for the people that are using glide
Modify your glide.yaml to pull the source from github.com
  repo: git@github.com:kubernetes/ingress
  vcs: git
  version: ^0.9.0-alpha.1
  subpackages:
  - controllers/resty/pkg
  - controllers/resty/pkg/template
  - controllers/resty/pkg/version
  - core/pkg/ingress
  - core/pkg/ingress/controller
  - core/pkg/ingress/defaults
  - core/pkg/watch

@21stio you need to follow the development workflow from the main kubernetes repo
in order to build the code.

@21stio please reopen if the development workflow does not help

@aledbf that still won't help for people using godeps to depend on parts of this repo since godeps restore won't be able to find the referenced import paths.
I opened https://github.com/kubernetes/k8s.io/pull/47 which I think actually fixes this.

fixed, thanks

Perfect, thanks a lot! :)


Behaving weird when dealing with images of width or height size = 1

I got 2 CNN models with 2D convolutions.
I use one of them with square data (60x60) that has 11 channels (instead of the common 3 rgb). I can make the library work with this one just fine. The output of the cam is 60x60.
I use the other one (same grad cam code) with 60x1 data, also with 11 channels. Although the number of dimensions is the same and both layes use 2d convolutions, the output of the cam for this one is 11x60 and I cannot understand why it is not 60x1

Also, I read about choosing the last dropout layer instead of the conv layer in an issue, is there any explanation for that?

Update: I actually just realized my input is not 60x1 but 60. I've tried using a reshape_transform which makes it have a height of 16 but I see the problem is that get_target_width_height relies on the original input size, not the reshaped one

I had to override the file to set my desired shape and get it working, I guess there's a correct way of doing that tho


Lib dem colour not recognised

I’m not sure if it’s that the staging site doesn’t have the most recent changes we made, but just wanted to flag that the legend doesn’t seem to recognise Liberal Democrats (example here)

This was fixed in v0.7.0 - @scotteuser could you check if the site uses at least this version? There's likely to be a v0.8.0 shortly, so maybe wait for that!

Happy for this to be marked as closed - thanks for fixing.


Update package dependencies

I was working on a different PR, which I think is probably okay now, but on the CI run it fails the security checks which is unfortunately one of the first steps so I'm not sure. It looks like in the last few days there must have been some newly disclosed package vulnerabilities. I just ran bundle update here to sort these – can we see any risks from doing that?

From a review of the changes, most of the updated packages are only a hotfix version increment (ie. Semantic versioning sub-patch increment, x.x.x -> x.x.x.1). I don't think these changes will affect the app.

Agreed @zganger , most of these were from the Rails 7.0.4 -> <IP_ADDRESS> security release. There are a few semantic versioning minor version changes as well, but those shouldn't introduce breaking changes.


[KYUUBI #4623][FOLLOWUP] Remove unused import

Why are the changes needed?

Error: ] /home/runner/work/kyuubi/kyuubi/integration-tests/kyuubi-kubernetes-it/src/test/scala/org/apache/kyuubi/kubernetes/test/spark/SparkOnKubernetesTestsSuite.scala:37: Unused import
Error: [ERROR] one error found

How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[ ] Add screenshots for manual tests if appropriate

[x] Run test locally before make a pull request

cc @zwangsheng

Codecov Report

Merging #4645 (de03bb5) into master (d9e14f2) will decrease coverage by 0.04%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #4645      +/-   ##
============================================
- Coverage     57.56%   57.53%   -0.04%
  Complexity       13       13
============================================
  Files           579      579
  Lines         31951    31951
  Branches       4269     4269
============================================
- Hits          18394    18383      -11
- Misses        11793    11803      +10
- Partials       1764     1765       +1

see 10 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Dynamic output Firebase storage bucket (feature request)

This is not an issue but a feature request.
Is it possible to have a dynamic output storage bucket? Here I'm looking at cases where I have a multi-tenant application where I would like different clients to have their PDFs stored in different buckets.

Thanks for suggesting this!
I implemented it in version 0.15.0, these are the rc links, kindly check if they are satisfying your requirements and inform me if it's good to be published.

<EMAIL_ADDRESS><EMAIL_ADDRESS>

@webthurwa Did you get a chance to test it?

@webthurwa Did you get a chance to test it?

Adding a path to the storage bucket does not work e.g. xxx.appspot.com/client/pdfs.
It only works with the original bucket e.g. xxxx.appspot.com

Thanks for testing it! I will publish it now, it usually takes ~2 days to be reviewed by Firebase team.

The parameter is actually outputStoragePrefix

I edited my post.


linux-hardkernel: 4.14.87-153 -> 4.14.94-155

Motivation for this change
Version bump.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Assured whether relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Note that if this kernel bump includes the patch from https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8099b047ecc431518b9bb6bdbba3549bbecdc343 without having also been reverted, it will break NixOS.

@grahamc, is this relevant even to the 4.14 long-term kernel?
I don't know how to check easily if this is there or not.
How obvious is the breakage if it happens? I've been running the built kernel on my hardware for the last week or so, including large rebuilds of the system. Everything seems fine.

The problem was being backported to all branches.  You try to apply the patch and either it succeeds or it tells you it can't (and notices that reverse application would work).

Neither 4.14.87 nor 4.14.94 need the patch, but it was already mistakenly applied to linux_hardkernel_4_14 in f0b8a113dd04f1b973beb1d6a1675978aa2b2cc7, which means the package is currently broken.

See #55861

Excellent news (kinda!).
As I said, I've been using this pretty intensively for a week, and observed no issues. If you guys are happy to proceed, I think this is ok to merge (after #55861, presumably)


Help please!

Hello everyone, I have just discovered this chart library, and I think it is exactly what I am looking for, but I just don't understand the data feed side of it. I have data streaming in an array of {epoch, open, high, low, close] It appends the latest candle and drops the earliest one off limiting it to 200 candles.
My question is to do with all the examples being from a .csv. I don't understand how I can replace this following section of code with my dynamic array:

    d3.csv("data.csv", function(error, csv) {
        var accessor = ohlc.accessor();

        feed = csv.map(function(d) {
            return {
                date: parseDate(d.Date),
                open: +d.Open,
                high: +d.High,
                low: +d.Low,
                close: +d.Close,
                volume: +d.Volume
            };
        }).sort(function(a, b) { return d3.ascending(accessor.d(a), accessor.d(b)); });

        // Start off an initial set of data
        redraw(feed.slice(0, 163));
    });

    function redraw(data) {
        var accessor = ohlc.accessor();

        x.domain(data.map(accessor.d));
        // Show only 150 points on the plot
        x.zoomable().domain([data.length-130, data.length]);

        // Update y scale min max, only on viewable zoomable.domain()
        y.domain(techan.scale.plot.ohlc(data.slice(data.length-130, data.length)).domain());
        yVolume.domain(techan.scale.plot.volume(data.slice(data.length-130, data.length)).domain());

        // Setup a transition for all that support
        svg
//          .transition() // Disable transition for now, each is only for transitions
            .each(function() {
                var selection = d3.select(this);
                selection.select('g.x.axis').call(xAxis);
                selection.select('g.y.axis').call(yAxis);
                selection.select("g.volume.axis").call(volumeAxis);

                selection.select("g.candlestick").datum(data).call(ohlc);
                selection.select("g.sma.ma-0").datum(sma0Calculator(data)).call(sma0);
                selection.select("g.sma.ma-1").datum(sma1Calculator(data)).call(sma1);
                selection.select("g.volume").datum(data).call(volume);

                svg.select("g.crosshair.ohlc").call(crosshair);
            });

        // Set next timer expiry
        setTimeout(function() {
            var newData;

            if(data.length < feed.length) {
                // Simulate a daily feed
                newData = feed.slice(0, data.length+1);
            }
            else {
                // Simulate intra day updates when no feed is left
                var last = data[data.length-1];
                // Last must be between high and low
                last.close = Math.round(((last.high - last.low)*Math.random())*10)/10+last.low;

                newData = data;
            }

            redraw(newData);
        }, (Math.random()*1000)+400); // Randomly pick an interval to update the chart
    }

    function move(coords) {
        coordsText.text(
                timeAnnotation.format()(coords.x) + ", " + ohlcAnnotation.format()(coords.y)
        );
    }

Any help or advice would be hugely appreciated!!
Thanks!
Will

Hi Will, I think you receive you data from a websocket connection.
Pass your data on a global variable and call it from your settimeout function like below:
`var ndata = maindata.map(function(d) {
              darray = d.split(",");
                if (inter == 1) {
                    timestring = yyyy+"-"+(mm+1)+"-"+dd+"T" + darray[4];
                }
                else if (inter == 5 || inter == 15 || inter == 30 || inter == 60 || inter == 242) {
                        //1.2397,1.2429,1.2397,1.2426,3/28/2018 5:00:00 AM
                        var dateside = darray[4].split("T");
                        var datesidestring = dateside[0].split("/");
                        timestring = datesidestring[2]+"-"+datesidestring[0]+"-"+datesidestring[1]+"T" + dateside[1];

                }
                else
                {
                        // 1/2/2017
                        var ds = darray[4];
                        var datestrings = ds.split("/");
                        var newds = datestrings[2]+"-"+datestrings[0]+"-"+datestrings[1];
                        timestring = newds + "T12:00:00";
                        //console.log(timestring);
                }

              return {
                  date: parseDate(timestring),
                  open: +darray[0],
                  high: +darray[2],
                  low: +darray[3],
                  close: +darray[1],
                  volume: +darray[3]
              };

}).sort(function(a, b) { return d3.ascending(accessor.d(a), accessor.d(b)); });`
cheers

@matricore Thank you so much for the quick response. I'll have a look and try this out.
Would you mind helping me out if I get stuck? I'm quite new to js so there are a few things I don't fully understand yet.
Thanks again!

@matricore Okay, so I spent longer than I feel I should admit trying to get this work last night. I am missing something really simple, but I just can't get my head around it. I'm going to try and share as much info as possible in the hope that you might see the problem straight away!!
I have made a real mess of it think!!
So, you are correct, I am collecting the data from a websocket, I've created a paste of my whole page script, which includes the data acquisition for the array,  just to put it all in one place, it is normally in a separate js file.
Please don't feel like you have to help me, but if you could possibly take a look at my code and maybe guide me on how to get it working, I be hugely appreciative. I am so keen to learn, but I am really struggling with this!
https://basilisk-design.co.uk/pastebin/paste.php?id=18
thank you so much in advance!!
Will

I think the easiest way would be to translate your input into the format that Techan usually uses. ie date ohlc. Don't be afraid to use the good old Print F Debugger... only when you are 100% sure that your input is of the same format feed it into techan. Best, U-------- Ursprüngliche Nachricht --------Betreff: Re: [andredumas/techan.js] Help please! (#239)Von: Will An: "andredumas/techan.js" Cc: Subscribed @matricore Okay, so I spent longer than I feel I should admit trying to get this work last night. I am missing something really simple, but I just can't get my head around it. I'm going to try and share as much info as possible in the hope that you might see the problem straight away!!
I have made a real mess of it think!!
So, you are correct, I am collecting the data from a websocket, I've created a paste of my whole page script, which includes the data acquisition for the array,  just to put it all in one place, it is normally in a separate js file.
Please don't feel like you have to help me, but if you could possibly take a look at my code and maybe guide me on how to get it working, I be hugely appreciative. I am so keen to learn, but I am really struggling with this!
https://basilisk-design.co.uk/pastebin/paste.php?id=18
thank you so much in advance!!
Will
—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.

@GreatGranPa thank you for your quick response!
I'll be honest, I think I am out of my depth at the moment! I am looking at using the chart within a larger project, and I am just learning JS in the process. I think what I am going to do is work on the rest of the project (which I am learning a lot while doing) and come back to the charting once I have more experience under my belt!!
Thanks guys!


Flat Routing with Regex Not Working

What version of Hono are you using?
4.5.5
What runtime/platform is your app running on?
Bun/Node (tested both)
What steps can reproduce the bug?
import { showRoutes } from "hono/dev";
import { Hono } from "hono";

const app = new Hono();

export const VALID_STATES = ["alabama", "alaska", "arizona"] as const;

// state
app.get(`/:state{${VALID_STATES.join("|")}}/`, (c, next) => {
  return c.text("Hello Hono!" + c.req.param("state"));
});

//city
app.get(`/:state{${VALID_STATES.join("|")}}/:city{[a-z]+}/`, (c, next) => {
  return c.text("Hello Hono!" + c.req.param("state") + c.req.param("city"));
});

// provider
app.get(
  `/:provider{^(?!(${VALID_STATES.join("|")})$)[a-z0-9-]+$}/`,
  (c, next) => {
    return c.text("Hello Hono!" + c.req.param("provider"));
  }
);

showRoutes(app, {
  verbose: true,
});
export default app;

What is the expected behavior?
We'd expect http://localhost:3000/alabama/somewhere/ and http://localhost:3000/alabama/ to be available... but they aren't unless the trailing slash on the state definition is removed.
When the trailing slash is removed from the state route is suddenly causes the side effect of the city route getting super greedy and matching: http://localhost:3000/alabama/somewhere/asdf.
Not a regex ninja, but this seems off.
What do you see instead?
I'd like to see it respecting trailing slashes.
Additional information
Big blocker from being able to adopt hono. I'm sure there is a workaround, looking for one as we speak.

It looks like you forgot to group them.
{${VALID_STATES.join("|")}} => {(${VALID_STATES.join("|")})}


DOC/REL: retroactively add missing expired deprecations to 1.12.0 release notes

As per https://github.com/scipy/scipy/issues/19972#issuecomment-1912626337, the deprecations from gh-19067 didn't make their way into the 1.12.0 release notes.

@rgommers what action needs to be taken here?

I can make the PR if it is just changing them from now on. Thoughts @tylerjereddy ?

I suppose we could mention it in gh-19880, although the ship obviously sailed in the previous release so I'm not sure what we'd say. "Hey, this has been gone for a bit and we forgot to tell you!" I think that's been considered bad practice/deprecated for quite some time at least.
Perhaps there will be a 1.12.1 release where we could mention it, but I'm not so sure, the support effort for 1.13.x series with NumPy 2 may be reasonably high, and then 1.14.x may be fairly shortly after that unless we delayed for the no GIL/free-threading CPython 3.13 stuff.

We can also add it to the 1.12.0 release notes right, so that if someone lands on them from the stable docs after 1.13.0 is released then they'll be able to see it.

I suppose we could do that, to get the stable + devdocs pointing to an updated version yeah.
Editing the GitHub-posted version of the release notes is even easier I think.

So maybe a PR against main to update the old 1.12.0 relnotes, editing the GitHub-posted version a little, and a backport PR to maintenance/1.12.x which may not actually get another release but doesn't hurt to merge since I already bumped it to 1.12.1.dev0.


Deploy package 8.4.0 - Error chip dependency

Environment
Package version:
v8.3.0 -> v8.4.0
Description
What you'd like to happen:
Deploy package v8.4.0 (https://github.com/flutter-form-builder-ecosystem/form_builder_extra_fields/pull/38)
Alternatives you've considered:
  form_builder_extra_fields:
    git:
      url: https://github.com/flutter-form-builder-ecosystem/form_builder_extra_fields
      ref: main

But it exposes my app to unwanted changes while it's not deployed.

I really try, but have a error with dependency (Chip) that only @danvick can help.
https://github.com/flutter-form-builder-ecosystem/form_builder_extra_fields/actions/runs/3343931500/jobs/5537691825

Until deploy this version, you can use ref: 8.4.0 on tour pubspec

Please update flutter_typeahead to 4.1.1
Lots of issue resolved in that, so please update in 8.4.

Waiting on this as well 🤞

I will deploy new version today, so I closing this issue


Error "Incorrect function" when executing slack login

The deno-slack versions
N/A
Deno runtime version
1.37.0
OS info
Windows (amd64)
Describe the bug

Steps to reproduce

Install Deno (choco install deno)
Check versions (deno --version and slack doctor)
Execute slack login to log into a workspace

Expected result
Get this output:
Run the following slash command in any Slack channel or DM
   This will open a modal with user permissions for you to approve
   Once approved, a challege code will be generated in Slack

/slackauthticket xxxxxxxxxxx

? Enter challenge code

And then be able to set the generated code from Slack
Actual result
When running slack login, I get the following output:
Run the following slash command in any Slack channel or DM
   This will open a modal with user permissions for you to approve
   Once approved, a challege code will be generated in Slack

/slackauthticket xxxxxxxxxxx

? Enter challenge code Check C:\Users\xxx\.slack\logs\slack-debug-20230921.log for full error logs

Incorrect function.

While I should be able to set the challenge code.
Here are the logs:
DEBUG 2023/09/22 09:49:13 Resolving logstash host, https://slack.com, 2.9.0
DEBUG 2023/09/22 09:49:13 system_id: xxxxxxxxxx
DEBUG 2023/09/22 09:49:13 reading credentials file
DEBUG 2023/09/22 09:49:13 found authorizations at ...\.slack\credentials.json reading
DEBUG 2023/09/22 09:49:13 initialize runtime from auto-detect: Deno (deno)
INFO 2023/09/22 09:49:13 ------------------------------------
INFO 2023/09/22 09:49:13 System ID: [xxxxxxxxxx]
INFO 2023/09/22 09:49:13 Operating System (OS): [windows]
INFO 2023/09/22 09:49:13 Command: [C:\Program Files\SlackCLI\bin\slack.exe login]
INFO 2023/09/22 09:49:13 SessionID: xxxxxxxxxx
INFO 2023/09/22 09:49:13 Slack-CLI-TraceID: [xxxxxxxxxx]
INFO 2023/09/22 09:49:13 Slack-CLI Version: [2.9.0]
DEBUG 2023/09/22 09:49:13 HTTP Request: POST https://slack.com/api/apps.hosted.generateAuthTicket HTTP/1.1
HTTP Request Body:
slack_cli_version=v2.9
DEBUG 2023/09/22 09:49:13 HTTP Response Status: HTTP/1.1 200 OK
HTTP Response Body:
{"ok":true,"ticket":"xxxxxxxxxx"}
DEBUG 2023/09/22 09:49:13 Starting root command cleanup routine
ERROR 2023/09/22 09:49:13 Incorrect function.
DEBUG 2023/09/22 09:49:13 FlushToLogstash will POST https://slackb.com/events/cli payload: [{"context":{"bin":"C:\\Program Files\\SlackCLI\\bin\\slack.exe","cli_version":"2.9.0","command":"login","command_canonical":"auth login","host":"xxxxxxxxxx","os":"windows","runtime":"Deno","runtime_version":"v1.37.0","session_id":"xxxxxxxxxx","system_id":"xxxxxxxxxx"},"data":{"app":{},"auth":{},"error_msg":"Incorrect function."},"event":"error","timestamp":1695368953559}]
DEBUG 2023/09/22 09:49:13 FlushToLogstash response status code: 200, body: ok

And here's the output of slack doctor:
SYSTEM

    ✔ Operating System (the computer conductor)
        Version: windows (amd64)

    ✔ Deno (a JavaScript runtime)
        Version: v1.37.0
        Recommendation: We suggest using the latest version of Deno

    ✔ Git (a version control system)
        Version: git version 2.31.1.windows.1

SLACK

    ✔ CLI (this tool for building Slack apps)
        Version: 2.9.0

    ✔ Configurations (any adjustments to settings)
        System ID: xxx
        Last updated: 2023-09-21 13:51:42 +02:00
        Experiments: None

    ✘ Credentials (your Slack authentication)
      Error: You are not logged into a workspace or have not installed an app (slack_auth_error)
      Suggestion: Use the command `slack.exe login` to login and `slack.exe install` to install your app

Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

I forgot to add the logs. Description is now up-to-date

Hi @rknj  - Is it possible you have some Windows permission setting preventing the CLI from accessing the disc to write to the filesystem which is required for the CLI to work properly? I'm unable to reproduce this behavior directly on my side. Some troubleshooting questions for you:

Which Windows version are you using?
Have you followed the Windows installation instructions to install via the installation script? If so, did that succeed without error?


Bug (may be)

I have a citation with this title:
title = {{Transformation of C Programming Language Memory Model into Object-Oriented Representation of {EO} Language}},

And bibcop gets this warning:
Package bibcop Warning: All major words in the 'title' must be capitalized, while 'into' (no.8) is not, in the 'legalov2022' bibitem.

but my title already looks good, as it is described in warning.
@yegor256 FYI

@MikhailLipanin should be Transformation of C Programming Language Memory Model Into Object-Oriented Representation of {EO} Language}. Pay attention, the word Into is capitalized.


gc: config gc io limit dynamically

Signed-off-by: youjiali1995<EMAIL_ADDRESS>
What have you changed?
tikv-ctl can change gc io limit dynamically now. Usage:
tikv-ctl --host=host modify-tikv-config -m server -n gc.max_write_bytes_per_sec -v 10MB

It's used to limit the write flow when gc influences normal requests, and remove the limit when there is no influence.
What is the type of the changes?

Improvement (a change which is an improvement to an existing feature)

How is the PR tested?

Unit test
Manual test (add detailed scripts or steps below)

Does this PR affect documentation (docs) or should it be mentioned in the release notes?
Yes. I will file one.
Does this PR affect tidb-ansible?
No
Refer to a related PR or issue link (optional)
#5263

The implementation may be changed totally because many configurations can be modified dynamically this quarter. So only gc io limiter is supported in this PR.

/run-integration-common-test

FYI  @NingLin-P , this PR changes GC config dynamically.

Is it possible that accumulated GC tasks blocks GCTask::ChangeIoLimit from executing?
For example, originally we set the value too small and find the speed too slow. Then, we want to use tikv-ctl to make the limit larger. However, the previous GC task runs too slow so that the change limit task cannot run. Can we solve the problem?

Is it possible that accumulated GC tasks blocks GCTask::ChangeIoLimit from executing?
For example, originally we set the value too small and find the speed too slow. Then, we want to use tikv-ctl to make the limit larger. However, the previous GC task runs too slow so that the change limit task cannot run. Can we solve the problem?

Yes, it's possible. I can create the IoLimiter protected by a mutex in the GCWorker and pass it to the GCRunner. Then we can change the limit in the GCWorker.

/test

@MyonKeminta @sticnarf  PTAL.

I suggest using RwLock because the limiter is accessed frequently but seldom changes. (I know the time acquring lock is really small compared to the whole gc operation. It's more reasonable :)
The rest LGTM

@sticnarf I think changing limit and requesting quota are both write operations.

But IOLimiter::request only needs &self...

/merge

/test

/merge

/test

/test

/test

/test

/test

/merge


Add fast power modulus powMod() for BigInt operands.

Does this function accept negative operands?

Does this function accept negative operands?

Yes, it supports negative operands.

@shove70 this PR is from your master branch, are you sure you want to do that? I'll Add 72h->merge to this.

The corresponding function in std.math is called powmod (no capital "M").

@shove70 this PR is from your master branch, are you sure you want to do that? I'll Add 72h->merge to this.

Yes, sure. Thank you.

OK, please change the name to match std.math and rebase this so that it has no merge commits in it and this can be merged.

You've still got the merge commits there. You can run git diff and save the diff to apply after resetting your master branch if you're having trouble with git.


Read expired metadata to avoid override

If TUS session is expired, the metadata should be preseverd for later cleanup.

@ankitpokhrel It took me some time to get along with the test setup, but I think the test demonstrates the issue quite well. Since the Carbon::setTestNow even effects Carbon::parse I had to disable it. Maybe you have a better approach to handle these cases, but that did the job.

As I take a second look on the solution and got more into the problem I realize that this issue is a bit esoteric. The session is expired, still the client changes the offset?? Shouldn't this be handled beforehand? And yes, it is handled. The server responds with HttpResponse::HTTP_GONE when the session is expired so this issue only occures when the session expires WHILE a patch request is active.
I only ran into this issue while testing our cleanup script. To debug this I use ultra short expiration time (30s) plus: the backend that receives the chunks is rather slow. So uploading a chunk can take some seconds and chances are high that chunks are getting processed while the TUS session times out. In real world setup this should hardly ever happen because expiration time will be sth. like 24h and requests will be processed in few seconds.
Nevertheless, it is not impossible that the metadata will be corrupted, even if the probability is very low. The fix has some costs, too. The key now will be read twice from Redis which might decrease general performance a bit. Please take this into consideration when deciding whether or not to merge this.

@ankitpokhrel CI should pass now.

yet another try, sorry for that ;)

Hi @ankitpokhrel,
I agree that we can ignore case 2. The cache should not be deleted, and if, cleanup will not be possible at all.
I like your suggestion to always set the file_path in order to not getting it lost. We will also need the size to distinguish complete uploads from partial ones in the cleanup script.


failing test case for #106

Coverage remained the same at 100.0% when pulling 838698f2096af08a11789d7bb608352d22aa37b6 on FreakinaBox:patch-1 into 30ffd42d2c7e87fa4f3aac24f18c950c1eb78d0b on zemirco:master.

its hard to see with all the escaping but " should become \"

Coverage remained the same at 100.0% when pulling 99d968801aee8bf95b8b335dd379ae3431eada78 on FreakinaBox:patch-1 into 30ffd42d2c7e87fa4f3aac24f18c950c1eb78d0b on zemirco:master.

Coverage remained the same at 100.0% when pulling 352b3c0dd4715564482effab1a62d9ceaa039556 on FreakinaBox:patch-1 into 30ffd42d2c7e87fa4f3aac24f18c950c1eb78d0b on zemirco:master.

Merged this, since it's a valid test. Feel free to keep working on this issue.


 Once on each of your turns, you can add your Wisdom modifier to the attack roll or the damage roll of an attack you make against one of your favored enemies. You can choose to use this feature before or after the roll, but before any effects of the roll are applied.
Question: is the following still be developed?
https://github.com/ChrisPJohn/SolastaCommunityExpansion/blob/af4d093fe920f20eb3226db0e6e9c3a5179028c8/SolastaCommunityExpansion/Level20/Features/FeatureSetRangerFoeSlayerBuilder.cs

This code is dependent on mod helpers and need to be refactored


Different message offset (kafka) per schema(topic).

Beamlime should start consuming from different offset for different schema (type of data)

[ ] PL72: Latest run start message, and match with the run_number or proposal_id.
[ ] EV44: From the start_time of the run_start_message.
[ ] F144: From the latest message regardless of the start time.
[ ] TDCT: From the start_time of the run_start_message.
[ ] DA00: From the start_time of the run_start_message.

It is because logs like detector position might be set in the past and never moved.

Is this actually true? I had assumed that we would get a message in all cases when we start streaming, just like the filewriter will always get values? Only the timestamp may be in the past. Should check with ECDC before doing any work here!

Is this actually true? I had assumed that we would get a message in all cases when we start streaming, just like the filewriter will always get values? Only the timestamp may be in the past. Should check with ECDC before doing any work here!

It doesn't change where we set the offset of the messages though.


Add Open ❤ Science to the footer

This is to link out to something a little fun.
Fixes #21. 😊

All good @Karvovskaya 🙌 I only opened this PR today, so you're super fast. I updated the link to refer to the GHOST collective, thanks for highlighting that fantastic project 😊


[TOC] render incorrect in preview mode

In preview mode, as long as theheading is not continuous, the [TOC] hierarchy does not seem to work properly.
Please see the picture below, it is very visual.
[TOC]

# Example H1

### Heading H3

#### Heading H4

[TOC]

# Example H1

## Heading H2

### Heading H3

#### Heading H4

Version: v0.15.9

Sorry, I didn't read the document carefully before.


highlight-module--right doesn't work properly in

When I add highlight into main section, highlight strip does not display around screen edge.
<!doctype html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Web Starter Kit</title>

    <link rel="manifest" href="manifest.json">
    <meta name="theme-color" content="#3372DF">

    <link rel="stylesheet" href="styles/main.css">

        <button class="menu"></button>

Web Starter Kit

Navigation

Hello

Get Started

Style Guide

 foo

 bar!

@gennsann the highlight section should be outside of the main html but inside the body. You can put divs in the main, but I don't believe this is the creator's style choice in this instance, and I don't believe that to be correct particularly with how I'm assuming you would want it to look?
It's a way for devices such as screen readers to say "okay this is the important stuff".
I'm waiting to be corrected however. :warning:

Thanks for filing this issue. As part of our move to the new CSS library this summer https://github.com/google/web-starter-kit/issues/674, we're closing issues related to the 0.5.x styles, which will no longer be supported moving forward. We recommend holding off on PRs to the styles in master as they're going to be replaced by something much better soon.


Mark flaky CrossCompilationIntegrationTest

Because sometimes JDK6 can't be recognized. Let's skip it in the feedback build.

Your PR is queued. See the queue page for details.

I've triggered a build for you. Click here to see all failures if there's any.


Conformance classes inconsistency

Some conformance classes have a trailing slash (sometimes before a fragment) and sometimes not.
For example sort is https://api.stacspec.org/v1.0.0-beta.4/item-search/#sort although it seems from the spec that it should be https://api.stacspec.org/v1.0.0-beta.4/item-search#sort

There seem to be a couple more things inconsistent: https://github.com/stac-utils/stac-fastapi/pull/417

I think this may have been fixed but I'd like to do one more pass through all of the conformance classes after #432 is finished.

I checked both backends locally and they look fine. I'm going to close this a fixed pre-2.4.4, please reopen if there's incorrect conformance classes found.

@gadomski Looks better now, but I just found that at least MSPC still uses strange CQL Text/JSON conformance classes.
Not sure whether that's a MS PC but or a stac fastapi bug though.

MSPC: https://api.stacspec.org/v1.0.0-rc.1/item-search#filter:cql-text and json equivalent
The Filter extension indicates: http://www.opengis.net/spec/cql2/1.0/conf/cql2-text and json equivalent

Yup, I think you're right but will ask Phil to check to make sure (over on the new issue).


Feature Request:  Live from webcam

Would be awesome if we could run this in blender live from a webcam.
This project is fantastic.  I have looked at several others openface but it outputs the files in FACS Action Unit Format
FACSvatar can do live webcam but for windows you have to setup docker and it only works with models created from MBLAB .  While with your program you have outlined how easy it is just to map to your model bones,
Thank you so much for this program and also the excellent instructional video.  This project was very easy to setup on Windows 10
Thanks!!!!!
Dan

Glad you liked it:)

Thanks!


I had to add myself to this it looks good and can't pass it up

Great idea haha

adding yourself is a cardinal sin!

adding yourself is a cardinal sin!

This may be true but sometimes you must break the rules

no


Fix fix leading with inner join and right join

Proposed changes
Problem:
when plan with inner join and right join, some predicate and join can derive some null reject column, leading could change these column to nullable
Solved:
before leading, we can do eliminate outer join first to avoid message lost

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall


⚠ LPDM Handbook (hosted on Divio) has degraded performance

In bc8e7ba, LPDM Handbook (hosted on Divio) (https://repohubdev.tk) experienced degraded performance:

HTTP code: 500
Response time: 5954 ms

Resolved: LPDM Handbook (hosted on Divio) performance has improved in ca0b226.


Feature/90/add user command v2

Pull Request
Description:
I've drafted up a user command, in relation to #90. The way I've configured it, the bot should return an embed containing the user's username, roles (in anticipation for certification-based roles), and previous suspension status.
If the MONGO_URI isn't set, the bot won't try to find the suspension status at all. If it does not find a suspension status, it leaves that field off the embed. If the user that calls the command isn't a mod (based on KICK_MEMBERS permission), the bot won't include the previous suspension field.
Related Issue:

Closes #90
Replaces PR #96 (too many merge conflicts)

I wrote the command such that the suspended field was only generated when an admin called the command, but that the roles and username fields generate for anyone who calls the command. My thought behind this was that when certification-based roles become a thing, this will allow users to quickly see which certifications another user has completed (so they can ask for help) or show off their own certifications. 🙂

Ah I didn't see that part of the command as I didn't look closely enough. Discord already shows what roles people have, so this might not be needed. I thought the purpose of this command was just to show who was suspended before, and not so much show their roles.

I could refactor it to only offer the suspended information - I only went this route in anticipation of potential features added in the future.
For example, we could also add a field to the embed that shows when a user joined the server.

That makes sense as a feature. I think the main goal of this feature is providing more metadata on users that would be helpful from an admin standpoint. We can expand on this feature in another PR/issue after we look into what would be useful information, and what can we do.
For now just supporting anything related to suspended, and locking this down to just admins should be good enough. We can open another issue with ideas/concepts for what expanding on this looks like :)

Done and done :)


Issue when expanding then testing

Hello,
I'm trying to debug a proc_macro and I'm using the expand -> tests methods to debug the generated code.
I came across an issue here it is:
I've a simple tests file:
#[test]
fn add_one() {
	assert!(true);
}

which generate an expand of:
#![feature(prelude_import)]
#![no_std]
#[prelude_import]
use ::std::prelude::v1::*;
#[macro_use]
extern crate std as std;
extern crate test as test;
#[cfg(test)]
#[rustc_test_marker]
pub const add_one: test::TestDescAndFn = test::TestDescAndFn {
    desc: test::TestDesc {
        name: test::StaticTestName("add_one"),
        ignore: false,
        allow_fail: false,
        should_panic: test::ShouldPanic::No,
    },
    testfn: test::StaticTestFn(|| test::assert_test_result(add_one())),
};
fn add_one() {
    if !true {
        {
            ::std::rt::begin_panic("assertion failed: true", &("tests/simple.rs", 3u32, 5u32))
        }
    };
}
pub mod __test_reexports {
    pub use super::add_one;
}
#[main]
pub fn main() -> () {
    extern crate test;
    test::test_main_static(&[&__test_reexports::add_one])
}

After adding some missing #[features(test, libstd_sys_internals, rustc_attrs)]
I try to run tests and get this error:
error[E0618]: expected function, found `test::TestDescAndFn`
  --> tests/simple-expand.rs:18:60
   |
11 | / pub const add_one: test::TestDescAndFn = test::TestDescAndFn {
12 | |     desc: test::TestDesc {
13 | |         name: test::StaticTestName("add_one"),
14 | |         ignore: false,
...  |
18 | |     testfn: test::StaticTestFn(|| test::assert_test_result(add_one())),
   | |                                                            ^^^^^^^--
   | |                                                            |
   | |                                                            call expression requires function
19 | | };
   | |__- `test::TestDescAndFn` defined here

Both the const and the function have the same name and it seems to be a conflict.
By renaming the function everything work as expected.
Am I doing something wrong or is it a limitation of how I tests ? :x

This is the intended behavior -- the result of expanding macros is not intended to be compilable code. The compiler's representation of source code is more expressive than text so the conversion to text necessarily has to be lossy. See the disclaimer in https://github.com/dtolnay/cargo-expand#disclaimer.

thank's for the quick answer.
Their is no other way to debug proc_macro_derive ?
I didn't find a suitable one other than expanding, updating and testing.

An approach that usually works well is handwriting the code you want to generate, getting that compiling, and only then starting on the macro code to generate the same thing as output. Starting with macro code before you have a compilable handwritten impl is less productive.

Hello,
Thank's for helping me on this issue. I will close it.


Exempting literal strings from line limits?

It is not uncommon to want verbose logging messages (in the internal Invenia codebase, and Production systems more generally).
If there are multiple log statements, it is easy to end up with 5-10 lines dedicated some form of logging messages. But once a function is over ~30 lines it becomes hard to read, just because of the amount of vertical space used. So for log messages, the horizontal space limit puts notable pressure on the vertical space.
One option to address this would be to exempt literal strings from line limits, then codebases can choose to allow log messages that are greater than 92 chars, without incurring lots of vertical space.
e.g.
to allow
function do_thing(status)
    is_good(status) || warn(LOGGER, "Whoa there. Things aren't all good. Doing the thing may lead to some seriously weird stuff happening.")
    return the_thing()
end

rather than things like this:
function do_thing(status)
    is_good(status) || warn(
        LOGGER,
        "Whoa there. Things aren't all good. " *
        "Doing the thing may lead to some seriously weird stuff happening."
    )
    return the_thing()
end

function do_thing(status)
    if !is_good(status)
        warn(
            LOGGER,
            string(
                "Whoa there. Things aren't all good. ",
                "Doing the thing may lead to some seriously weird stuff happening."
            )
        )
    end
    return the_thing()
end

Hmm I think there are two exemptions here, and one is easier to define than the other.
One:
function do_thing(status)
    is_good(status) || warn(LOGGER,
        "Whoa there. Things aren't all good. Doing the thing may lead to some seriously weird stuff happening."
    )
    return the_thing()
end

Here the exception applies when a line ends in a literal string.
Two:
function do_thing(status)
    is_good(status) || warn(LOGGER, "Whoa there. Things aren't all good. Doing the thing may lead to some seriously weird stuff happening.")
    return the_thing()
end

Here the exemption applies when the line ends in a literal string and some insignificant closing content which is implied by visible content (i.e., the ) is expected because we have a dangling ( in the visible area).
The first is easy to define; how do we define the second?

the line ends in a literal string and some insignificant closing content

can we just name ) and , as okay "closing content"? are there other candidates?

;, }, ], any other custom brackets, end, some operator like *, some operator like ||, maybe more

If there's going to be some documentation on what's good and bad "closing content", there's a good reminder about : being dangerous here https://github.com/JuliaLang/julia/issues/35572

I'm just going to throw out some alternate suggestions. First off I think some of the annoyances with breaking up exception messages over multiple lines is that it's easy to forget the space between lines. Having a string macro may be a nice way to alleviate that:
julia> macro fold_str(string)
           replace(string, '\n' => ' ')
       end
@fold_str (macro with 1 method)

julia> fold"""
               Whoa there. Things aren't all good.
               Doing the thing may lead to some seriously weird stuff happening.
               """
"Whoa there. Things aren't all good.   Doing the thing may lead to some seriously weird stuff happening. "

Also, maybe the what we should do for long exceptions is to have them defined as global constants. That could work well with folded multi-line strings. For messages that use variables from the surrounding scope we could possibly use a function instead which would probably help with performance as we'd have a function barrier in place.
With that all said I'm not opposed to having an exemption but it will be hard to define clear rules for this.

I'll mention that there is now a MultilineStrings.jl package that makes it easier to write a single-line string with the multi-line syntax:
julia> m"""
       Whoa there. Things aren't all good.
       Doing the thing may lead to some seriously weird stuff happening.
       """
"Whoa there. Things aren't all good. Doing the thing may lead to some seriously weird stuff happening."

I think the way I would write the example in the description would now be:
function do_thing(status)
    is_good(status) && warn(LOGGER) do
        m"""
        Whoa there. Things aren't all good.
        Doing the thing may lead to some seriously weird stuff happening.
        """
    end
    return the_thing()
end

See https://github.com/invenia/LibPQ.jl/pull/197/files#r494597781
A list of pairs where the second element of each pair is a long string of text is another good example of something that this would make nicer.

the string macro would not help with the fact that it just uses so much vertical space.

The counter argument to this proposal is that having an exception for literal strings makes it harder to read error messages. Adding an exemption also means that people won't care as much about refactoring their logging messages to be terse and clear.
If the concern is about the logging messages taking up too much vertical space then using code folding in code editors is a simple way to address that concern. For very long strings developers should be considering making such a strings a constant or if interpolation is needed a function.
I will note I'm mostly playing devil's advocate there are some dangers in adding this exemption. At this point I'm unconvinced the pros outweigh the cons.

To be "devil's advocate" in the other direction: The 92 char line limit only makes sense if you also tell people what to do when you hit against that limit...
e.g. we say "if a ternary conditional x = a ? b : c doesn't fit within the line limit, instead use a mutli-line if-block"
and so on with advice for method definitions, arrays etc.
But we have nothing to say about string literals right now, so they get to break the line limit

But we have nothing to say about string literals right now, so they get to break the line limit

As always these are just guidelines and not rules. Some suggestions that I just made above could be more formally written as:

If a string literal exceeds the 92 character line limit try to break the string up over multiple lines. There are a few ways to do this including using the @m_str macro from MultilineStrings.jl. Alternatively, consider storing the string literal as a global constant or in a separate function if interpolation is required.

If the concern is about the logging messages taking up too much vertical space then using code folding in code editors is a simple way to address that concern.

I am yet to find a code folding editor that works for julia well.

but there are some dangers in adding this exemption. At this point I'm unconvinced the pros outweigh the cons.

I also am at this point unconvinced that the pros out weigh the cons.

my view is that string literals are special
i'm not sure whether or not they're special enough to warrant the exception


Change Nextjs Template Directory Name

Moved templates/nextjs to templates/next as per convention followed with nuxt and react directories, since the CLI directly parses the repo tree and clones the folder directly.
Small change. Shouldn't break anything.

Looks good, merging.


Adding possibility to install library and find_package it

Dear @whoshuu,
I'm proposing you this small addition to your cmake files in order to allow seamless installation, find_packageing and package generation of CPR.
This is really useful when building systems depending on the library, for example we build IoT devices based on linux, and as we have multiple apps depending on CPR, we would like to compile it and install it once in our development sysroot and depend on it from our different application.
This also ease creating a package with CPack, that you can then distribute to developer as precompiled development package. Or even integrating your library in the CMake Package Manager
For example, thanks to this I can now install and use cpr this way in my project :
cmake_minimum_required(VERSION 3.0.0)

project(testcpr)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(cpr 1.2.1 REQUIRED)
add_executable(testcpr main.cpp)
target_link_libraries(testcpr cpr::cpr)

Thank your for developing this wrapper, I have 2 colleagues who really appreciate the simplicity of the API.
I would be happy to know what do you think from this patch. :smile:

Just noticed PR #56 was bringing a similar feature, I think this implementation is cleaner, but that's up to you. The package generation is based on the template of ruslo : https://github.com/forexample/package-example which is in my experience the cleanest way to make packages in modern cmake.

I'll fix the build error, when building CURL from within the submodules.
Some of your CI job requires however CMake older than 3.0.0. It is something you want so ? Meaning I should fix it, or don't you want to upgrade to CMake 3.0.0. I ask this, because package config generation works really in 3.0.0 and not that good before.

Please use GNUInstallDirs. It is portable and the variables can be overridden.

With #383 I would say all features proposed here have been merged.
I’m closing this.
Feel free to open a new PR if something is missing.