VST2: Implement programs

I've implemented built-in program access for VST2.
It has been tested in my DPF port of amsynth. Related source code:

https://github.com/AnClark/amsynth/blob/dpf-implementation/src/amsynth_dpf.cpp (see void AmsynthPlugin::initProgramName() and void AmsynthPlugin::loadProgram())
https://github.com/AnClark/amsynth/blob/dpf-implementation/src/amsynth_dpf.h

This is not up to spec.
For VST2, programs need to implement the full state of all available programs during runtime.
Say your plugin has 8 programs, and uses states. We need to query the full state of those 8 programs during load so that a save chunk operation is able to store this info.
When a user sets program as index 3, changes some things, moves to index 4, then changes back to index 3 - the same state as it was set before needs to be there.
This is the main reason it is not implemented, it is just a big waste of memory for any non-trivial plugin.

A few other notes:

we need to store every possible program name, they are meant to be editable from user side. we cant use a single var for this if you want full vst2 preset support
setchunk/getchunk has an optional flag to indicate if we are meant to save a single program or the full state, this was not implemented before because dpf used 1 single program for all cases, but if going forward with full vst2 presets the getchunk and setchunk needs to save and restore the full state of all programs (if that flag is passed by the host)

So when and how DISTRHO::Plugin::initProgramName() and DISTRHO::Plugin::loadProgram() work, according to your original design?
I haven't seen those two methods invoked in VST2 implementation. Seems that they have no effect in VST2 builds. This patch is just to let them work.

So when and how DISTRHO::Plugin::initProgramName() and DISTRHO::Plugin::loadProgram() work, according to your original design?
I haven't seen those two methods invoked in VST2 implementation. Seems that they have no effect in VST2 builds. This patch is just to let them work.

The current DPF implementation is none for this, which is why those methods are not called.
As I said, if we want to expose those we need to have quite a few other extra things on top.
Otherwise the implementation would not be conformant to VST2 spec.
It is not just a matter of mapping the calls, that is not how things work regarding presets in VST2.
If we want to expose the DPF programs in VST2 we need roughly:

allocate char[24] * number of programs, so individually renaming them from host side works
reserve full state of all programs (including both parameters and states) on init, basically caching param values and states for all programs
so we keep in memory the full state of all programs, and switch to that once a program change is initiated from the host (this is important, we need to switch to the in-memory chunk of a program, and not the program call set by dpf)
on chunk save, depending on a flag we either give to the host the whole full state * number of programs, or just the current chunk for the current program
for chunk load it is the same, the host can either replace/load the whole collection of programs or an individual one

again: we cant simply map the vst2 set-program to dpf load program, that is not how vst2 plugins are supposed to work.
we need the whole dance of caching active state for all programs exposed by the plugin, and switching to that during runtime.
say your plugin has 128 parameters and 50 programs.
for a proper vst2 implementation we would need to store 50128 plus names50 everytime we load the plugin.
this quickly grows to consume a LOT of memory, which is why plugins moved to not expose vst2 programs to the host and just have 1 that simulates current/active one alike DPF does.
I am not against having this implemented in VST2 for DPF, but it really needs to be proper.

Thanks for your patient and detailed explanations!
According to your instruction, the only way conforms to VST2 specification is to cache all the states of programs. The specification is somewhat troublesome on practice, so I understand why the program feature is not implemented.

My implementation seems to be non-standard. Although non-standard, it really fits with my own projects, and in a way it gets rid of the large storage of programs.
This is how my implementation work:

The synthesizer itself has its own preset manager. Presets will be loaded on demand.
When the host calls initProgramName(), it requests preset manager for preset names.
When the host calls loadProgram(), it requests preset manager to actually load a preset by index.

If this patch is unsuitable for merging, I will keep it myself.

Why I want to implement program for VST2 is that many VST2 plugins supports it. For example, Memorymoon series, MixCraft's Classic Effects. But they are old plugins (maybe were born 10+ years ago), only providing VST2 versions.
During this discussion, I start to consider that implementing programs for VST2 is not really essential.
The biggest problem is: host-side VST2 program implementation is not universal. For example, my amsynth fork has 3000+ programs, however:

REAPER can only display about 500 VST2 factory presets.
Carla can display all of them, in drop-down menu.
Falcosoft's MidiPlayer can also display all of them.

Also, I spotted that REAPER's factory plugins are also in VST2 versions, but they don't implement programs, instead they use RPL (REAPER user preset file).
So in conclusion I may prefer built-in preset manager instead. (But I will still keep this implementation in my own fork.)

Now with VST3 the situation is a bit different, so myself and others just stopped caring about this.
And CLAP doesnt support programs/presets yet afaik.

By the way, I have found that you use a parameter "Current preset" to allow user to pick a program, and initParamName() and loadProgram() works perfectly in VST3. Even though my project has 3000+ programs, DPF still handles well.

However, it could be better if DPF can implement VST3 factory programs as drop-down menu. U-he's VST3 ports supports loading their factory programs (maybe user programs as well) into host's drop-down menu, which is similar to VST2's behavior.

can you show in pics how these are different?

This is the VST3 version of Dexed.


Consider testing against YARP's fixtures

Is your feature request related to a problem? Please describe.
Writing cops which work against all possible Ruby syntax variations can be difficult. In particulary, newly added a cops often need fixes once they are enabled on real world codebases.
Describe the solution you'd like
The YARP project contains a large collection of fixtures which may be useful to test against:
https://github.com/ruby/yarp/tree/main/test/fixtures
Running it against the latest RuboCop shows one failure currently:
An error occurred while Lint/SuppressedException cop was inspecting /Users/andyw8/src/github.com/Shopify/yarp/test/fixtures/rescue.rb:26:34.

The YARP fixtures could be added as a submodule.
Describe alternatives you've considered
n/a
Additional context
I initially thought this may have prevented https://github.com/rubocop/rubocop/issues/12079 but there's no fixture in YARP for that currently. I still believe it could be useful to test against though.

That's an interesting idea, but its implementation needs to be considered. In the meantime, I opened #12086 to prevent the Lint/SuppressedException's error.

@koic Since https://github.com/rubocop/rubocop/pull/12086 only fixes the example mentioned in the description rather than the idea itself, should this be kept open?


Add ol.source.ImageArcGISRest

ol.source.ImageArcGISRest is added so a single image can be retrieved which is required when labelling is applied to the underlying map service.
it's similar to ol.source.ImageWMS
usage:

var layer = new ol.layer.Image({
  source: new ol.source.ImageArcGISRest({
    url: "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer",
  })
});

so is this needed or not? i'm using it, so i thought it would be of use to the main project.
is there some other hoops i need to jump through before it can be added? please tell me so i can do what needs to be done.

This is not a clean PR so we cannot merge it. Look at the history.

seems to be superseded by #3859

thanks for having a look, but no, it's not superseded by #3859.
this is something entirely different - it's a non-tiled ArcGIS rest source, which is useful when dealing with labelled map services.
#3859 is adding an additional option into TileArcGISRest source of crossOrigin.
i'll open another pull request when i've got everything working properly on my desktop.

i've rebased my change into a single commit.

something is still wrong, your PR included a commit which it shouldn't

I don't know how that got in there. I'll close this one and start another one.

closing as replaced by #3880


SizeInBytes: Derive Serialise

Description
This PR adds lets SizeInBytes derive a Serialise instance, which we need to fix issue #532 in  ouroboros-consensus.

@RenateEilers we avoid to use Serialise in codecs to avoid situation where encoding changes underneath us without our knowledge. It's unlikely for a Word32 type, but if we could avoid it that would be better.

@coot


[Feature]: Reach agreement on temporal alignment method/argument names

What would you like to see added to NeuroConv?
From discussions following #237, the usage of the word timestamps is a bit overloaded.
Specifically, timestamps ought to solely refer to the time vector of the associated TimeSeries of each interface, but it currently also applies to the time vectors used in align_by_interpolation which may be parsed from TTL or other digital signals.
Also, specific to align_by_interpolation, a description of what the function does in words could be "A digital signal is sent from a secondary system and received by the primary system to align the timing differences between the two clocks."
The keyword arguments for the function should be chosen to best describe the role of the inputs
Current: unaligned_timestamps, aligned_timestamps
Alternative #1: ttl_sent_times, ttl_recieved times
Alternative #2: unaligned_times, aligned_times
Alternative #3: sent_times, recieved_times
Alternative #3: secondary_times, primary_times
For alternative #2, keep in mind that the timing information does not need to be from TTL pulses - it could be inferred from an algorithm similar to how MICrONS does it - or it could be parsed from a non-TTL digital signal, such as audio events
Is your feature request related to a problem?
No response
Do you have any interest in helping implement the feature?
Yes.
Code of Conduct

[X] I agree to follow this project's Code of Conduct
[X] Have you ensured this bug was not already reported?

From meeting, this is fine for now

you claim that align for setters is a good name because the only way to align timestamps is to actually set them.

Not entirely, and I entirely embrace the core logic of your argument
My reasoning is that a sequence of code written by the user would be read by anyone looking at the code or running it as an affirmation that the timestamps are now aligned after calling these methods (or that the motor in the car is repaired or that the dinner is cooked) - of course, this does not mean that they are [in any sense, perhaps it was an identity mapping interface.align_timestamps(aligned_timestamps=interface.get_timestamps())], or that they are set correctly (which is something only the experimenter would actually know)
The method and argument names are simply there to communicate the role in the workflow - the goal of which is the align timing information - not necessarily to communicate what exactly that function does or how it works

For example...

Now, your examples have key differences from the workflow here, so I'll introduce a class-based structure
Let's say you have a Car class, and it has an attribute for each part that needs to work in order to successfully call a function called drive; my instance of a car = Car() cannot call car.drive() because car.motor_working: bool = False; to fix it, I need to call an intermediary util (or more commonly a sequence of several functions ) to repair the motor, then re-attach it (since I can't work on the motor while it's in the car; I had to take it out first)
from car_package.utils import fix_broken_motor

car = Car()

broken_motor = car.motor
repaired_motor = fix_broken_motor(broken_motor=broken_motor)

car.repair_motor(repaired_motor=repaired_motor )

Could the method repair_motor be called mount_motor or attach_motor? Absolutely. Does the code above convey that the car now has a repaired motor? I hope so; but let's consider the alternate naming and a user that doesn't name their variables well
from car_package.utils import fix_broken_motor

car = Car()

mtr = np.load("some_motor_file.npy")

car.attach_motor(motor=mtr )

is it clear from this that the motor has been fixed? Not without further introspection; but from the method repair_motor and keyword repaired_motor, whatever the name of the variable you happened to set acts as an affirmation that it is no longer broken.
For completeness, here's the other example adapted as closely to the approximated NeuroConv workflow as possible. I've replaced the role of aligned timestamps with preparation of ingredients, since it is a pre-step of actually cooking the meal
from cooking_package.utils import prepare_ingredients_one_way, prepare_ingredients_another_way

todays_dinner = SpaghettiDinner()  # The `cook_meal` method here takes set prepared ingredients and makes spaghetti out of them

todays_dinner.ingredients = [
    # list of items
]

todays_dinner.ready_to_cook
>>> False
>>> UserWarning: You have not yet prepared your ingredients! Please prepare them ingredients and set the attribute with `.cook_meal(cooked_meal=...)`

prepared_ingredients = prepare_ingredients_another_way(ingredients=todays_dinner.ingredients)
todays_dinner.prepare_ingredients(prepared_ingredients=prepared_ingredients)

cooked_spaghetti = todays_dinner.cook_meal()  # the parellel being `nwbfile = interface.run_conversion()`

Now, should this be called set_prepared_ingredients for extra clarity? Possibly, probably, IDK. Is it clear and readable enough? I hope

Now, do I care about this just because I really like logic? No, I think that in the future and for certain simple cases we can actually have a function that fully will deserve the name align_timestamps that gets the timestamps from the right place and use your setters to set the aligned timestamps. If we keep the current names then we overload the concept in advance for no good reason as far as I can see.

Now, your last point here is something we considered early on (particularly, a method called something like interface.set_alignment_method(alignment_method: callable, **alignment_method_kwargs) where the user specifies a generic function for performing alignment, and that is what get's called when you actually perform alignment with align_timestamps
However, there's such diversity observed across alignment strategies that it was hard to design a consistent enough API on an arbitrary callable to ensure the various pieces worked correctly
Likewise, I do not expect that it will ever be simple enough in the future that each interface can simply have an align_timestamps method that somehow knows enough to 'just be able to do it' (automatically align, that is), which is why a setter is all we really can do at the interface level

TL;DR
@h-mayorquin does set_aligned_timestamps and set_aligned_starting_times work for you?

I think that the crux of our disagreem is this:
The method and argument names are simply there to communicate the role in the workflow - the goal of which is the align timing information - not necessarily to communicate what exactly that function does or how it works

I disagree with this. I do believe that function names specially when used as verbs should convey as precisely as possible what the function does.
Instead we are using here something less clear which I can't fully describe. Maybe using the name of the function to "mark a point on the script" (the point at which the alignment should be done) or "remind the code writer what they should be doing with the method"? You will be able to describe it better what is
To illustrate this difference:
from car_package.utils import fix_broken_motor

car = Car()

mtr = np.load("some_motor_file.npy")

car.attach_motor(motor=mtr )

I understand that you feel that if the method was called repair_motor instead of attach_motor the code will be clearar. I don't agree with this. The role of the function name is to describe what it does not to remind the author what they should be doing with it. Here, it is the reposnability of the author to provide the clarity with:
from car_package.utils import fix_broken_motor

car = Car()

a_working_motor = np.load("some_motor_file.npy")

car.attach_motor(motor=a_working_motor )

If the me

@h-mayorquin what about set_aligned_timestamps? Technically interface.align_by_interpolation DOES perform the alignment operation. And now that I double-check it, align_starting_time does align the timestamps by the starting_time, which is a type of operation in itself

@h-mayorquin Only thing is then you have
get_original_timestamps
get_timestamps
set_aligned_timestamps
align_starting_time
align_by_interpolation
so set_ is the odd one out

But it is the only one that is a true setter, that does not perform any other operation

Regardless, my current suggestion for improvement is in https://github.com/catalystneuro/neuroconv/issues/301#issuecomment-1579220671
@h-mayorquin What would you prefer to name each of these methods and their keyword arguments?

Hey, @CodyCBakerPhD , sorry, got into something. First, thanks for bearing with me and laying your arguments so I can pin point more clearly what I think.
First, concerning car.repair_motor(repaired_motor=a_broken_motor),  I do agree with you that this version is unlikely to be used in a misleading form. While I feel that most users don't use keywords to write their functions you could make this keyword only. It stiill sounds strange to me to have an interface that looks like array.sort_array(sorted_array=the_array_that_you_sorted_somewhere_else) but point taken that keyword arguments can be used to improve clarity and make the misleading use case of this pattern less likely.
In the same vein I do think that set_aligned_timestamps is an improvement as the name more clearly implies that the timestamps should be aligned already. Plus with an appropiatley named keyword, the likelihood of using a method in a misleading way decreases.
I think this is a compromise that dispells my biggest concerns. Your examples were very  useful for the discussion.
Now, what would I prefer?

Interfaces have a property called timestamps (or something else) and a property start_time which can be accessed after initializing the interface so we can do checks before writing (calling run_conversion or the future write that we have discussed). Both properties can be modified, they are dynamic.

Interfaces also have a property called native_timestamps,  format_timestamps or something else  and format_start_time` which provide the timestamps and the start_time (timestamps[0]) of the native format when available. Both properties are ready-only.

Setters and getters for the timestamps and start_time for the single and multi-segment cases. When setting the start_time the timestamps are modifed and vice-versa. The interface as an object is time-aware and keeps that as state.

When we call write or run conversion we have logic to decide on the spot if we write timestamps or rate plus start_time if that is possible (regular timestamps and the interface has a sampling rate). Importantly, what we end up writing in an nwbfile is inependent and decoupled of us calling set_timestamps or set_starting_time We decouple time-awarness from efficient writing data to the nwbfile.
So:
get_original_timestamps  ->  get_native_timestamps()
get_timestamps -> get_timestamps()
set_aligned_timestamps -> set_timestamps()
align_starting_time -> set_start_time()
align_by_interpolation: I think this is a conventience method to create timestamps to be set, I don't really don't think it should be an interface method. In the current state of the code you are leaving it undefined at a lot of places.
and for multi-segment:
set_aligned_segment_timestamps -> set_segment_timestamps()
set_aligned_segment_starting_times -> set_segment_starting_time().
These methods names are honest, specific and transparent. They don't require further specification with extra keywords or words to avoid a misleading use case. Setting variables is not aligning, the person doing the conversion (and only them) know what the right timestamps are they set them. I feel that aligning is a metaphor that is more loaded to the TTL case and in most cases you just want to shift by a time (so you will use set_start_time) or set the timestamps that you extracted from another file (and use set_timestamps). Set timestamps and set_start_time seems clear and general enough to me.

thanks for bearing with me and laying your arguments so I can pin point more clearly what I think.

Same, I just wish we could have done this months ago before it got this deep lol

In the same vein I do think that set_aligned_timestamps is an improvement as the name more clearly implies that the timestamps should be aligned already. Plus with an appropiatley named keyword, the likelihood of using a method in a misleading way decreases.
I think this is a compromise that dispells my biggest concerns. Your examples were very useful for the discussion.

I'll move forward with the compromise then; I do really prefer to have the key word 'align' associated with the methods wherever possible because we are not just a generic API for containing data fields; the entire reason we are even adding this capability is specifically to allow and encourage easier temporal alignment
That and more reasons below

These methods names are honest, specific and transparent.

And uninformative - they lack the key reason as to why we should care or bother with these fields
Most APIs we use for reading (SI, ROIExtractors, OpenCV, DLC, SLEAP, etc...) all have a generic notion of time; it is only in the context of NeuroConv and NWB and the phrase alignment enters in, and is especially critical to pay attention to

They don't require further specification with extra keywords or words to avoid a misleading use case. Setting variables is not aligning, the person doing the conversion (and only them) know what the right timestamps are they set them.

Right, so they could very well be used in a way that makes sense only to a user that didn't read the documentation and doesn't understand what it's for; I could see generic references being a gateway to the dreaded trialization of all timestamps (native contiguous vector is retrieved, and each value re-indexed relative to event or other interval times)
That still doesn't mean that including the word 'align' will prevent that, but hopefully it would at least give pause, motivation to read the docstring, and even explore the documentation to ask the question "what does 'alignment' mean?"

I feel that aligning is a metaphor that is more loaded to the TTL case and in most cases you just want to shift by a time (so you will use set_start_time) or set the timestamps that you extracted from another file (and use set_timestamps).

It's not explicitly tied to TTL, which is why TTL isn't in the name (see very first comment in this issue)
Yet in every situation you would want to modify the timestamps in NeuroConv, it is for the purpose of aligning to a common start time
Most cases you will probably just shift by a scalar start time; that shift is done specifically for the purpose of alignment
The other buzzword used is 'synchronization', but that isn't specific enough as there are those other types of synchronizing that we do not encourage (such as data interpolation)


Use

Hello,
I was expecting to use this component like this:
<Gallery>

</Gallery>

And I'm getting this error
TypeError: Cannot read property 'map' of undefined
    at Constructor.render (/Users/ricardorauch/Sites/rickyrauch.me/.next/dist/components/gallery.js:21:48)
    at /Users/ricardorauch/Sites/rickyrauch.me/node_modules/react/lib/ReactCompositeComponent.js:793:21
    at measureLifeCyclePerf (/Users/ricardorauch/Sites/rickyrauch.me/node_modules/react/lib/ReactCompositeComponent.js:74:12)

Hi @rickyrauch
What does gallery.js look like?

Hello @afram
Exactly as your example.
var React = require('react');
var Masonry = require('react-masonry-component');

var masonryOptions = {
    transitionDuration: 0
};

var Gallery = React.createClass({
    render: function () {
        var childElements = this.props.elements.map(function(element){
           return (

            );
        });

        return (
            <Masonry
                className={'my-gallery-class'} // default ''
                elementType={'ul'} // default 'div'
                options={masonryOptions} // default {}
                disableImagesLoaded={false} // default false
                updateOnEachImageLoad={false} // default false and works only if disableImagesLoaded is false
            >
                {childElements}
            </Masonry>
        );
    }
});

module.exports = Gallery;

This example expects elements to be passed into Gallery as a prop. I suspect this is where it's failing for you.
You probably want something more along the lines of:
var Gallery = React.createClass({
    render: function () {
        return (
            <Masonry
                className={'my-gallery-class'} // default ''
                elementType={'ul'} // default 'div'
                options={masonryOptions} // default {}
                disableImagesLoaded={false} // default false
                updateOnEachImageLoad={false} // default false and works only if disableImagesLoaded is false
            >
                { this.props.children }
            </Masonry>
        );
    }
});

@afram Thanks for clarifying,
I still want to use this

No problem, that's easy done, though in a slightly different way to how you initially had it.
let elements = [
    {
        src: '/image1.jpg`
    },
    {
        src: '/image2.jpg`
    }
];

<Gallery elements={ elements } />

Yes, that's what I did.
I think the best approach would be:
<Gallery>

</Gallery>
Thanks.

That's really up to you :-)
I would ask the question "Why are images displayed in an unordered list?" - this example was largely to show people the component's flexibility.
Good luck, glad I could help :-)

I'm not saying
, my example tries to show my own code. Instead of
 could be
. Parent (div or ul) and its childs (div or li)

No problem.
I'm closing this now as I hope I managed to answer your question.
Please reopen if you need to!


workaround missing dictproxy methods Fixes #295

Thank for your the PR. To fix this properly, you would have to actual provide a view that was updated if the underlying dictionary was updated. Since you weren't able to view dict proxies on Python 2 anyway, I don't think this needs to be fixed, though.

@benjaminp ^

collections.abc.KeysView does update and the unmoved collections.KeysView updates too

correct, but this PR does not implement that behavior for dict proxies.

@benjaminp, sure but I don't know how best to import collections.abc for every python version

Yes, this all leads to my feeling that the complexity of fixing this correctly is not worth it.


页面无法滑动。

Describe the bug
When expanding the card overlays, the overflowed content can not be seen nor be scrolled down.
什么垃圾英语 义工列表页面如果条目比较多并且全部展开，就无法滑动查看下面的内容了。
To Reproduce
Steps to reproduce the behavior:

Go to /activity/
Click on all the expand icons
Try to scroll down but you failed to do so
See error

Expected behavior
无法滑动查看下面的内容了。
Screenshots

Desktop (please complete the following information):

OS: all, i think
Browser ggChrome
Version 118

Smartphone (please complete the following information):

Device: XH, i think
OS: ?
Browser XHBrowser(?)
Version 114514

Additional context
No.

BTW, Y is vercel unavaliable
it's said that the vercel account has been banned?


2.17.9 无法启动

Qinglong version
2.17.9
Steps to reproduce
pm2 logs日志报错，无法启动
What is expected?
/root/.pm2/logs/panel-error.log last 15 lines:
3|panel    | 2024-08-30T16:36:26:   sql: 'UPDATE Crontabs SET status=$1,updatedAt=$2',
3|panel    | 2024-08-30T16:36:26:   parameters: {}
3|panel    | 2024-08-30T16:36:26: }
3|panel    | 2024-08-30T16:36:26: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
3|panel    | 2024-08-30T16:36:26: Error:
3|panel    | 2024-08-30T16:36:26:     at Database. (/ql/node_modules/.pnpm/sequelize@6.32.0_@whyour+sqlite3@1.0.3/node_modules/sequelize/src/dialects/sqlite/query.js:236:27)
3|panel    | 2024-08-30T16:36:26:     at /ql/node_modules/.pnpm/sequelize@6.32.0_@whyour+sqlite3@1.0.3/node_modules/sequelize/src/dialects/sqlite/query.js:234:50
3|panel    | 2024-08-30T16:36:26:     at new Promise ()
3|panel    | 2024-08-30T16:36:26:     at Query.run (/ql/node_modules/.pnpm/sequelize@6.32.0_@whyour+sqlite3@1.0.3/node_modules/sequelize/src/dialects/sqlite/query.js:234:12)
3|panel    | 2024-08-30T16:36:26:     at /ql/node_modules/.pnpm/sequelize@6.32.0_@whyour+sqlite3@1.0.3/node_modules/sequelize/src/sequelize.js:650:28
3|panel    | 2024-08-30T16:36:26:     at SQLiteQueryInterface.bulkUpdate (/ql/node_modules/.pnpm/sequelize@6.32.0_@whyour+sqlite3@1.0.3/node_modules/sequelize/src/dialects/abstract/query-interface.js:930:12)
3|panel    | 2024-08-30T16:36:26:     at Function.update (/ql/node_modules/.pnpm/sequelize@6.32.0_@whyour+sqlite3@1.0.3/node_modules/sequelize/src/model.js:3351:28)
3|panel    | 2024-08-30T16:36:26:     at exports.default (/ql/back/loaders/initData.ts:84:3)
3|panel    | 2024-08-30T16:36:26:     at Object.exports.default (/ql/back/loaders/app.ts:14:3)
3|panel    | 2024-08-30T16:36:26:     at startServer (/ql/back/app.ts:15:3)
What is actually happening?
请帮我解决下
System Info
No response
Any additional comments?
No response

把这个文件发下 /root/.pm2/logs/panel-error.log

无法启动+1
/ql $pm2 logs
[TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
/root/.pm2/pm2.log last 15 lines:
PM2        | 2024-09-02T17:01:03: PM2 log: App [schedule:1] starting in -fork mode-
PM2        | 2024-09-02T17:01:03: PM2 log: App [public:2] starting in -fork mode-
PM2        | 2024-09-02T17:01:13: PM2 log: App [schedule:1] online
PM2        | 2024-09-02T17:01:13: PM2 log: App [public:2] online
PM2        | 2024-09-02T17:01:13: PM2 log: App [panel:3] starting in -fork mode-
PM2        | 2024-09-02T17:01:24: PM2 log: App [panel:3] online
/root/.pm2/logs/schedule-error.log last 15 lines:
/root/.pm2/logs/public-error.log last 15 lines:
/root/.pm2/logs/update-error.log last 15 lines:
/root/.pm2/logs/update-out.log last 15 lines:
0|update   | 2024-09-02T17:01:07: ✌ 更新服务启动成功！
/root/.pm2/logs/schedule-out.log last 15 lines:
1|schedule | 2024-05-09T10:11:34: ✌ 定时服务启动成功！
1|schedule | 2024-07-07T17:39:59: ✌ 定时服务启动成功！
1|schedule | 2024-07-08T00:46:57: ✌ 定时服务启动成功！
1|schedule | 2024-07-11T00:58:41: ✌ 定时服务启动成功！
1|schedule | 2024-07-24T09:04:57: ✌ 定时服务启动成功！
1|schedule | 2024-08-22T10:32:32: ✌ 定时服务启动成功！
1|schedule | 2024-09-02T16:27:45: ✌ 定时服务启动成功！
1|schedule | 2024-09-02T16:58:11: ✌ 定时服务启动成功！
1|schedule | 2024-09-02T17:01:36: ✌ 定时服务启动成功！
/root/.pm2/logs/public-out.log last 15 lines:
2|public   | 2024-07-11T00:58:39: ✌ Sentry loaded
2|public   | 2024-07-11T00:58:52: ✌ DB loaded
2|public   | 2024-07-11T00:58:52: ✌ 公共服务启动成功！
2|public   | 2024-07-24T09:04:50: ✌ Sentry loaded
2|public   | 2024-07-24T09:05:09: ✌ DB loaded
2|public   | 2024-07-24T09:05:09: ✌ 公共服务启动成功！
2|public   | 2024-08-22T10:32:29: ✌ Sentry loaded
2|public   | 2024-08-22T10:32:42: ✌ DB loaded
2|public   | 2024-08-22T10:32:42: ✌ 公共服务启动成功！
2|public   | 2024-09-02T16:27:48: ✌ DB loaded
2|public   | 2024-09-02T16:27:48: ✌ 公共服务启动成功！
2|public   | 2024-09-02T16:58:10: ✌ DB loaded
2|public   | 2024-09-02T16:58:10: ✌ 公共服务启动成功！
2|public   | 2024-09-02T17:01:42: ✌ DB loaded
2|public   | 2024-09-02T17:01:42: ✌ 公共服务启动成功！
/root/.pm2/logs/panel-out.log last 15 lines:
3|panel    | 2024-09-02T16:28:08: ✌ Init task loaded
3|panel    | 2024-09-02T16:58:00: ✌ Sentry loaded
3|panel    | 2024-09-02T16:58:18: ✌ DB loaded
3|panel    | 2024-09-02T16:58:19: ✌ Init file down
3|panel    | 2024-09-02T16:58:33: ✌ Dependency loaded
3|panel    | 2024-09-02T16:58:36: ✌ Init data loaded
3|panel    | 2024-09-02T16:58:36: ✌ Link deps loaded
3|panel    | 2024-09-02T16:58:36: ✌ Init task loaded
3|panel    | 2024-09-02T17:01:35: ✌ Sentry loaded
3|panel    | 2024-09-02T17:01:51: ✌ DB loaded
3|panel    | 2024-09-02T17:01:51: ✌ Init file down
3|panel    | 2024-09-02T17:02:01: ✌ Dependency loaded
3|panel    | 2024-09-02T17:02:08: ✌ Init data loaded
3|panel    | 2024-09-02T17:02:08: ✌ Link deps loaded
3|panel    | 2024-09-02T17:02:08: ✌ Init task loaded
/root/.pm2/logs/panel-error.log last 15 lines:
3|panel    | 2024-09-02T16:58:38:     at startServer (/ql/back/app.ts:14:3)
3|panel    | 2024-09-02T16:58:38: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
3|panel    | 2024-09-02T16:58:38: TypeError: Sentry.setupExpressErrorHandler is not a function
3|panel    | 2024-09-02T16:58:38:     at exports.default (/ql/back/loaders/express.ts:136:10)
3|panel    | 2024-09-02T16:58:38:     at Object.exports.default (/ql/back/loaders/app.ts:26:16)
3|panel    | 2024-09-02T16:58:38:     at startServer (/ql/back/app.ts:14:3)
3|panel    | 2024-09-02T17:02:17: TypeError: Sentry.setupExpressErrorHandler is not a function
3|panel    | 2024-09-02T17:02:17:     at exports.default (/ql/back/loaders/express.ts:136:10)
3|panel    | 2024-09-02T17:02:17:     at Object.exports.default (/ql/back/loaders/app.ts:26:16)
3|panel    | 2024-09-02T17:02:17:     at startServer (/ql/back/app.ts:14:3)
3|panel    | 2024-09-02T17:02:18: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
3|panel    | 2024-09-02T17:02:18: TypeError: Sentry.setupExpressErrorHandler is not a function
3|panel    | 2024-09-02T17:02:18:     at exports.default (/ql/back/loaders/express.ts:136:10)
3|panel    | 2024-09-02T17:02:18:     at Object.exports.default (/ql/back/loaders/app.ts:26:16)
3|panel    | 2024-09-02T17:02:18:     at startServer (/ql/back/app.ts:14:3)
cat  /root/.pm2/logs/panel-error.log
2024-05-25T12:55:19:
2024-05-25T12:55:19: <--- Last few GCs --->
2024-05-25T12:55:19:
2024-05-25T12:55:19: [210:0xb3a73430]<PHONE_NUMBER> ms: Mark-Compact 238.1 (255.1) -> 238.0 (254.6) MB, 623.98 / 0.00 ms  (average mu = 0.879, current mu = 0.309) allocation failure; scavenge might not succeed
2024-05-25T12:55:19: [210:0xb3a73430]<PHONE_NUMBER> ms: Mark-Compact 239.9 (254.6) -> 239.7 (258.6) MB, 586.11 / 0.00 ms  (average mu = 0.775, current mu = 0.049) allocation failure; scavenge might not succeed
2024-05-25T12:55:19:
2024-05-25T12:55:19:
2024-05-25T12:55:19: <--- JS stacktrace --->
2024-05-25T12:55:19:
2024-05-25T12:55:19: FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
2024-05-25T12:55:19: ----- Native stack trace -----
2024-05-25T12:55:19:
2024-09-02T16:28:09: TypeError: Sentry.setupExpressErrorHandler is not a function
2024-09-02T16:28:09:     at exports.default (/ql/back/loaders/express.ts:136:10)
2024-09-02T16:28:09:     at Object.exports.default (/ql/back/loaders/app.ts:26:16)
2024-09-02T16:28:09:     at startServer (/ql/back/app.ts:14:3)
2024-09-02T16:28:09: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
2024-09-02T16:28:09: TypeError: Sentry.setupExpressErrorHandler is not a function
2024-09-02T16:28:09:     at exports.default (/ql/back/loaders/express.ts:136:10)
2024-09-02T16:28:09:     at Object.exports.default (/ql/back/loaders/app.ts:26:16)
2024-09-02T16:28:09:     at startServer (/ql/back/app.ts:14:3)
2024-09-02T16:58:38: TypeError: Sentry.setupExpressErrorHandler is not a function
2024-09-02T16:58:38:     at exports.default (/ql/back/loaders/express.ts:136:10)
2024-09-02T16:58:38:     at Object.exports.default (/ql/back/loaders/app.ts:26:16)
2024-09-02T16:58:38:     at startServer (/ql/back/app.ts:14:3)
2024-09-02T16:58:38: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
2024-09-02T16:58:38: TypeError: Sentry.setupExpressErrorHandler is not a function
2024-09-02T16:58:38:     at exports.default (/ql/back/loaders/express.ts:136:10)
2024-09-02T16:58:38:     at Object.exports.default (/ql/back/loaders/app.ts:26:16)
2024-09-02T16:58:38:     at startServer (/ql/back/app.ts:14:3)
2024-09-02T17:02:17: TypeError: Sentry.setupExpressErrorHandler is not a function
2024-09-02T17:02:17:     at exports.default (/ql/back/loaders/express.ts:136:10)
2024-09-02T17:02:17:     at Object.exports.default (/ql/back/loaders/app.ts:26:16)
2024-09-02T17:02:17:     at startServer (/ql/back/app.ts:14:3)
2024-09-02T17:02:18: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
2024-09-02T17:02:18: TypeError: Sentry.setupExpressErrorHandler is not a function
2024-09-02T17:02:18:     at exports.default (/ql/back/loaders/express.ts:136:10)
2024-09-02T17:02:18:     at Object.exports.default (/ql/back/loaders/app.ts:26:16)
2024-09-02T17:02:18:     at startServer (/ql/back/app.ts:14:3)
@whyour 🙏

无法启动+1
/ql $pm2 logs [TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option) /root/.pm2/pm2.log last 15 lines: PM2 | 2024-09-02T17:01:03: PM2 log: App [schedule:1] starting in -fork mode- PM2 | 2024-09-02T17:01:03: PM2 log: App [public:2] starting in -fork mode- PM2 | 2024-09-02T17:01:13: PM2 log: App [schedule:1] online PM2 | 2024-09-02T17:01:13: PM2 log: App [public:2] online PM2 | 2024-09-02T17:01:13: PM2 log: App [panel:3] starting in -fork mode- PM2 | 2024-09-02T17:01:24: PM2 log: App [panel:3] online
/root/.pm2/logs/panel-error.log last 15 lines: 3|panel | 2024-09-02T16:58:38: at startServer (/ql/back/app.ts:14:3) 3|panel | 2024-09-02T16:58:38: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason: 3|panel | 2024-09-02T16:58:38: TypeError: Sentry.setupExpressErrorHandler is not a function 3|panel | 2024-09-02T16:58:38: at exports.default (/ql/back/loaders/express.ts:136:10) 3|panel | 2024-09-02T16:58:38: at Object.exports.default (/ql/back/loaders/app.ts:26:16) 3|panel | 2024-09-02T16:58:38: at startServer (/ql/back/app.ts:14:3) 3|panel | 2024-09-02T17:02:17: TypeError: Sentry.setupExpressErrorHandler is not a function 3|panel | 2024-09-02T17:02:17: at exports.default (/ql/back/loaders/express.ts:136:10) 3|panel | 2024-09-02T17:02:17: at Object.exports.default (/ql/back/loaders/app.ts:26:16) 3|panel | 2024-09-02T17:02:17: at startServer (/ql/back/app.ts:14:3) 3|panel | 2024-09-02T17:02:18: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason: 3|panel | 2024-09-02T17:02:18: TypeError: Sentry.setupExpressErrorHandler is not a function 3|panel | 2024-09-02T17:02:18: at exports.default (/ql/back/loaders/express.ts:136:10) 3|panel | 2024-09-02T17:02:18: at Object.exports.default (/ql/back/loaders/app.ts:26:16) 3|panel | 2024-09-02T17:02:18: at startServer (/ql/back/app.ts:14:3)
cat /root/.pm2/logs/panel-error.log 2024-05-25T12:55:19: 2024-05-25T12:55:19: <--- Last few GCs ---> 2024-05-25T12:55:19: 2024-05-25T12:55:19: [210:0xb3a73430]<PHONE_NUMBER> ms: Mark-Compact 238.1 (255.1) -> 238.0 (254.6) MB, 623.98 / 0.00 ms (average mu = 0.879, current mu = 0.309) allocation failure; scavenge might not succeed 2024-05-25T12:55:19: [210:0xb3a73430]<PHONE_NUMBER> ms: Mark-Compact 239.9 (254.6) -> 239.7 (258.6) MB, 586.11 / 0.00 ms (average mu = 0.775, current mu = 0.049) allocation failure; scavenge might not succeed 2024-05-25T12:55:19: 2024-05-25T12:55:19: 2024-05-25T12:55:19: <--- JS stacktrace ---> 2024-05-25T12:55:19: 2024-05-25T12:55:19: FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory 2024-05-25T12:55:19: ----- Native stack trace ----- 2024-05-25T12:55:19: 2024-09-02T16:28:09: TypeError: Sentry.setupExpressErrorHandler is not a function 2024-09-02T16:28:09: at exports.default (/ql/back/loaders/express.ts:136:10) 2024-09-02T16:28:09: at Object.exports.default (/ql/back/loaders/app.ts:26:16) 2024-09-02T16:28:09: at startServer (/ql/back/app.ts:14:3) 2024-09-02T16:28:09: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason: 2024-09-02T16:28:09: TypeError: Sentry.setupExpressErrorHandler is not a function 2024-09-02T16:28:09: at exports.default (/ql/back/loaders/express.ts:136:10) 2024-09-02T16:28:09: at Object.exports.default (/ql/back/loaders/app.ts:26:16) 2024-09-02T16:28:09: at startServer (/ql/back/app.ts:14:3) 2024-09-02T16:58:38: TypeError: Sentry.setupExpressErrorHandler is not a function 2024-09-02T16:58:38: at exports.default (/ql/back/loaders/express.ts:136:10) 2024-09-02T16:58:38: at Object.exports.default (/ql/back/loaders/app.ts:26:16) 2024-09-02T16:58:38: at startServer (/ql/back/app.ts:14:3) 2024-09-02T16:58:38: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason: 2024-09-02T16:58:38: TypeError: Sentry.setupExpressErrorHandler is not a function 2024-09-02T16:58:38: at exports.default (/ql/back/loaders/express.ts:136:10) 2024-09-02T16:58:38: at Object.exports.default (/ql/back/loaders/app.ts:26:16) 2024-09-02T16:58:38: at startServer (/ql/back/app.ts:14:3) 2024-09-02T17:02:17: TypeError: Sentry.setupExpressErrorHandler is not a function 2024-09-02T17:02:17: at exports.default (/ql/back/loaders/express.ts:136:10) 2024-09-02T17:02:17: at Object.exports.default (/ql/back/loaders/app.ts:26:16) 2024-09-02T17:02:17: at startServer (/ql/back/app.ts:14:3) 2024-09-02T17:02:18: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason: 2024-09-02T17:02:18: TypeError: Sentry.setupExpressErrorHandler is not a function 2024-09-02T17:02:18: at exports.default (/ql/back/loaders/express.ts:136:10) 2024-09-02T17:02:18: at Object.exports.default (/ql/back/loaders/app.ts:26:16) 2024-09-02T17:02:18: at startServer (/ql/back/app.ts:14:3)
@whyour 🙏

启动依赖有问题，删除容器，更新最新镜像重新创建下


Tooltip won't trigget when using Badge as child

<TooltipProvider>
                <Tooltip>
                  <TooltipTrigger asChild>
                    <Badge>
   something
                    </Badge>
                  </TooltipTrigger>
                  <TooltipContent>

                      You are about to book a service from
                      something

                  </TooltipContent>
                </Tooltip>
              </TooltipProvider>

As solution you can add forwardRef to your Badge component like this:
const Badge = React.forwardRef<HTMLDivElement, BadgeProps>(({ className, variant, ...props }, ref) => {
  return (

  )
})

It works in my case

@skerrepy I can't reproduce this. See https://codesandbox.io/p/sandbox/agitated-currying-54zrjh?file=%2Fapp%2Fpage.tsx%3A20%2C98

I observed this interesting behavior with Badge inside TooltipTrigger asChild.
<TooltipProvider>
  <Dialog>
    <DialogTrigger>Open</DialogTrigger>
    <DialogContent>
      <DialogHeader>
        <DialogTitle>Dialog</DialogTitle>
      </DialogHeader>
      <Tooltip>
        <TooltipTrigger asChild>
          <Badge>something</Badge>
        </TooltipTrigger>
        <TooltipContent>

            You are about to book a service from
            something

        </TooltipContent>
      </Tooltip>
    </DialogContent>
  </Dialog>
</TooltipProvider>

The TooltipContent is rendered relative the the dialog modal which is not intended. However, if you want to use Badge as the trigger, removing asChild seems to resolve the issue. Though then the TooltipTrigger is rendered as a button element, which might potentially disrupt a form. A workaround to that could be using disabled on the TooltipTrigger.
<TooltipTrigger disabled>
  <Badge>something</Badge>
</TooltipTrigger>

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.

As solution you can add forwardRef to your Badge component like this:
const Badge = React.forwardRef<HTMLDivElement, BadgeProps>(({ className, variant, ...props }, ref) => {
  return (

  )
})

It works in my case

In my case, I also had to add the displayName property to the component , since we are changing to an arrow function here:
Badge.displayName = 'Badge';

This avoids the Component definition is missing display name react/display-name error when running next build


MPD doesn't update on hidden bars

Describe the issue
If the mpd module is active on a bar that's been hidden with echo 'cmd:hide' > /tmp/polybar_mqueue.$PID, it doesn't update.  When the bar is shown again, it has out of date now playing info until the playing file changes.
Expected behavior:
The mpd module is always kept up to date regardless of whether it's currently shown
Actual behavior:
The mpd module doesn't update unless that bar is displayed when the song changes
Was it working before?
Unknown, this is the first time I've used hidden bars
To Reproduce
A minimal but complete config with which the problem occurs:
[bar/music]
enable-ipc = true
override-redirect = true
modules-left = title
width = 25%
height = 27
offset-y = 27
border-size = 0

[module/mpd]
type = internal/mpd
label-song = %title% - %artist%
format-online = <label-song>
interval = 2
host = <IP_ADDRESS>
port = 6600

List any other steps needed to reproduce the issue besides starting polybar with the config you posted above.

Launch with polybar music
Hide bar with echo 'cmd:hide' > /tmp/polybar_mqueue.$PID
Change song playing in mpd
Show bar with echo 'cmd:show' > /tmp/polybar_mqueue.$PID

Polybar Log
Post everything polybar outputs to the terminal when you run it and the issue occurs below
% polybar music
warn: No fonts specified, using fallback font "fixed"

Environment:

WM: i3
Distro: Arch Linux
Output of polybar -vvv:

% polybar -vv
polybar 3.4.0

Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard

X extensions: +randr (+monitors) +composite +xkb +xrm +xcursor

Build type: Release
Compiler: /usr/bin/c++
Compiler flags: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wall -Wextra -Wpedantic -O3 -DNDEBUG
Linker flags: -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now

Additional context
I don't think it matters in this case, but I'm using Mopidy, not straight mpd

Thanks for reporting :)


Errors with --watch #ok

I got sold on using the upgraded --watch option (as it's faster), but that means I can't count on the exit code.  This is a patch to send errors to console.error instead of console.log so they can be handled separately even though they often go to the same place.  Saying 'Compiled'  only if output is generated - there is 'Failed to compile' counterpart.  There is always something sent to stdout or  stderr - so I can toggle (e.g. AnyBar) a green or red light respectively.  This affects only the cli onChange events for the source / include files.  The idea is that you start with something that parses / compile to begin with and you save one more or less parenthesis and the code continues to be watched rather than throwing an uncaught exception.  I left the lib/ki.js untouched - it doesn't affect my workflow and I didn't want to make unnecessary guesses.  We also get to know the first file containing macros that can't parse (with or without -w), in which case there is no further compilation attempted.

Good idea, thanks!


Programatically set value for Dropdown?

Steps
import React from 'react'
import { Field, reduxForm } from 'redux-form'
import { Form, Dropdown, Button } from 'semantic-ui-react'

var PurchaserForm = React.createClass({

  render () {

    var { users } = this.state
    var { user } = this.props.checkout

    var userOptions = users.map((user) => {
      return {
        key: user.id,
        value: user.id,
        text: `${user.fullname} ${user.phone}`,
      }
    })
    // https://github.com/Semantic-Org/Semantic-UI-React/pull/686
    userOptions.push({
      key: '-',
      value: '-',
      text: '',
    })

    var disabled = false
    if (user.id != '-') {
      disabled = true
    }
    return (
      <Form
        >
        <Form.Field>
          <Field
            component={Dropdown}
            name="name"
            type="text"
            fluid
            search
            selection
            options={userOptions}
            onSearchChange={this.handleNameSearchChange}
            onChange={this.handleUserChange}
            value={user.id}
            disabled={disabled}
            />
        </Form.Field>
        <Button type="submit" >Submit</Button>

      </Form>
    )
  },
}

set a new user in the redux store, and PurchaserForm gets rerendered with the new
  user: {
    id: '-',
    fullname: null,
    phone: null
  }

then value={user.id} becomes value='-'
Expected Result
I expect to see "" empty text because
userOptions have
{
      key: '-',
      value: '-',
      text: '',
}

Actual Result
But it still shows the text from the previous selection
Version
0.64.3
Testcase
I think it's a bit hard to set it up

Programmatically setting a dropdown's value works and is fully tested. There is a working example here:
http://react.semantic-ui.com/modules/dropdown#remote
Clicking random programmatically changes the value. If you believe there is a bug please create a repro demonstrating the bug so we can investigate further.

I've found this link a couple times going through your issues, it seems to be broken. Might want to make them more long lasting and standardized.

Link fixed, thanks.
http vs https issue beyond my control at present.

Can we set the options of the dropdown programatically?

I have not found away, this is the #1 thing folks would do in programming and there is no example, we need an example that sets the options after it's created say from an HTTP Get call?


Provide a Human-Readable Lightning Address

To improve usability and UX, implement support for human-readable Lightning addresses in<EMAIL_ADDRESS>format. These addresses simplify payment interactions by allowing users to share easily recognizable identifiers instead of lengthy, complex LNURLs like lnurl1.....

For tracking his was added:

To LNURL service in: https://github.com/breez/breez-lnurl/pull/7
Documented in: https://github.com/breez/breez-sdk-liquid-docs/pull/54


Amazing project. seems those 3 scheme files in starter_script.bat

.\starter_script.bat
python: can't open file '/home/jovyan/work/q_pack/db_pack/schema/secmaster_db_schema_builder.py': [Errno 2] No such file or directory python: can't open file '/home/jovyan/work/q_pack/db_pack/schema/secmaster_db_symbol_loader.py': [Errno 2] No such file or directory python: can't open file '/home/jovyan/work/q_pack/db_pack/schema/risk_db_schema_builder.py': [Errno 2] No such file or directory ...

please ignore it, i found it. thanks.

@superbirdgz where did you find these files?

@superbirdgz where did you find these files?


Why feature steps and scenarios are shown passed even though the tests have failed?

This is actually quit annoying, when I run the tests and scenarios , in command line/terminal the scenarios and steps are shown passed but actually the tests have failed. I am aware that protractor and cucumberJS run methods asynchronously but this is quit misleading.

You need to either use the "done" callback in your step definitions or
return a promise. Otherwise cucumber doesn't know when your asynchronous
actions are complete. I always make it a habit to return a promise on every
step.
On Saturday, May 28, 2016, Ram Pasala<EMAIL_ADDRESS>wrote:

This is actually quit annoying, when I run the tests and scenarios , in
command line/terminal the scenarios and steps are shown passed but actually
the tests have failed. I am aware that protractor and cucumberJS run
methods asynchronously but this is quit misleading.
[image: screen shot 2016-05-29 at 12 12 43 am]
https://cloud.githubusercontent.com/assets/15998104/15629271/59a684aa-2532-11e6-9323-074c357e2ade.png
[image: screen shot 2016-05-29 at 12 21 26 am]
https://cloud.githubusercontent.com/assets/15998104/15629302/5540566a-2533-11e6-9baa-d9040c5c613b.png
[image: screen shot 2016-05-29 at 12 24 13 am]
https://cloud.githubusercontent.com/assets/15998104/15629317/bf7657aa-2533-11e6-9c0a-3ceff36ea622.png
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/mattfritz/protractor-cucumber-framework/issues/32,
or mute the thread
https://github.com/notifications/unsubscribe/AAAS9j9k1F5Cm8ZBkj1yKUspR2TwcCtfks5qGJADgaJpZM4IpIya
.

@darrinholst But as far as I know cucumberJS supports synchronous step definitions, this should not happen ideally, plz correct me if i am wrong.

Sure, that's what happens if you don't use the callback or return a promise, but since nearly everything you do in protractor is asynchronous that's not going to help you much.

yep that makes sense, i have started returning promises and the steps are running as expected.
Thanks for clarifying! @darrinholst 😄


Open Source page header title incorrect

what should the title be?

"Open Source"

Thanks!

@orta ;)

interesting, I use that to nav between the blog/OSS pages, cool

The idea is that the link in the top left is shows the header of the other page. So when on the blog it says Open Source, and vice versa. Does that make sense?

Sorry I think I am being confusing about this.
But the header should be like this:

and this:

But it is currently like this:

and this:

See what I mean?

Yep, submitted #165 which you can hit "merge" on, I think


Add label by package name and update_type

With the removal of automerge a configuration like:
automerged_updates:
    - match:
        dependency_name: "eslint"
    - match:
        update_type: "semver:minor"
        dependency_name: "@fortawesome/free-brands-svg-icons"

Is no longer possible. In order to effectively automate a replacement using a merge action we need to be able to apply labels to the PR based on the package/semver release/risk.
Something like
labels:
    my_automerge_label:
      - match:
         dependency_name: eslint
         new_maintainer: false
      - match:
         update_type: semver:minor
         dependency_name: "@fortawesome/free-brands-svg-icons"

Criteria like new_maintainer is particularly important and something dependabot prevented auto-merging on in the past, but would be very difficult to suss out in a bot without parsing the content of the PR.
Refs #2268 #1973

Here is the action we've created: https://github.com/marketplace/actions/fetch-metadata-from-dependabot-prs
There are examples of how it can be used to add labels using only GitHub tooling.
I'm going to close this out for now, but if this proves to not work for folks, we can re-open this issue and re-consider the solution.

Thanks! This is going to be a big help for our small team.


Compare Version Numbers

Description
Given two version numbers, version1 and version2, compare them.
Version numbers consist of one or more revisions joined by a dot '.'. Each revision consists of digits and may contain leading zeros. Every revision contains at least one character. Revisions are 0-indexed from left to right, with the leftmost revision being revision 0, the next revision being revision 1, and so on. For example 2.5.33 and 0.1 are valid version numbers.
To compare version numbers, compare their revisions in left-to-right order. Revisions are compared using their integer value ignoring any leading zeros. This means that revisions 1 and 001 are considered equal. If a version number does not specify a revision at an index, then treat the revision as 0. For example, version 1.0 is less than version 1.1 because their revision 0s are the same, but their revision 1s are 0 and 1 respectively, and 0 < 1.
Return the following:
If version1 < version2, return -1.
If version1 > version2, return 1.
Otherwise, return 0.

This a medium level question from leetcode.
Domain
Competitive Programming
Type of Contribution
Addition
Code of Conduct

[X] I follow Contributing Guidelines & Code of conduct of LearnCPP.

/assign


Preparation for v1.0.0 release

[x] Interface fix with some new utility methods (cf. https://github.com/treasure-data/treasure-boxes/pull/221#discussion_r337879343)
[x] Finalize documentation
[x] Update config.py and version.py
[x] Add change log
[ ] Fix td_pyspark version per latest Plazma API release

We will be releasing pytd v1.0.0 since Plazma Public API becomes GA.
@chezou Review plz 🙇
@Lewuathe Can you check if the current td_pyspark required version makes sense as a dependent package? If you're planning to release newer td_pyspark due to the Plazma API release, please let us now 🙏 https://github.com/treasure-data/pytd/blob/master/setup.py#L71


C++: Avoid partial chi flow to struct/class

Flow through partial chi-instruction operands was introduced to make definition-by-reference work, but its implementation also allowed all other partial writes to propagate. In particular, tainting a field would taint the whole struct, which in turn led to taint propagating across unrelated fields of a struct.
The security test CWE-134/semmle/argv/argvLocal.c shows that we also want to propagate taint from an array element to the whole array, and it also seems right to propagate taint from a union member to the whole union.

Started https://jenkins.internal.semmle.com/job/Changes/job/CPP-Differences/1021/
I'm hoping this will remove the FPs we have on git/git in (at least) cpp/path-injection and cpp/uncontrolled-allocation-size.

See also https://github.slack.com/archives/CP0LHP150/p1586261195239600.

The WriteSideEffectInstction case in this PR can be removed if we merge #3220.

These are the result differences:
=== Changes per project (+new -fixed) ===

g/git/git                                                                   +0 -24
g/wireshark/wireshark                                                       +0 -10

=== Changes per query (+new -fixed) ===

cpp/path-injection                                                          +0 -13
cpp/tainted-format-string                                                   +0 -2
cpp/uncontrolled-allocation-size                                            +0 -19

I've looked through the path explanations for all three queries on both projects, and I'll claim that all the lost results are FPs due to field conflation, while all the remaining results are TPs (in the sense that the query is working as it's designed to work).


Create variable code action generates a variable with type ...

This is example is from the BBE:
https://ballerina.io/learn/by-example/jdbc-query-operation.html
stream<record { }, error> resultStream = jdbcClient->query("Select * from Customers", Customer);

// Cast the generic record type to the Customer stream type.
stream<Customer, sql:Error> customerStream = <stream<Customer, sql:Error>>resultStream;

 ... next = check customerStream.next();

@sameerajayasoma what's the version you are using for this? When I checked in slalpha5 this suggest several create variable code actions and all of them worked without producing this output. Hence I'm closing the issue.


wrong errors reported on Grunt-reporter

config:
        options: {
          ignore: [
            'Element "head" is missing a required instance of child element "title".',
            'Attribute "ng-app" not allowed on element "body" at this point.',
            'Element “title” must not be empty.',
            /ng-/i,
            /qms-/i,
            /bs-/i,
            /ui-/i,
            /DOCTYPE html/i,
            /data:image\/x-icon;,/i,
            /not allowed on element .+ at this point\./i,
            /not allowed as child of element/i,
            /Bad value “{{[^}]+}}”/
          ],
          errorlevels: ['error'],
          //reporter: 'checkstyle',
          //reporterOutput: 'htmllint-results.xml',
        }

errors reported on Grunt-reporter (shows ignored errors, notice the "ng-app"):
app\404.html [L1:C11] Comments seen before doctype. Internet Explorer will go into the quirks mode.
app\debug.html [L1:C11] Comments seen before doctype. Internet Explorer will go into the quirks mode.
app\debug.html [L21:C35] Attribute "ng-app" not allowed on element "body" at this point.

errors in checkstyle file (as expected):
	<file name="....tpl.html">
		<error line="52" column="44" severity="error" message="Self-closing syntax (“/>”) used on a non-void HTML element. Ignoring the slash and treating as a start tag." source="htmllint.ValidationError" />
		<error line="53" column="23" severity="error" message="End tag “button” seen, but there were open elements." source="htmllint.ValidationError" />
		<error line="52" column="44" severity="error" message="Unclosed element “span”." source="htmllint.ValidationError" />
	</file>

(testet on https://github.com/jzaefferer/grunt-html/commit/291cf04de2cdc12727bd50509ea6ce6a9885a6d1)

Reopened console, 'grunt htmllint', and it's gone.


The app should open with preview pane open by default

I know it is written in the welcome post, but if the preview pane is open by default the first impression would be better.

This is a good suggestion and would bring the experience a step closer to WYSIWYG. The current behaviour of the preview pane is very bad in that it will visibly refresh every time you make a change in the editor. If someone sent in a PR fixing this issue and making the preview pane open by default I'd be happy to review it.


[Issue]: rocAL - Package core runtime dependencies

Problem Description
rocAL core dependencies are listed below for runtime. I do not see rapidJSON. @SundarRajan28 can you check this?
readelf -d /opt/rocm/lib/librocal.so | grep NEEDED
 0x0000000000000001 (NEEDED)             Shared library: [libopenvx.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libvx_rpp.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libturbojpeg.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libprotobuf.so.23]
 0x0000000000000001 (NEEDED)             Shared library: [liblmdb.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libavcodec.so.58]
 0x0000000000000001 (NEEDED)             Shared library: [libavformat.so.58]
 0x0000000000000001 (NEEDED)             Shared library: [libavutil.so.56]
 0x0000000000000001 (NEEDED)             Shared library: [libswscale.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libgomp.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libopencv_imgcodecs.so.4.5d]
 0x0000000000000001 (NEEDED)             Shared library: [libopencv_imgproc.so.4.5d]
 0x0000000000000001 (NEEDED)             Shared library: [libopencv_core.so.4.5d]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [ld-linux-x86-64.so.2]

Operating System
Ubuntu
CPU
ALL
GPU
ALL
ROCm Version
ROCm 6.2.3
ROCm Component
No response
Steps to Reproduce
No response
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
No response
Additional Information
No response

@LakshmiKumar23 - rapidJSON not a runtime requirement for rocal - please remove readme for package install deps

@kiritigowda cannot use package for rapidJSON. There are build errors
In file included from /root/dockerx/work/rocAL/rocAL/source/meta_data/coco_meta_data_reader.cpp:30:
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h: In constructor 'LookaheadParserHandler::LookaheadParserHandler(char*)':
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h:162:8: error: 'rapidjson::Reader' {aka 'class rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<> >'} has no member named 'IterativeParseInit'; did you mean 'IterativeParse'?
  162 |     r_.IterativeParseInit();
      |        ^~~~~~~~~~~~~~~~~~
      |        IterativeParse
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h: In member function 'void LookaheadParserHandler::ParseNext()':
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h:172:8: error: 'rapidjson::Reader' {aka 'class rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<> >'} has no member named 'IterativeParseNext'; did you mean 'IterativeParse'?
  172 |     r_.IterativeParseNext<parseFlags>(ss_, *this);
      |        ^~~~~~~~~~~~~~~~~~
      |        IterativeParse
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h:172:39: warning: left operand of comma operator has no effect [-Wunused-value]
  172 |     r_.IterativeParseNext<parseFlags>(ss_, *this);
      |                                       ^~~
In file included from /root/dockerx/work/rocAL/rocAL/source/readers/image/coco_meta_data_reader_key_points.cpp:30:
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h: In constructor 'LookaheadParserHandler::LookaheadParserHandler(char*)':
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h:162:8: error: 'rapidjson::Reader' {aka 'class rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<> >'} has no member named 'IterativeParseInit'; did you mean 'IterativeParse'?
  162 |     r_.IterativeParseInit();
      |        ^~~~~~~~~~~~~~~~~~
      |        IterativeParse
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h: In member function 'void LookaheadParserHandler::ParseNext()':
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h:172:8: error: 'rapidjson::Reader' {aka 'class rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<> >'} has no member named 'IterativeParseNext'; did you mean 'IterativeParse'?
  172 |     r_.IterativeParseNext<parseFlags>(ss_, *this);
      |        ^~~~~~~~~~~~~~~~~~
      |        IterativeParse
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h:172:39: warning: left operand of comma operator has no effect [-Wunused-value]
  172 |     r_.IterativeParseNext<parseFlags>(ss_, *this);
      |                                       ^~~
make[2]: *** [rocAL/CMakeFiles/rocal.dir/build.make:1798: rocAL/CMakeFiles/rocal.dir/source/readers/image/coco_meta_data_reader_key_points.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [rocAL/CMakeFiles/rocal.dir/build.make:1317: rocAL/CMakeFiles/rocal.dir/source/meta_data/coco_meta_data_reader.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:942: rocAL/CMakeFiles/rocal.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

Runtime Dependency map

MIVisionX - package mivisionx-dev/mivisionx-devel

 0x0000000000000001 (NEEDED)             Shared library: [libopenvx.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libvx_rpp.so.1]

Turbo JPEG - manual

 0x0000000000000001 (NEEDED)             Shared library: [libturbojpeg.so.0]

Google Protobuf - package libprotobuf-dev/protobuf-devel

 0x0000000000000001 (NEEDED)             Shared library: [libprotobuf.so.23]

LMBD - package liblmdb-dev/lmdb-devel

 0x0000000000000001 (NEEDED)             Shared library: [liblmdb.so.0]

OpenCV - package libopencv-dev / RPM -- manual

 0x0000000000000001 (NEEDED)             Shared library: [libopencv_imgcodecs.so.4.5d]
 0x0000000000000001 (NEEDED)             Shared library: [libopencv_imgproc.so.4.5d]
 0x0000000000000001 (NEEDED)             Shared library: [libopencv_core.so.4.5d]

FFMPEG - package / manual

libavcodec-dev / manual

 0x0000000000000001 (NEEDED)             Shared library: [libavcodec.so.58]

libavformat-dev / manual

 0x0000000000000001 (NEEDED)             Shared library: [libavformat.so.58]

libavutil-dev / manual

 0x0000000000000001 (NEEDED)             Shared library: [libavutil.so.56]

libswscale-dev / manual

 0x0000000000000001 (NEEDED)             Shared library: [libswscale.so.5]

OpenMP - package libgomp1 /

 0x0000000000000001 (NEEDED)             Shared library: [libgomp.so.1]

Compiler Deps

 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]

Program interpreter for dynamically-linked ELF programs

 0x0000000000000001 (NEEDED)             Shared library: [ld-linux-x86-64.so.2]

OpenCV - min option - libopencv-core-dev libopencv-imgcodecs-dev libopencv-imgproc-dev

Part fix with #227

@kiritigowda cannot use package for rapidJSON. There are build errors
In file included from /root/dockerx/work/rocAL/rocAL/source/meta_data/coco_meta_data_reader.cpp:30:
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h: In constructor 'LookaheadParserHandler::LookaheadParserHandler(char*)':
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h:162:8: error: 'rapidjson::Reader' {aka 'class rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<> >'} has no member named 'IterativeParseInit'; did you mean 'IterativeParse'?
  162 |     r_.IterativeParseInit();
      |        ^~~~~~~~~~~~~~~~~~
      |        IterativeParse
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h: In member function 'void LookaheadParserHandler::ParseNext()':
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h:172:8: error: 'rapidjson::Reader' {aka 'class rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<> >'} has no member named 'IterativeParseNext'; did you mean 'IterativeParse'?
  172 |     r_.IterativeParseNext<parseFlags>(ss_, *this);
      |        ^~~~~~~~~~~~~~~~~~
      |        IterativeParse
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h:172:39: warning: left operand of comma operator has no effect [-Wunused-value]
  172 |     r_.IterativeParseNext<parseFlags>(ss_, *this);
      |                                       ^~~
In file included from /root/dockerx/work/rocAL/rocAL/source/readers/image/coco_meta_data_reader_key_points.cpp:30:
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h: In constructor 'LookaheadParserHandler::LookaheadParserHandler(char*)':
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h:162:8: error: 'rapidjson::Reader' {aka 'class rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<> >'} has no member named 'IterativeParseInit'; did you mean 'IterativeParse'?
  162 |     r_.IterativeParseInit();
      |        ^~~~~~~~~~~~~~~~~~
      |        IterativeParse
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h: In member function 'void LookaheadParserHandler::ParseNext()':
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h:172:8: error: 'rapidjson::Reader' {aka 'class rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<> >'} has no member named 'IterativeParseNext'; did you mean 'IterativeParse'?
  172 |     r_.IterativeParseNext<parseFlags>(ss_, *this);
      |        ^~~~~~~~~~~~~~~~~~
      |        IterativeParse
/root/dockerx/work/rocAL/rocAL/include/meta_data/lookahead_parser.h:172:39: warning: left operand of comma operator has no effect [-Wunused-value]
  172 |     r_.IterativeParseNext<parseFlags>(ss_, *this);
      |                                       ^~~
make[2]: *** [rocAL/CMakeFiles/rocal.dir/build.make:1798: rocAL/CMakeFiles/rocal.dir/source/readers/image/coco_meta_data_reader_key_points.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [rocAL/CMakeFiles/rocal.dir/build.make:1317: rocAL/CMakeFiles/rocal.dir/source/meta_data/coco_meta_data_reader.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:942: rocAL/CMakeFiles/rocal.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

@LakshmiKumar23 can you check if we can make it work with the package?


add rel="nofollow" to trending/latest on index page

this will help to ensure that new projects aren't indexed until they are added to the sitemap after 14 days, see #7765

the... the... the tests passed... travis are you there?


weaken FromCBOR for TxOut to Annotator TxOut

required for https://github.com/input-output-hk/cardano-ledger/pull/2560
babbage's TxOut will only be an instance of FromCBOR (Annotator TxOut), so this pr adds instances for FromCBOR (Annotator.. as it bubbles up from TxOut and FromCBOR constraints where necessary in code that's reused in babbage

I don't think the code in your example would typecheck. since the constraints are different the instances have to be duplicated, or we can remove the non-Annotator FromCBOR instances, but not both

i think i have a couple of ideas wrt getting code reuse here actually, I'll try them out after Christmas ⛄🎄

actually, I just realized that if Ann and ApplyAnn are generalized to Applicative, all of these instances can share the same decoding function, so i'm going to do that


:sparkles: feat(docs-beta): Sidebar polish

Description
Concise description of proposed changes
Testing
Explain the quality checks that have been done on the code changes
Additional Information

[ ] I read the contributing docs (if this is your first contribution)

Your ENS/address:

Current dependencies on/for this PR:

main

PR #118

PR #119

PR #120

PR #121

PR #122   👈

This comment was auto-generated by Graphite.


feat: add custom container support

ref: https://github.com/soal/vue-mapbox-geocoder/pull/5

Credit goes to: @tpaksu & @lucadegasperi

Thanks ;)


Stucks while building on Windows

Using v0.2.10 with vitesse, after running build script, vite is stucks at Building for production... step on Windows 10.

Can you try to run cross-env DEBUG=vite-plugin-components:* yarn dev and share me the output? It's problem been some path resolving problem.

vite-plugin-components:watcher:add src\components\Footer.vue +0ms
  vite-plugin-components:context:components Set {
  vite-plugin-components:context:components   '/src/components/Footer.vue',
  vite-plugin-components:context:components   '/src/components/Icon.vue',
  vite-plugin-components:context:components   '/src\\components\\Footer.vue'
  vite-plugin-components:context:components } +101ms
[vite-plugin-components] component "Footer"(/src\components\Footer.vue) has naming conflicts with other components, ignored.
  vite-plugin-components:watcher:add src\components\Icon.vue +11ms
  vite-plugin-components:context:components Set {
  vite-plugin-components:context:components   '/src/components/Footer.vue',
  vite-plugin-components:context:components   '/src/components/Icon.vue',
  vite-plugin-components:context:components   '/src\\components\\Footer.vue',
  vite-plugin-components:context:components   '/src\\components\\Icon.vue'
  vite-plugin-components:context:components } +11ms
[vite-plugin-components] component "Footer"(/src\components\Footer.vue) has naming conflicts with other components, ignored.
[vite-plugin-components] component "Icon"(/src\components\Icon.vue) has naming conflicts with other components, ignored.
  vite-plugin-components:transform:script src\App.vue +0ms
  vite-plugin-components:transform:template src\App.vue [ 'router-view', 'Footer' ] +0ms
  vite-plugin-components:resolver src\App.vue +0ms
  vite-plugin-components:resolver using [ 'RouterView', 'Footer' ] imported [ 'Footer' ] +8ms

[@vue/compiler-sfc] <script setup> is still an experimental proposal.
Follow https://github.com/vuejs/rfcs/pull/182 for its status.

  vite-plugin-components:transform:script src\components\Footer.vue +1s
  vite-plugin-components:transform:template src\components\Footer.vue [ 'Icon' ] +1s
  vite-plugin-components:resolver src\components\Footer.vue +1s
  vite-plugin-components:resolver using [ 'Icon' ] imported [ 'Icon' ] +3ms
  vite-plugin-components:transform:script src\components\Icon.vue +145ms

warn - You have enabled experimental features: applyComplexClasses, uniformColorPalette, extendedSpacingScale, defaultLineHeights, extendedFontSizeScale
warn - Experimental features are not covered by semver, may introduce breaking changes, and can change at any time.
  vite-plugin-components:transform:template src\components\Icon.vue [] +838ms
  vite-plugin-components:resolver src\components\Icon.vue +838ms
  vite-plugin-components:resolver using [] imported [] +0ms
  vite-plugin-components:resolver src\App.vue +8ms
  vite-plugin-components:resolver using [ 'RouterView', 'Footer' ] imported [ 'Footer' ] +1ms
  vite-plugin-components:resolver src\components\Footer.vue +40ms
  vite-plugin-components:resolver using [ 'Icon' ] imported [ 'Icon' ] +0ms
  vite-plugin-components:resolver src\components\Icon.vue +22ms
  vite-plugin-components:resolver using [] imported [] +3ms
  vite-plugin-components:transform:script src\pages\index.vue +4s
  vite-plugin-components:transform:template src\pages\index.vue [ 'Icon' ] +4s
  vite-plugin-components:resolver src\pages\index.vue +3s
  vite-plugin-components:resolver using [ 'Icon' ] imported [ 'Icon' ] +9ms
  vite-plugin-components:resolver src\pages\index.vue +12ms
  vite-plugin-components:resolver using [ 'Icon' ] imported [ 'Icon' ] +0ms

If it helps: here it is debug output of yarn build
yarn run v1.22.4
$ cross-env NODE_ENV=production vite build
vite v1.0.0-rc.4
  vite-plugin-components:glob searching start with: [src/components/**/*.vue] +0ms
Building for production...
  vite-plugin-components:glob 2 components found. +17ms
  vite-plugin-components:context:components Set { '/src/components/Footer.vue', '/src/components/Icon.vue' } +0ms

[@vue/compiler-sfc] <script setup> is still an experimental proposal.
Follow https://github.com/vuejs/rfcs/pull/182 for its status.

  vite-plugin-components:transform:script src\pages\index.vue +0ms
  vite-plugin-components:resolver srcpagesindex.vue +0ms
  vite-plugin-components:transform:template src\pages\index.vue [ 'Icon' ] +0ms
  vite-plugin-components:transform:script src\pages\[...all].vue +30ms
  vite-plugin-components:resolver srcpages[...all].vue +28ms
  vite-plugin-components:transform:template src\pages\[...all].vue [] +7ms
  vite-plugin-components:transform:script src\pages\hi\[name].vue +11ms
  vite-plugin-components:resolver srcpageshi[name].vue +11ms
  vite-plugin-components:transform:template src\pages\hi\[name].vue [ 'Icon' ] +14ms
  vite-plugin-components:transform:script src\App.vue +349ms
  vite-plugin-components:resolver srcApp.vue +349ms
  vite-plugin-components:transform:template src\App.vue [ 'router-view', 'Footer' ] +345ms

warn - You have enabled experimental features: applyComplexClasses, uniformColorPalette, extendedSpacingScale, defaultLineHeights, extendedFontSizeScale
warn - Experimental features are not covered by semver, may introduce breaking changes, and can change at any time.

So is the dev fine but stuck on build?

So is the dev works fine but stuck on build?

Yes.

I don't have a Windows with me for now. If it's possible, can you clone the repo can try with pnpm dev + cd test/fixture && pnpm dev in sperate consoles. And try to tweak this function to see how to fix it?
https://github.com/antfu/vite-plugin-components/blob/9e1da21424d110288c163cbe76576d0fa3c3f90d/src/context.ts#L93-L95
Or I can do that myself later if your can't. Thanks :)

Think about trying something like xx.replace(\\\\g, '/') but not sure if it gonna work

https://github.com/antfu/vite-plugin-components/blob/9e1da21424d110288c163cbe76576d0fa3c3f90d/src/context.ts#L101-L103
Replacing these lines with this fixes issue:
 relative(path: string) {
    return relative(this.root, path).replace(/\\/g, '/')
  }

Great! Would you like to file a quick PR? Thanks!


Using large structs put everything on the stack will cause stack overflow

Relatively new to rust but a basic test case like this:
    #[test]
    fn test3() {
        let x = C.typ.text_white;
        let y = C.typ.text_black;
        assert_eq!(C![x, y], "text-white text-black");
    }

Causes a stack overflow on Linux. What appears to be the problem is that the entire struct exists twice. So over a really large project far too much data would be placed on the stack.
I have managed to get around the problem by generating modules instead, so my output would be:
pub(crate) mod M {
    pub(crate) const active: &'static str = "active";
    ......

Meaning the test case now goes to:
    #[test]
    fn test3() {
        let x = C::typ.text::white;
        let y = C::typ.text::black;
        assert_eq!(C![x, y], "text-white text-black");
    }

This means only the used items are placed on the stack and not an entire copy of the structure. Let me know if you would like a copy of the generation code.

Yes, I'd love to see the generation code. This seems like a good fix, and I suspect it'd also help with the LSP issues that come from the giant structs.

I replaced the modifiers template to be:
const MODIFIERS_TEMPLATE: &str = r#"
{visibility} mod M \{
{{ for field in fields }}   {visibility} const {field.0}: &'static str = "{field.1}";
{{ endfor }}
}
"#;

For the classes it was easier to write a new method so I did this:
const C_OPEN_TEMPLATE: &str = r#"
{visibility} mod C \{
"#;

const C_CLOSE_TEMPLATE: &str = r#"}"#;

const ONE_TEMPLATE: &str = r#"
{visibility} mod {name} \{
{{ for field in fields }}    {visibility} const {field.0}: &'static str = "{field.1}";
{{ endfor }}
}
"#;

fn classes_to_code(structs: &HashMap<&str, HashMap<String, String>>,
    visibility: &'static str) -> String {
    let mut tt = TinyTemplate::new();
    tt.add_template("start", C_OPEN_TEMPLATE).expect("Could not parse start template");
    tt.add_template("structs", ONE_TEMPLATE).expect("Could not parse struct template");
    let mut groups: Vec<(&str, String, String)> = vec![];
    let g_context = GroupsContext { visibility, groups };
    let mut code = String::new();
    code.push_str(&tt.render("start", &g_context).expect("Could not render"));
    for group in structs.keys().sorted() {
        let members = structs.get(group).unwrap();
        let context = StructsContext {
            visibility,
            name: group_abbreviation(group).to_string(),
            const_name: group.to_uppercase(),
            fields: structs
                .get(group)
                .unwrap()
                .keys()
                .sorted()
                .map(|f| (maybe_escape_field(f), members.get(f).unwrap().as_str()))
                .collect(),
        };
        code.push_str(
            &tt.render("structs", &context)
                .expect("Could not render structs template"),
        );
    }
    tt.add_template("end", C_CLOSE_TEMPLATE).expect("Could not parse start template");
    code.push_str(&tt.render("end", &g_context).expect("Could not render"));
    code

}

I replaced the classes_code call to be classes_to_code, around line 66.
I would create a PR but it was a complete hack in a sandbox. Hopefully that helps.

Thanks, this is helpful! Could you also share what the generated code looks like?

#![allow(dead_code)]
#![allow(unused_variables)]
#![allow(non_upper_case_globals)]
#![allow(non_snake_case)]
/* generated by tailwindcss-to-rust 0.1.0 */

pub(crate) mod M {
    pub(crate) const active: &'static str = "active";
    pub(crate) const after: &'static str = "after";
    pub(crate) const autofill: &'static str = "autofill";
    pub(crate) const before: &'static str = "before";
........
    pub(crate) const visited: &'static str = "visited";
    pub(crate) const xl: &'static str = "xl";
}

pub(crate) mod C {

    pub(crate) mod acc {
        pub(crate) const not_sr_only: &'static str = "not-sr-only";
        pub(crate) const sr_only: &'static str = "sr-only";
    }

    pub(crate) mod anim {
        pub(crate) const animate_bounce: &'static str = "animate-bounce";
        pub(crate) const animate_none: &'static str = "animate-none";
        pub(crate) const animate_ping: &'static str = "animate-ping";
        pub(crate) const animate_pulse: &'static str = "animate-pulse";
.....
        pub(crate) const whitespace_pre_line: &'static str = "whitespace-pre-line";
        pub(crate) const whitespace_pre_wrap: &'static str = "whitespace-pre-wrap";
    }

    pub(crate) mod unk {
        pub(crate) const max_h_none: &'static str = "max-h-none";
    }
}

I have cut out the large bits of code in the middle but hopefully this gives you an idea of the output. I manually added the allow statements, but they could have been part of the generation.

Thanks, this is really helpful!

This is fixed using mods, per your suggestion, in the v0.3.0 release. A new binary will be on the releases page in a little bit.
Thanks again!


[Talk] Should useMMKVStorage default value be automatically stored?

I really like the library so far, especially the useMMKVStorage hook as you might have noticed :). It's been a great addition to my app. I was wondering about a possible feature I need, and if I should implement it myself or if it could be an feature in the library.
So let's say I have a custom useStorage hook:
const useStorage = (key, defaultValue) => {
    const mmkv = useRef(MMKVService.getInstance()).current;
    const [value, setValue] = useMMKVStorage(key, mmkv, defaultValue);

    return [value, setValue];
};

This works fine, but for a feature I need to access the defaultValue even when there have been no changes made using the hook (it just doesn't know if there was a value set before). So when I use mmkv.getItem('key') somewhere outside of the component and the value has never changed, it finds null as result. This only happens the first time for a value, because when setValue has been called it will store as expected.
I can easily solve this by adding a check in my custom hook, something like this:
(this is a simplified version ofcourse. Would need to check the value type of defautlValue to call right mmkv.set())
const useStorage = (key, defaultValue) => {
    const mmkv = useRef(MMKVService.getInstance()).current;
    const [value, setValue] = useMMKVStorage(key, mmkv, defaultValue);

    // also check in storage to prevent `null` value
    const storedValue = useRef(mmkv.getItem('key'));
    if (storedValue === null) {
        mmkv.setItem('key', defaultValue);
    }

    return [value, setValue];
};

This results in the value being set, even when the  setValue was never called. This way I can get defaultValue outside the component.
Do you think the useMMKVStorage() hook should automatically set it's value to the storage when initialized, or is it too specific for my use case?

I like the idea. Initially i also had thought about this the same way as you are thinking. The only issue is that what happens when the value gets deleted. So lets say you delete the default value from storage with removeItem. The hook will add the value back again into storage. This would be nice for some people but some people would be frustrated that even after removing the value. It is not removed? What do you 🤔 think?

Ah, didn't think of that. I've been thinking about this for a bit and maybe one of these are a solution?

Add another hook; usePersistedMMKVStorage(). This hook would re-initialize the defaultValue every time it's null. The value can still be set to null using setValue or be deleted via removeItem but it would reset to the default value when the hook is ran again.

Add another parameter to existing useMMKVStorage hook, either:
useMMKVStorage(key: string, mmkv: mmkvStorage.api, defaultvalue: any, persistStorage?: boolean). Setting this value to true would make the hook always re-initialize the value when it's null (only when called again, so it can still be deleted outside of the component). Making the parameter optional makes sure there are no breaking changes with backwards compatibility. Leaving the value undefined just makes the hook act normal.

Or add an optional options parameter, so that it can be expanded in the future if more options would be needed. E.g:
useMMKVStorage(
   key,
   mmkv,
   defaultValue,
   {
      persistStorage: true,
      // some other fields that might be added in the future, so it stays backwards compatible
   }
)

I will think about this. Any app would follow one pattern, either all defaultValues are persisted or none are. So maybe defining it globally makes sense somewhat and keeps everything neat and clean.
new MMKVStorage.Loader().withPersistedDefaultValues().initialize()

That’s also a good idea. Makes more sense if it was defined globally indeed. I’ll just build a custom hook for now, but if you decide to implement a feature please ping me so I can use it in the future :)

This is wip. Will come in v0.7.0


Sponsorship

Hi,
My name is Damien Mather, I am a software dev (now turned website owner) from Melbourne (Aus). I run a website called SecurityGladiators.com. It is a blog about internet security, online privacy, streaming etc.
I think your project is great, and I am planning a write-up of your project on my site, our users will really find it usefull.
I am interested in donating to the project on a monthly/yearly basis.
What sort of sponsorship/donor packages do you offer?
Regards
Damien.

:)

@highOnBytes he's right. That is currently the option we have for individual sponsors.

Hi @bep
I see you're from Norway, my wife is Danish (we only just moved back to Australia from Copenhagen in 2019) and we have lots of family up there in Oslo and Alesund. We go there often, a great place just very expensive beer!
If I become a sponsor, can I also get listed on the home page (https://gohugo.io/)  like Brave, Linode and eSOLIA?
I won't need any time for help each month for projects.
Regards
Damien


Update docs for experimental features

- What I did

Added some info about starting dockerd with --experimental
Updated the usage listing for dockerd
Added new experimental features to experimental/README file

Fixes #31009

experimental/docker-stacks-and-bundles.md seems outdated. DAB is still experimental but stack is not

Updated to fix the copy-paste error!

ping @mstanleyjones
There are some changes requested.

Rebased and updated based on the feedback. Not sure what to do about a "past experimental list".

I think we can merge this PR without the history. WDYT @vieux ?

Addressed all the outstanding comments (I think)...


Two slides have same order

This is a (multiple allowed):

[x] bug

Swiper Version: 5.0.2

Platform/Target and Browser Versions: macOS

Live Link or JSFiddle/Codepen or website with isssue: N/A

What you did
17 slides, 2 rows, 5 columns => 2 groups
slidesPerColumnFill = row
Expected Behavior
Nice slider
Actual Behavior
Two slides have order 9. The second one with order 9 is misplaced and have wrong margins. I think that the slider think that it should be in group 2 (since it is index 9 and we have 5 columns. But we only have 17 slides in total meaning that slide with index 9 is in group 1 and row 2).

What are exact swiper parameters?


Interacting with alert windows

Hello! Is there a way to interact with the browser's alert windows and click either OK or Cancel button on it? The only way that I can do this is to use native protractor command like this:
protractor.browser.switchTo().alert().accept();

Thanks!

Hi @marktigno - have you seen #65?

Yeah I saw you comments there, but I have a way to work out this using TypeScript version 2.3.4. Here's the working code I did:
export class DeleteAddress implements Task {
     static click(addressName) {
         return new DeleteAddress(addressName);
    }

    @step('{0} deletes the selected address named #addressName')
    performAs(actor: PerformsTasks): PromiseLike<void> {
        var ptor = protractor.browser;
        return actor.attemptsTo(
            Click.on(ProfilePageComponent.Delete_address_button(this.addressName))
         ),
        ptor.switchTo().alert().accept();
    }

    constructor(private addressName: string) {}
}

But this code won't work anymore on the latest version of TypeScript (v2.4.1).

Not yet, we'll need to create a new interaction for that and extend the BrowseTheWeb interface.
I guess we could have a method on BrowseTheWeb:
class BrowseTheWeb implements Ability {

  alert(): <not sure about the return type?> {
    return this.browser.switchTo().alert();
  }
}

And some interactions, like:
const AcceptAlert = () => Interaction.where(`#actor accepts the alert`,
  actor => BrowseTheWeb.as(actor).alert().accept()
)

That would be awesome if this is implemented because the are still websites that still uses alert windows. ^_^

hey @marktigno I've got a PR here 019058f in #65...awaiting some tweaks from the master 😄

Hello @nbarrett! This is pretty good, it got everything what I need for (and everyone else I think). This should be merged right @jan-molak? ^_^V

Hi @marktigno - just to let you know that I've now completed the PR and have passing tests in
002b86d. Just waiting for the merge from the serenity master now!

Awesome, I'll check on this once this has been released in the wild. Thanks! ^_^V

The feature has been merged in and published. Thanks, @nbarrett!

@jan-molak do you plan to support alert interactons also in serenity-js 2.0?

Hi @habmukandu - I'm working on a migration guide at the moment which will also include a couple of PRs to cover yet-to-migrate to 2.0 tasks - one of which will be alerts, so stay tuned!


gives error after it connects occulus

i have no idea what this is and cant find anything about it anywhere

A quick Google search tells me it may be caused by antivirus.

The property that's being read here is not strictly needed for QuestPatcher to function, so it would make sense that in the case that reading it fails, we'd disable the functionality that needs it (which in this case relates to the detection of ADB daemons).
Changing this issue accordingly.


Add TypeDef support, minor tweaks to XML output (to match XSD)

Primary change is adding of TypeDef support
Minor tweaks:

added the zcl.xsd schema to the output files so that XML editors (e.g. IDEs) are able to check correctness of XML files
made some minor fixes to output XML (use name attribute in domain as it's specified in XSD)

@hasty to review, @bzbarsky-apple asked me to reach out regarding adding this support @ https://github.com/project-chip/connectedhomeip/pull/35773


First DH keypair generation takes too long

Tested with bcprov-jdk15on versions 1.54 and 1.55b12 on MacOSx 10.10.5.
Here the code:
Security.addProvider(new BouncyCastleProvider());
KeyPairGenerator kpGen = KeyPairGenerator.getInstance("DH", "BC");
kpGen.initialize(1024, new SecureRandom());
for (int i = 0; i < 5; i++) {
long start = System.currentTimeMillis();
kpGen.generateKeyPair();
long end = System.currentTimeMillis();
System.out.println("round " + (i + 1) + ": " + (end - start) + " ms");
}
and the ouput
round 1: 56200 ms
round 2: 3 ms
round 3: 3 ms
round 4: 3 ms
round 5: 2 ms

What's happening is that the first time you ask to generate a key pair, the provider doesn't have any DH parameters for the key size you requested, and generates a new set (which is particularly slow as we search for a Sophie Germain prime). Subsequent requests at the same key size will re-use those parameters.
To avoid that, the provider supports configuring specific DH parameters to be used either VM-wide or for the current thread. See the testConfig() method of DHTest for example usage. Either generate your own set of parameters (once only, not per-process), or we have various standardised groups defined in DHStandardGroups.
I would recommend using at least 2048 bits, unless you have specific reasons to use smaller and understand the implications of Logjam.


[BP-1.10][FLINK-14316] Properly manage rpcConnection in JobManagerLeaderListener under leader change

This PR is a backport of #11603, #11552 and #11313 onto release-1.10.

Merging this PR since the original PR has been approved.

Merge manually


Getting error in alacritty

I followed the installation steps and installed tetris but i am getting
setupTerm: Couldn't look up terminfo entry "alacritty"

error.

What's your OS and what installation method did you use?

Interesting.. it looks like snap doesn't have access to the directory /usr/share/terminfo. You can probably launch by manually setting TERM, e.g. TERM=xterm tetris. Or copy those files to a place where the snap can find them:
mkdir -p ~/snap/tetris-thefenriswolf/current/.terminfo/a
cp /lib/terminfo/a/alacritty ~/snap/tetris-thefenriswolf/current/.terminfo/a/

Interesting.. it looks like snap doesn't have access to the directory /usr/share/terminfo. You can probably launch by manually setting TERM, e.g. TERM=xterm tetris. Or copy those files to a place where the snap can find them:
mkdir -p ~/snap/tetris-thefenriswolf/current/.terminfo/a
cp /lib/terminfo/a/alacritty ~/snap/tetris-thefenriswolf/current/.terminfo/a/

I couldn't find /lib/terminfo/a/alacritty

What about /use/share/terminfo?

cp /lib/terminfo/a/alacritty ~/snap/tetris-thefenriswolf/current/.terminfo/a/

I changed /lib/terminfo/ to /usr/share/terminfo but i am getting the same error even if i copied the file


Exclude page groups from urls

What is the context of this PR?
The recent addition of page groups in sub navigation introduced group slugs into URLs due to the new directory structure which caused breakage to some links. There were two approaches to resolving this issue:

Adjusting all the links.
Removing group slugs from generated URLs.

The preference was to remove group slugs from generated URLs.
How to review

Test with yarn start locally.
Test with yarn build && npx serve build locally.

@boxadesign would you please verify that you are happy with the search functionality since this fix introduced a refactor affecting that implementation.