[dv] Create FPV connectivity test for lc_escalation tests in top-level

As discussed in an email thread, once the cpu is escalated then it is not able to run software. FPV connectivity test is a better way to verify this.
cc: @sriyerg @msfschaffner @davebwil @timothytrippel

Indeed, this is probably the right way for most IPs since we verify all of these actions at the block level.
However, for the CPU itself, do we need a test that makes sure that indeed it does not run anymore once LC_ESCALATE_EN has been asserted?
I am not sure that path is tested at the block level, since this functionality is part of the rv_core_ibex wrapper, which I believe is not part of the Ibex block-level DV environment.

yeah that's something we should check.
I don't think it could be fully self contained, but it would be good to probe the fetch signals and possibly the PC is no longer advancing.

However, for the CPU itself, do we need a test that makes sure that indeed it does not run anymore once LC_ESCALATE_EN has been asserted?

yeah, we don't have a block-level testbench to test this ibex glue logic in top_eargley, so we need to have a top-level SW test to verify it

Thanks @cindychip for adding the connectivity tests in https://github.com/lowRISC/opentitan/pull/11261
There are 2 remaining items

add a ibex with lc_esc test in top-level
clean up other lc_esc tests in top-level testplan and add a connectivity testplan

Indeed, this is probably the right way for most IPs since we verify all of these actions at the block level.
However, for the CPU itself, do we need a test that makes sure that indeed it does not run anymore once LC_ESCALATE_EN has been asserted?
I am not sure that path is tested at the block level, since this functionality is part of the rv_core_ibex wrapper, which I believe is not part of the Ibex block-level DV environment.

This is a simple assertion check to prove when lc_escalate_en asserts, the PC does not advance.

Connectivity tests for lc_escalate_en have been added in #11261 and an assertion checking that the PC does not advance when the CPU is disabled is added here: https://github.com/lowRISC/opentitan/pull/15101 (note that it is sufficient to check this, since the block level DV checks that the cpu_en signal is not asserted when in escalation mode).

Connectivity tests for lc_escalate_en have been added in #11261 and an assertion checking that the PC does not advance when the CPU is disabled is added here: #15101. Note that it is sufficient to check this, since the block level DV checks that the cpu_en signal is not asserted when in escalation mode.

SGTM. Thanks @msfschaffner. Closing this issue


LTC4150 destructor should dettach gpio interrupt

@evanugarte Assigning this to you!

An alternative to this would be to utilize the HardwareCounter peripheral which will handle detaching the  gpio itself.

I wanted to abstract the HardwareCounter in LTC4150 like so:
  explicit constexpr Ltc4150(Gpio & int_pin,
                             Gpio & pol,
                             units::impedance::ohm_t resistance)
      : int_pin_(int_pin),
        pol_pin_(pol),
        resistance_(resistance),
        counter_(int_pin_, Gpio::Edge::kEdgeFalling), // instantiate hardwarecounter within the constructor
        pulses_(0),
        polarity_(Polarity::kDischarging)
  {
  }

this is proving to be difficult as I cannot find mock a constructor using FakeIt. Should I just instantiate the Hardware counter outside and make the constructor like below?
explicit constexpr Ltc4150(HardwareCounter & int_pin,
                                          Gpio & pol,
                                          units::impedance::ohm_t resistance)

That can work, but I need to add the ability to count up and down. This is something that I've been working on, just haven't pushed it yet. I'll try and get it in.


Update release guide with feedback from 2.12.0 release

Update the release guide to require the blog post.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

Rebased past website version update, no change to diff. Merging as is.


Add favicon

Presumably the opendp logo? Get the file from the opendp docs source.

Here is an example from shiny, and I can see that it works in their demo, but after copying everything over verbatim, it doesn't work for me: still getting 404s.
Possible I have a typo? Or there is some difference in the configuration of the app that makes the difference? I've pushed my branch, but haven't made a PR.
https://github.com/opendp/dp-creator-ii/pull/new/39-favicon


Feature : How can I add obstacles !

Your lib working good and perfect, but I can't add 0 or None as obstacles
Can you quick do it ?
when no path found it should return False or []

Please see the code for the maze-solving example. You can set open spaces
to 1 and obstacles to inf.
On Thu, Sep 2, 2021 at 06:16 Tejas Tank @.***> wrote:

Your lib working good and perfect, but I can't add 0 or None as obstacles
Can you quick do it ?
when no path found it should return False or []
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/hjweide/pyastar2d/issues/25, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABSN6EAICLLS4C7WCFL6AI3T75FJRANCNFSM5DIXQQIQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Closing, please re-open if you're still stuck.


[PIO-97] Fixes examples of the official templates for v0.11.0-incubating

The goal of this PR is to clean up the following examples under examples:

scala-parallel-classification
scala-parallel-ecommercerecommendation
scala-parallel-recommendation
scala-parallel-similarproduct

Here is part and parcel of the fix.

rename package
update for v0.11.0-incubating
bump the same version as the default

As for documentation, I will handle it in another PR right after this.

We ( @takezoe helped me ) confirmed everything works. Unless we hear from you to the contrary, we will merge this next week.

LGTM. Please feel free to merge once it's reviewed by one of us (in this case, @takezoe).
Thanks @shimamoto !

@shimamoto I tested all examples and worked fine. 👍


Providing Code to Parameter

I am obviously a noob but when passing the sniffed rf code as a string (see below) I get the following error:
parser.add_argument('4543795', metavar='CODE', type=int,
help="Decimal code to send")
Error: 'the following arguments are required CODE"
What am I doing incorrectly?

I ended up bypassing the parser and it worked.


Akismet cutover

HC is still relying on the MLA's Akismet account; we need our own and we need to switch HC over to it by the end of January.

You can see overall API usage stats in the Akismet dashboard (https://docs.akismet.com/features/stats/), though it seems to require a wordpress.com login to do so. Presumably MLA has a wordpress.com account associated with their API key.
You can see usage for a particular site from within the WordPress dashboard at Settings | Akismet Anti Spam | Detailed Stats, but I don't believe you can see stats on a per-account basis there.

Akismet API key stored in .env as WPCOM_API_KEY


Idea

Have the keys work independently from one-another.
Example: Press A every 2 seconds, while pressing B every 10 seconds.
The current setup is having A being pressed every 12 seconds because the keys are reading together.

I designed it to use sequencing actions (Like how a macro works). Having each key act seperately would require it to have a seperate thread for each action which is really inefficient. However, I could add an option to the action editing window to seperate a specific action and create a seperate thread for it.

I have added this feature. I didn't do much testing so lmk if you find any issues.


Autograde Incorrect

Hello,
I'm working on an assignment for my class and yet autograde is indicating that I'm missing elements of the code that are clearly in place. I've checked and rechecked and have attempted to delete and rewrite the code, but it's still coming up incorrect. I've attached a screenshot showing my correct code next to the autograde's marks. Any help would be appreciated!

Version: 1.91.1
Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36 Edg/<IP_ADDRESS>
Embedder: codespaces

/question please use your course support channel.

We closed this issue because it is a question about using VS Code rather than an issue or feature request. Please search for help on StackOverflow, where the community has already answered thousands of similar questions. You may find their guide on asking a new question helpful if your question has not already been asked. See also our issue reporting guidelines.
Happy Coding!


Adjust sign out modal, has software wallet specific content

The current sign out window is in appropriate for two reasons:

Has copy about software wallets
Requires checkbox confirmation (which is less important when using a Ledger)

For time being, I've removed the checkmark and adjusted copy

Looks good @kyranjamie!


revC: length match LVDS pairs

This change matches the length:

traces within LVDS pairs (skew/phase) to 0.1mm
LVDS pairs among themselves (29-31mm)

I'm nowhere close to being an SI expert, so this is guaranteed to just look cool.

r? @marcan

I may try to make some adjustments, but I'll merge this as-is for now (because otherwise it blocks further changes since merging PCBs is a pain)


Add DSA category in Course section of Tamil language.

There are no courses available on DSA(Data Structures and Algorithms) in Tamil language.

Not is necessary open issues if you are be able to send the pull request (PR) :wink:.
Anyway, if you submit a PR, help us to autoclose this issue. How? Read this article about how to linking a PR to an issue


Confusing errors when trying to put \ in `` strings

let a = `a \\ b`

Expected result:
var a = "a \\ b";

Actual result (error message):
[E] Line 1, column 8:
Offset: 3, Invalid escape code:

This produces the desired result, but it seems unintuitive to me:
let a = `a \\\\ b`

This is solved in V10
@cristianoc


[Question] Helmfile tries to render values files

I recently noticed that helmfile tries to render Helm values files, while it should not.
For example, I have defined this release:
    - name: prometheus
      labels:
        tier: ci
        app: prometheus
      namespace: monitoring
      chart: stable/prometheus
      values:
        - helm_vars/prod/prometheus/values.yml
      secrets:
        - helm_vars/prod/prometheus/secrets.yaml

and it fails with err: release "prometheus" in "helmfile.yaml" failed: failed to render [/Users/amgk/src/github.com/amnk/babelfish/helm_vars/prod/prometheus/values.yml], because of template: stringTemplate:27: undefined variable "$labels"
while usual helm-wrapper invocation works fine:
helm-wrapper upgrade --install --reset-values prometheus stable/prometheus --namespace monitoring --values /Users/amgk/src/github.com/amnk/babelfish/helm_vars/staging/prometheus/values.yml --values /Users/amgk/src/github.com/amnk/babelfish/helm_vars/staging/prometheus/secrets.yaml

/Users/amgk/src/github.com/amnk/babelfish/helm_vars/prod/prometheus/values.yml indeed contains not a proper Go template, but Helm files should not contain them, right? Or I simply miss something obvious here?

This was a recent change in 0.23.0 I believe the intent is to only render values.yaml.gotmpl in the future

This should be fixed now https://github.com/roboll/helmfile/issues/249#event-1817505540

try the latest release

Closing as resolved, but please feel free to reopen if necessary!

Facing exact same error with Helmfile v0.121.1.
In this case, the error
COMBINED OUTPUT:
  Error: parse error at (prometheus-operator/templates/helmx.all.yaml:1665): undefined variable "$labels"

only shows up if I attempt to specify a patch for the prometheus-operator chart, like so:
- name: prometheus-operator
  chart: plaid/prometheus-operator
  namespace: monitoring
  jsonPatches:
  - target:
      group: monitoring.coreos.com
      version: v1
      kind: PrometheusRule
      name: prometheus-operator-kubernetes-apps
      namespace: monitoring
    patch:
    - op: replace
      path: /spec/groups/0/rules/0/for
      value: 1h

I think this is because all the manifests are merged into one file, and kustomize (?) then runs on it, thinking it's a go template.
The line where the error points is this:
        message: The configuration of the instances of the Alertmanager cluster `{{$labels.service}}` are out of sync.

@diversario Hey! Thanks for reporting. Your issue seems same as #1360. Let's discuss/track the progress towards fixing it there.


xdg-dbus-proxy, bubblewrap: update recipes and fix build with webkit

Update recipes for xdg-dbus-proxy and bubblewrap and also remove the patches already merged (checked).

Pass the run-time paths to the wpewebkit and webkitgtk recipe which is needed when cross-building since https://commits.webkit.org/264244@main

Remove also the native recipes which are not needed for anything.

Merged as b540e6fe0c82e32bd9a22d4ab5209fbc59f7e958


Added deleteOriginals to documentation

Added the deleteOriginals option to the documentation.  It is an option I was looking for, and exists in the code but wasn't clear from the documentation.

You wish is my command! :+1:

Documentation has always been my downfall - thanks


Fix image in KEDA HTTPRequestsScaler

Description
This PR fixes #1878 and a part of #1578
Before

After

The file 'wordpress-operator-color.svg' is also missing, but I couldn't find anything similar in the 'images/integration'
Notes for Reviewers
Signed commits

[x] Yes, I signed my commits.

@rohitsrma. Thanks for your contribution, let's discuss this on the website's call. Please add this as an agenda item to the meeting minutes.

@rohitsrma the markdown files are updated frequently by the workflow and so your changes will be overwritten the next time.
will you create a new svg named keda in the same location copying the content of keda-http-scaler svg into it ?
here's the wordpress operator's svg; https://layer5.io/static/45f4ecdbe48af78ccc58d8486f93e81f/wordpress-operator-color.svg


K8s fallback for missing service-manager binding

service-manager is required to fetch the service instance plans for the bound Xsuaa service instances, at the moment if the service-manager is not provided it will result in empty xsuaa service configuration as the plans can't be mapped.
Proposal for a fallback option, to take the first item from Xsuaa OAuthServiceConfiguration array in case no service-manager is provided with a warning message in logs.

Hi @liga-oz
the default should be only one xsuaa binding, in that case no service manager should be required.
In case of multiple bindings, we can do it like in the ias case and as you proposed, that we take the first and log a warning...
The downside of that approach,
a) is that developers might not recognize the warning and do not understand follow up errors... and do not understand that they have to do something.
b) our client lib behaves different in the K8s environment compared with CF environment


Problem with finding Spec files of Rails projects?

I don't know why, but fzf takes several seconds to find files in my Rails project's spec/ folder.
Everything else (models, controllers etc.) works flawlessly. As far as i can see it, this is not related to my project size, since i have the same problem with small apps or fresh Rails installations.
Is there some kind of path or file configuration i'm missing? :sweat_smile:

Please provide more information about your environment (OS, shell, relevant config) and the steps to reproduce the issue. fzf doesn't know or care what spec is, so it shouldn't behave differently.

Thanks for your quick response!
I looked further into this and found out, that if i rename spec to _spec (so it is above all other directories, based on the a-z sorting), fzf will find it faster. So it seems, like this is just an issue, because fzf will search form top to bottom through the files in my current directory.
My setup: Mac OS X (on an SSD), iTerm2 (same problem with standard Terminal) and zsh. I don't run any other "file based" services, that could interfere with fzf.

find . -path '*/\.*' -prune -o -type f -print -o -type l -print 2> /dev/null | sed s/^..//

This is the command fzf internally use when no input is fed, check if it works smoothly. Also something like fzf . | fzf.

I fiddled around with the two commands (added directory excludes and so on), but no differnece. I guess this is a problem with my machine.
I'll close the issue, thanks! :)

Maybe you have a directory that has lots of files in them, and that would explain why it takes a long time for find to find those files ?
Some kind of /log directory or anything else ? Does the problem appear if you rename spec to something like spuc ?

Having the same issue, I guess this is no bug, just a configuration issue.

You probable have $FZF_DEFAULT_COMMAND set to a command that respects .gitignore.


DataAdapter (InitSelection deprecation)  documentation

I am attempting to migrate from Select2 3.5.2 to Select2 4.0.0rc1
I have  current code which uses InitSelection to prepopulate values
But i see that this is being deprecated which makes sense, initselection focused on input val, where 4.0.0 will be migrating to the select element
The point is, I can find no documentation on how this is accomplished

I think you can check the small piece of code included in the Announcement link
http://select2.github.io/announcements-4.0.html
Personally I really hate this new way of defining custom data loader. It makes the process of defining loader extremely complex especially when you use it with other libs such as angularjs.
What with the $.fn.select2.amd.require? Now suddenly we have to learn about AMD as well.

CustomData.prototype.current can't replace initSelection, because you set value only with id prorerty and don't have text. You must manualy create options. (if you use ajax data is empty)
Easier manualy create options with attribute selected.
P.S. plz add back initSelection

@Jrizzi1
I'm not sure if you have a similar case, but do look into the source code to see how each Adapter works. For example I think select2 SelectionAdapter will scan your selected options and auto add them.

This change is really unlucky & developers unfriendly. Previous case when using iniSelection was significantly less effort-demanding implementation for developers. There is no documentation with real-world examples (there's only 1 simple example in announcement) and it's really a nightmare now to study details of implementation, quite a time loss.
Please provide at least 2-3 more examples on how to initiate dropdown lists for existing values when loading dropdown from remote sources via ajax.

Is there any way to use this DataAdapter without using AMD ?

Couldn't agree more with @yellow1912's first comment.  What's wrong with this picture:
*OLD way:
initSelection : function (element, callback) {
  var data = [];
  $(element.val()).each(function () {
    data.push({id: this, text: this});
  });
  callback(data);
}

NEW way:
$.fn.select2.amd.require(
['select2/data/array', 'select2/utils'],
function (ArrayData, Utils) {
  function CustomData ($element, options) {
    CustomData.__super__.constructor.call(this, $element, options);
  }

  Utils.Extend(CustomData, ArrayData);

  CustomData.prototype.current = function (callback) {
    var data = [];
    var currentVal = this.$element.val();

    if (!this.$element.prop('multiple')) {
      currentVal = [currentVal];
    }

    for (var v = 0; v < currentVal.length; v++) {
      data.push({
        id: currentVal[v],
        text: currentVal[v]
      });
    }

    callback(data);
  };

  $("#select").select2({
    dataAdapter: CustomData
  });
}

We go from 7 lines of code to 30 lines of code to achieve the same functionality?  The old way was much cleaner and easier to understand.  The new way introduces new concepts (amd) that seems overly complex and confusing.

I think people are missing the point here  (as I was initially).  Although 'current' is the replacement for 'initSelection', it is rarely needed at all.  From what I understand (and how I've implemented it), the typical way to initialize selections is to set the options elements to selected prior to calling select2.  This is easily done in either HTML or AJAX.
It's actually quite easy and much more logical than it used to be.  I think the documentation could make this point a bit more clear though because I was also confused at first.  You only need this CustomData stuff if you want to override the default behavior of select2, which most people don't.

@pjclas, so based on the example in the release nodes, how would/did you go about easily implementing the solution in 4.0?  Can you provide examples? Maybe it's something we all missed...

Sure, here is a simple ajax example:
http://jsfiddle.net/o45d0td6/
If you aren't using ajax, you can just add the option elements directly to the select tag in the html.

so based on the example in the release nodes, how would/did you go about easily implementing the solution in 4.0? Can you provide examples? Maybe it's something we all missed...

It sounds like @pjclas is referring to the second example in the release notes, which is roughly equivalent to the example in the jsfiddle.
And I agree, the second example is much closer to what most people need to use when migrating. If someone wants to create a pull request that either clarifies that or switches the example, that'd be great.

I believe that all API select2 v4 was very complicated.
Mainly working with ajax.
The InitSelection for me is very important. I understand that even with the tag "select" it must exist.
Imagine the situation. I have only the "id" of the object in my javascript and i need assigns it to "select" to display the information in the version 3.x enough to do that
$ ('#selectIdPessoa').val('BFDC6247-8FCD-4689-A69E-1C7625409924').trigger('change')

Then the ajax (InitSelection) was shot and the component would go to the server and search the "Text".
But in 4.X version nothing happens, even reesrevendo the code using adapters
I believe that if the API remain so complicated, there will be an exodus of developers for other plugins. We need to simplify things, and quite

The Example here https://select2.github.io/announcements-4.0.html on section "Removed the requirement of initSelection" show how to do without ajax (both examples).
We need a sample of replacement to "InitSelection" with remote data (ajax) on documentation

See http://jsfiddle.net/s8s2ho28/17/
I finally managed to solve my problem in migrating to version 4.
In my scenario all my "select2" are linked to a customBinding the knockoutjs. So I took my customBinding to solve the problem that was previously done by select2 internally on the "InitSelection"
So I'm posting here to help someone who has the same problem.
In the current solution, not yet tested it with "multiple". But soon I will test

Yeah I'm thinking about migrating from selectize.js to select2 4.0 but the new API looks extremely overengineered...

I figure I might as well reiterate that most use cases do not need a custom data adapter, including pre-selecting options using AJAX.
For those few that do, we need some actual documentation. I've been looking into Docco for generating some more direct documentation automatically, but there are plans to overhaul the documentation.

We need a sample of replacement to "InitSelection" with remote data (ajax) on documentation

The second example under that same section is designed for AJAX use cases, which was mentioned above.

Well the data adapter issue is obvious to solve and people crying for initSelection to be brought back really should just RTFM. However I'm referring to the general idea with adapters/decorators and wrapping that in this AMD thing. It really makes integration between select2 and Angular for example that much harder when you have to deal with another layer of dependency injection stuff.
Anyway, what's done is done, perhaps we'll get used to it.

Data Adapter is stressful solution, spend hours to understand it plus trials-errors. Well my monkey patch isnt good, but at least it works without bleeding to Data Adapter
 $.each $(el).find('.select2-ajax'), (i, item)->
      $(item).select2
        ajax:
          url: $(item).data('url')
          dataType: 'json'
          delay: 250
          data: (params)->
            return {q: params.term}
          processResults: (data, page)->
            return {results: data}
          cache: true
        minimumInputLength: 3
        templateResult: (data)->
          return data.name_code
        templateSelection: (data)->
          return data.name_code
      ajax_selected = $(item).parent().find('.select2-selection__rendered')
      if ajax_selected.length
        ajax_selected.text(ajax_selected.attr('title'))
        $(item).parent().find('.select2-container').css('width', 'auto')

@jackbit If you used text for your template (you should be - it's mostly required) you likely wouldn't need to fiddle with how it is automatically rendered.
Alternatively, if you don't feel like doing the re-mapping, you should fall back to data.text in your templateSelection.
templateSelection: (data) ->
  return data.label or data.text

templateSelection: function (data) {
  return data.label || data.text
}

@kevin-brown I have been using templateSelection on my snipped code above. My issue was when I want edit selection that i have already set or save, it doesn't display default value that i have made before.

In my opinion. We already use the "selec2" one day we will get used to the new API and everything will work out.
But my concern is that the use of a plugin should be as simple as possible. And definitely this is not happening in the new API, and the consequence of this is that new users do not opt for our plugin, and over time the "select2" come into disuse.
I think we should simplify much the API plugin. Mainly in integration with AJAX.
The end of InitSelection brings disastrous consequences for those who used the plug connected to a MVVM framework (knockoutjs, angularjs and etc ...). For a task that "select2" made automatically, should now be made in advance by the application code itself.
See my example: http://jsfiddle.net/s8s2ho28/17/
In Version 3.x I used the InitSelection and voila, problem solved by integrating with knockoutjs I just attributing the value of the element and the "select2" resolved to me how to display it properly (searching via ajax text)
In 4.X version now after a long time to understand where it should be done to change (trying with or without DataAdapters) I managed to get a solution. But now my application via ajax search text, and then everything is already in HTML ready, oh then I apply the plugin.
It works, but makes using more painful, and it does not attract users, and it amazes beginners programmers.
I love the plugin, do not want to change it, so I think we should prioritize better documentation, especially a simpler API.
but, this is only my opinion, and not based on technical arguments, but rather on the user experience (developer)

@penihel, many share the same opinion and to your point about being turned off with the new api,  I ended up downgrading back to 3.5.x.
It's not a matter of being able to figure out how to make it work, it goes back to the beginning of why we choose to use the library in the first place.... Ease of use and a simple, not overly complex, api that new developers can pick up without having to look at code and scratch their heads.

I'm also running into a problem with pre-setting selections via ajax but also using templateSelection & templateResult based on ab object returned via ajax.
How would I preset options with a known data object ahead of time?

I'm seriously confused about why everyone is having problems here.  Kevin made the initSelection process way simpler and more logical with select2 4.0.  He has two examples that show how to do it with or without ajax as he's mentioned several times.  I think anyone who thinks they need a custom DataAdapter probably doesn't understand the simplicity of the new design...
Step 1: Statically or dynamically create/change options in a select element.
Step 2: Trigger a change on the select2 interface.
Step 3: Realize how easy this was and stop complaining! :-P

Friend @pjclas.
You do these three steps is not so simple, especially for those who are now beginning to use the select2.
And in the previous version, these three steps were all made using settings when applying the "select2" to the element.
Now this version you have to do some steps before applying the "select2". And some scenarios it sharply affects the quantity and complexity of code.
In my scenario I have a system with a 40 "select2" different, I have to do a treatment on each to ensure that there is the element "option" within the element "select" before applying the plugin "select2". (I do this for an ajax request and apply the "select2" in callback)
Even with a seemingly simple step, in various scenarios it is a painful step.
As you said, to use the select2 now we need (at least) the steps 1,2 and 3.
In the previous version it was solved in just one step. And lose this characteristic is not advantageous for the "select2" in my opinion
Another example, show me an example of how to change the CSS class Dropdown element without using Adapter? In the previous version there was a property, now only using the full version.

You don't have to have everything created prior to creating the select2, you can modify it any time you want, and then simply trigger a change event by calling "$select2_element.trigger('change');".  As far as the CSS goes, you can change that at any time like you can with any element...

I'd think there would be a more difficult time converting the <input /> to a <select>, and maybe that's inspiring some of the issues here, as that is what requires the most changes in the long run. I wouldn't mind finding possible solutions to making migration easier, but stopping the deprecation is not a realistic long-term solution.

You do these three steps is not so simple, especially for those who are now beginning to use the select2.

Admittedly, that's my current issue with the solutions that are out there: It's no longer a "try initSelection and hope it works" kind of situation. So far we've solved the "hope it works" part of that, now it's just time to make it easier.

In my scenario I have a system with a 40 "select2" different, I have to do a treatment on each to ensure that there is the element "option" within the element "select" before applying the plugin "select2". (I do this for an ajax request and apply the "select2" in callback)

I'd hate to suggest "wrap it up in a helper function" as a possible solution here, as that adds an additional (albeit small) step to initializing Select2. But it might not be that much code, considering the small amount of code currently in there for compatibility that handles the job (somewhat) well.

The end of InitSelection brings disastrous consequences for those who used the plug connected to a MVVM framework (knockoutjs, angularjs and etc ...). For a task that "select2" made automatically, should now be made in advance by the application code itself.

I think it might just be sheer luck, but for some reason I haven't heard of a ton of issues converting Angular and Ember apps. Perhaps it's because Angular has other (better suited, imo) alternatives and Ember actually has a distinct "set everything up ahead of time" step that people are used to.
Part of my issue with Knockout, which is why I can't help a ton when converting it, is that I'm not at all familiar with what common conventions are. I can't speak for where application preparation happens with it, but I do know that it has the ability to synchronize data through bindings. And that should automatically create a new <option>, which Select2 should be able to pick up on.
But again, it's unfamiliar territory for me.

show me an example of how to change the CSS class Dropdown element without using Adapter?

The dropdownCssClass option still works in the full builds of 4.0.0, it's not yet documented though.

Hi @kevin-brown you're the best.
I think you understand my point.
I also think that the direction is not returning to the depreciated methods.
I believe that the direction is to facilitate as possible adding simpler options such as the placeholder (example: css changes, container)
and greatly improve the documentation. We need to understand that most people who use select2 not know concepts such as "decorator", "adapter" and "amd"
Thanks for listening, and sorry the heated argument. My intention has always been to contribute to the plugin, not just criticize negatively.

@kevin-brown I also agree with not moving backwards, and I can see wanting to use methods on the original select element when setting the values of said select element as it's more intuitive, but with all the examples I've seen so far, none of them deal with handling setting an option via an object and letting templateSelection display it like it should.
Example http://jsfiddle.net/q1q00hnm/3/ (ajax example from options page modified to show image in selection)
How would you pre-set, or set after intializing, a value in that select2 with a known repo object contacting the data for the selection? {id: 1, full_name: 'test repo', owner: { avatar_url: 'test_image.jpg' } }

We did it !. We came up with this solution for the AJAX problem ( Init with default value without  html tags (just  in DOM) and this data adapter: (select2 4.0))
This is done with Typescript.
!! Key point ONE: don't save the current values on the select element with $.val() - we save and read current selected value with: LINE: (set value)   ($(this.el)).data('selectedValues', [options.value]).trigger("change");    LINE (read value) :       var currentVal = this.$element.data('selectedValues');
!! Key point TWO: The result data from the ajax request musst be returned as a collection data.results property:  LINE:    callback({ results: mapped });
///
class Select2View {
el:any;

constructor(options?) {
    console.log('constructor of select2wrapper');
}

showselect2(options?) {

    this.el = options.el;

    console.log('init with value:', options.value);

    (<any>$).fn.select2.amd.require(['select2/data/array', 'select2/utils'], function(ArrayData, Utils) {
        function CustomData($element, options) {
            (<any>CustomData).__super__.constructor.call(this, $element, options);
        }

        Utils.Extend(CustomData, ArrayData);

        CustomData.prototype.current = function (callback) {

            var data = [];
            var currentVal = this.$element.data('selectedValues');

            console.log('current',currentVal);

            if (currentVal == null) {
                callback([]);
                return;
            }

            if (!this.$element.prop('multiple')) {
                currentVal = [currentVal];
            }

            for (var v = 0; v < currentVal.length; v++) {
                data.push({
                    id: currentVal[v],
                    text: currentVal[v]
                });
            }

            callback(data);
        };

        CustomData.prototype.query = function (params, callback) {
            console.log('query',params);

            (<any>$).ajax({
                url: "/myapi/layouts/5"
            }).done(function (data) {

                var mapped = $.map(data.Layout, function(obj) {
                    return { id: obj.Key, text: obj.Key };
                });

                callback({ results: mapped });
            });
        };

        (<any>$(options.el)).select2({
            dataAdapter: CustomData
        });
    });

    (<any>$(this.el)).data('selectedValues', [options.value]).trigger("change");
}

}
export = Select2View;
---------------------- snip --------------------
ps: remove the <....> typings from typescript to get javascript
ps2: the options element is just used to configure this class from the outside

Another one of my near-future goals is to get a pull request going that switches the style of the documentation, so it focuses more on working examples and less on explanations about them.

none of them deal with handling setting an option via an object and letting templateSelection display it like it should.

One thing I've considered off and on for the past 21 days is the idea of converting the data attributes on the <option> into properties on the data object. That could mean that an <option> like the following
<option data-test="this" value="1">Something</option>

would automatically be converted into a data attribute with the test property
{
  "id": "1",
  "text": "Something",
  "test": "this"
}

Which is something we already do for data attributes on a <select>, and most likely would not be difficult to bring over as well.
The other alternative is to just allow an "extra data" property on an <option> and automatically combine it with the generated data object, which would allow for freeform JSON as long as it can be parsed by jQuery.

I like your last idea. the "extra data"
Today we have a problem. When you start ajax select2 with a  default and seek method
$ ('select'). select2 ('data')
// output: {id: xxx, text: yyyy}

After I seek any other item via ajax, and call the same method:
$ ('select'). select2 ('data')
// output: {id: xxx, text: yyyy, myprop1: zzz, myprop2: 2334}

I (and I think everyone else) need to always return the object always as shown in the second example
// output: {id: xxx, text: yyyy, myprop1: zzz, myprop2: 2334}

Because we need the object with all properties completed for use elsewhere in the html page.
You could understand the problem?

converting the data attributes on the  into properties on the data object

I would love to see that implemented, as it seems it could solve peoples' problems with initSelection's demise, as well as allowing more flexibility in handling events and to make use of richer or more complex data.

@kevin-brown, The data-* options are a possibility but you'd have to have a syntactically safe way of describing nested objects within the data attributes
Example: how would {id: 1, full_name: 'test repo', owner: { avatar_url: 'test_image.jpg' } } be described in multiple data-attribute fields.
One option would be to just fit the entire JSON (escaped) into a single data field on the option, and have it be parsed by the templateSelection option when initially rendering
    <select>
        <option data-select2-option="{id:1,full_name:\"test repo\",owner:{avatar_url:\"test_image.jpg\"}}" selected></option>
    </select>

However neither option I think solves the underlying issue, or an associated issue I just thought of.
My thinking is this, if there's already a method templateSelection built into select2 to take a selection object (that being clicked on in the dropdown) and return a jQuery object or string to populate the select2 element itself, why couldn't that be called by itself instead of only being able to be called from clicking an item on the dropdown list. Something as simple as $(element).select2('manual-select', obj) or similar that would basically be the same as if an ajax search had occured and a user selected a returned data object.
The associated issue is this, say I have two dropdowns, (forked from first demo: http://jsfiddle.net/zvgjLLkh/2/ ). And I wanted to programatically set the second select based on picking an option from the first one (or vice versa). There's no way, (and if I'm wrong please let me know), to pass an object to either select that would pass it through the templateSelection before rendering it.
Both would be solved by having a manual selection method.

I've put a really ugly hack together for manual selection.
On the current v4.0.0 build of select2.full.js starting at around line ~5841
      } else if (typeof options === 'string') {
        var instance = this.data('select2');
        console.log(instance);

        if (instance == null && window.console && console.error) {
          console.error(
            'The select2(\'' + options + '\') method was called on an ' +
            'element that is not using Select2.'
          );
        }

        var args = Array.prototype.slice.call(arguments, 1);

        /**
         * Added by RG for temporary bandaid to manually select select2 options
         */
        if (options == 'manualSelect') {
            instance.trigger('select', {
                data: args[0]
            });
        }

        var ret = instance[options](args);

        // Check if we should be returning `this`
        if ($.inArray(options, thisMethods) > -1) {
          return this;
        }

        return ret;
      } else {

usage is just $(element).select2('manualSelection', obj) where obj is the object data that you want to select / add to the multi-select.

I agree with others, the new dataAdapter way is over-design and really horrible. The docs are really unclear (it's deprecated, but still moved? It seems a breaking change, which is deprecated...) and this is really annoying.
We hope this will be improved in a new version. For now we reverted the upgrading process (moved back to 3.5)

I was able to preset original multiselect values this way:

set up data attributes on option

<select id="subjects" name="subjects" multiple="multiple">
  <option value="62501" selected="selected" data-display-name="Ask your colleagues" data-image-url="#{image_url}"Ask you colleagues</option>
</select>

and in the templateSelection  template function:
var attrData = {};

$(item.element.attributes).each(function() {
  if ('data' === this.nodeName.substring(0, 4)) {
    return attrData[this.nodeName.substring(5).replace("-", "_")] = this.nodeValue;
  }
});

_.extend(item, attrData);

This way all the option attributes are available for formatting selection item.

I faced the same problem: Pre-selecting some value when using a multiple tag, Ajax query select.
What I did was, PHP write using the  tag the select,
and then after building the Select2, call the trigger('change') like this:
$j('#mySelect').select2({
            ajax: {
                ....
              }
        });
$("#mySelect").val("1").trigger("change");

This added the tag to my select

Ridiculous! How come I need to spend hours understanding how to preselect value

Will this point be improved in the future?

Hi juanitoddd, thank you, but this only select 1 value (even if I call this many times for different options), because in the select2.js file, it clear the  on update (by calling $this.clear(), which get the  and .empty() it). BUT! I see that when we manually select, it's not disappearing because it actually recreate all the  using the attribute "data" (which must be empty when we call .trigger("update") like you prescribed.
So.
Do you know how to populate "data" with the function .trigger("update"), or do you know of a way to simply have more than one pre-selected option in a multiple select2?
Thanks!

Hello everybody, I initiated an activity to migrate Select2 to version 4.0, but it's hard just to contribute in conversation, I use to AngularJS and we have some complementary implementations because the needs of our systems, and use this new version is not giving right. I am unable to apply all current resources, not to mention some limitations on the types mentioned above.

We love this feature and use it to its maximum power, but the new version is killing us. We are going back to 3.5, let's wait a while and see how the new updates will walk and try again in the future.

Thanks guys for conversation.

Also rolling back to 3.5

@juanitoddd : Doesn't your ajax stop working on that step ?

+1 you guys need to fix this initialSelection issue fast. I'm sure your thinking was solid building the API - but there needs to be a simple override to set the initial selection that doesn't involve DOM manipulation. A data driven API should be just that - you set the data you want to display and the API takes care of the DOM. Having to dig into the API and write a custom piece of code to set the initial value is totally backwards.
It's extremely frustrating because it's like - a glaring hole in what would otherwise be a great API

+1 in the hopes this gets better in the next version.
In my case, I am using the DataAdapter method because I'm dealing with a large data set that I need to do paging/filtering on.  However I've spent hours trying to figure out how to get the initial selection to populate correctly (still with no luck).
That said, I realize this is free software and I am not contributing to it so keep up the good work :)

will this ever get fixed?

This is so confusing.  This is my fifth time reading this page in the past month.

And it doesn't look like this will ever get improved...

My major problem with this API is there is no way to access the data context.  You are expected to construct it entirely from within the data adapter.  Which means it is not a true adapter.  It is a one-direction plug.
The most immediate fix would be to allow the constructor for this object to take two additional, optional, parameters:

data, either an array or function
currentData, either an array or function.  If an array and data argument is not supplied, will automatically walk the data argument and search for matches.  If a function, would allow some way to do stuff.

But the problem with even this is there is no way to handle asynchronous data loads using this paradigm, which is EXACTLY WHY all the docs basically tell you to work around anything ajax-related by first inserting your options elements using AJAX, and THEN calling select2.  But that defeats the purpose of a modern data-bound UI where you don't know the ID of the element, and are only using select2 to add a little bit of jazz to the UI.
Just my 2 cents after spending all day at work on a Friday trying to figure out a solution to this.

Here is the exact problem: https://github.com/select2/select2/blob/4.0.3/src/js/select2/core.js#L31
I think we may be able to build a proxy for initSelection and make a backward compatible fix for 3.x users if we just pretend that initSelection was never removed from the options object.  Consumers may have to slightly modify their initSelection code, and we'd have to provide a BackCompatInjectedAdapter extension that drives this logic, but the wonky idea would be you would call it like this:
$("#example).select2({
  dataadapter: BackCompatInjectedAdapter,
  current: [this.KnockoutObservableStoringCurrentOptionId()];
});

Going to try that next... there HAS to be a way as part of the options object to specify a current value.

OK, here is where I am at with my attempt at a workaround.  I tried writing my own custom data adapter, and gave up after TypeScript kept complaining.  The whole way Select2 does modules is too advanced for me to figure out how to integrate into TypeScript.
So, here is what I did instead to progress my idea.  I edited select2/data/select.js, as that is where current prototype function is defined.
I changed the function to the following, but I am still not getting select2 to set the current element (obviously, this is bad code, but I am trying to understand what 'current' is really doing for me that needs so many layers of indirection:
SelectAdapter.prototype.current = function (callback) {
var data = [];
var self = this;
var ic = this.options.get('initCurrent');
console.log(ic);
if (typeof ic !== "undefined")
{
	data.push(new Option(ic, ic, true, true));
}
else
{
	this.$element.find(':selected').each(function () {
		var $option = $(this);

		var option = self.item($option);

		data.push(option);
	});
}

callback(data);

};

@jzabroski   I like where you're goin' with that.. I actually went back and implemented a wrapper for 3.x in my solution. And was able to frame the problem like this:

Data binding involves initSelection
During initSelection the ng-model value is used to call the server for the key / value pair (using the key if you've bound it that way or value if you bound it that way)
When the data is returned it's passed into the callback of initSelection
During paging of the control the results are cached in the directive so they can be used to set ng-model when an option is selected.

So... This is essentially 2-way data binding. The problem my team ran into with 4.x is that it didn't give full control over this... And, for some reason, it's difficult to frame this problem which is why this discussion is so long..
I hope this helps... basically it's to make sure:  1) the DOM is separate from the data binding 2) no DOM manipulation is required when initializing the control, and 3) the "current" and "initial" values can be set and reference the ACTUAL DATA. not some hacked in option in the DOM.
Uhm, so that's my perspective on the problem. I was able to do this properly in 3.x.. in 4.x it's a lot more complicated i think because the DOM implementation is close to the data adapter.. so it's harder to parse out of the API in order to create the desired "data context" binding.. if that makes any sense?

But why isn't my hack working? When I click in the ui and select the object, it says 17. When I set it through val or current, it doesn't update the ui even after calling trigger ('change')
Will try to create a fiddle tomorrow.

@kevin-brown I've been studying this code for days now and trying to 'get inside your head' as the lead designer, so I can contribute something useful.  I'm trying to get to the essence of a good design, since that seems to be your focus for 4.0, and I want to help you achieve that. Here are my thoughts:

DataAdapter.prototype.current is not intended to allow setting the current value.  It is supposed to be a pure function that reads the current DOM state of the underlying select element.  Ergo, @glowysourworm saying "the DOM implementation is close to the data adapter".  In a reactive implementation like Knockout that uses data binding, I don't think we care what the DOM state is, because we are telling the DOM to react to us, rather than the other way around.
The fact the default implementation allows/encourages mixing DOM-side events and reactive events ($.ajax.done) causes subtle problems with composing DataAdapter extensions from the ground-up.  The other downside to this DOM requirement is the performance of DataAdapter.prototype.current is bound to the performance of jQuery's performance on this.$element.find(':selected').each - this could explain #4407.
When using AJAX configuration, the underlying <select> element only adds options that have been previously selected. Presumably, you coded it this way to minimize the number of HTMLElement objects in a single browser tab.
When using AJAX configuration, there is no way to call AJAX on initialization.  This is somewhat implicit in the documentation, but not spelled out anywhere.  For example, see No more hidden input tags and Removed the requirement of initSelection in the Select2 4.0 announcement.  Combined, these two notes form a better implicit picture than either alone.
This causes several odd scenarios, that can only be resolved by pushing <option> elements into the underlying <select> control.
This is perhaps why the very bottom of the Removed the requirement of initSelection section says "If you only need to load in the initial options once, and otherwise will be letting Select2 handle the state of the selections, you don't need to use a custom data adapter. You can just create the  tags on your own, and Select2 will pick up the changes."  It's not that "you only need to load in the initial options once", it's that AJAX doesn't get called on start-up, and since AJAX is asynchronous, the control would temporarily be in an undefined state until one could match-up the AJAX results to the initialization.
It's simply undefined/under-specified - everywhere in the documentation - what select2 should do if the programmer sets val to anything not in the DataAdapter.prototype.query and/or $.select2.options.data.  Question: Going with the approach it is under-specified, we can say that $.select2.val() has to match at least $("select").val(), right?
Minor detail: $.select2.val(...) takes a string as a value, but $.select2.dataadapter.current returns an Array.  I'm not sure why this asymmetry exists, but I thought I would point it out and get your thoughts on it.

@kevin-brown Correct, and sorry about the confusing wording... I should've just cited my use case - which was to create an AngularJS wrapper - so, yes, a data-binding scenario - to provide the functionality of the select 4.x control within an Angular app.
If you were to try and implement the 4.x control as a directive in Angular you'd see where the problems creep in. Specifically, there's no way to initialize the value of the control - which is why i think so many of us are complaining about the upgrade.
Put simply, if 4.x were capable of creating an interface similar to 3.x there wouldn't be this problem. So, once that interface is in place I think most of us will have our answer.

I think, studying the code, that the documentation for the dataadapter needs some changing.  It doesn't update the elements, but rather gets the updated elements.  Something else still needs to tell select2 there is an updated list to retrieve.
From options-old.html#dataAdapter (for some reason, only options-old has the API documentation):
// Get the currently selected options. This is called when trying to get the
// initial selection for Select2, as well as when Select2 needs to determine
// what options within the results are selected.
//
// @param callback A function that should be called when the current selection
//   has been retrieved. The first parameter to the function should be an array
//   of data objects.
DataAdapter.current = function (callback) {
  callback(currentData);
}

// Get a set of options that are filtered based on the parameters that have
// been passed on in.
//
// @param params An object containing any number of parameters that the query
//   could be affected by. Only the core parameters will be documented.
// @param params.term A user-supplied term. This is typically the value of the
//   search box, if one exists, but can also be an empty string or null value.
// @param params.page The specific page that should be loaded. This is typically
//   provided when working with remote data sets, which rely on pagination to
//   determine what objects should be displayed.
// @param callback The function that should be called with the queried results.
DataAdapter.query = function (params, callback) {
  callback(queryiedData);
}

and options-old.html#selectionAdapter:
// Update the selected data.
//
// @param data An array of data objects that have been generated by the data
//   adapter. If no objects should be selected, an empty array will be passed.
//
// Note: An array will always be passed into this method, even if Select2 is
// attached to a source which only accepts a single selection.
SelectionAdapter.update = function (data) { };

Let me know your thoughts, @kevin-brown

if I want to autocomplete a value from a local array that changes all the time, select2 4 makes it very hard. It was much simpler before. I think a higher-level api is really missing around the dataAdapter concept

I don't know if this is helpful but I'll post it here anyway.
The way I see it that if you have a static list that will never need refreshing you use:
{
data: [{text: "Something", id: "123"}, ... , {n} ]
}

And you use .val("stuff").change() to set the initial value.
If you need to retreive data dynamically you use one of these options

The build in ajax option (which I have not used as if yet) for basic behaviour.
The dataAdapter option, if you want to do some fancy stuff.

As for troubles with current values etc. I've wrapped Select2 in a class/object that handles Select2's behaviour, such as when to refresh etc. in it's most simple form it looks like this:
MySelect2Wrapper = function(initValue, $domElement){
    this.$domElement = $domElement;
    this.value = initValue;
   ...

   this.select2Options = {
                                          dataAdapter: $.fn.select2.amd.require('select2/data/customAdapter'),
                                          ...
                                      }
}

The way I enforce refreshing or not refresing (or any behaviour for that matter) is by passing an extra property to the select2Options object.
This property is a function which is bound to MySelect2Wrapper
So using the code from above and altering this block:
   this.select2Options = {
                                          dataAdapter: $.fn.select2.amd.require('select2/data/customAdapter'),
                                          ...
                                      }

To this:
   var self = this;
   this.select2Options = {
                                          dataAdapter: $.fn.select2.amd.require('select2/data/customAdapter'),
                                          myRefreshingProperty: function(){return self.doStuff();},
                                          myWhatEverElseProperty: ... ,
                                          ...
                                      }

and adding
MySelect2Wrapper.prototype = {
    doStuff: function(){
       var result = true;
       // Some logic here.
       ...

      return result;
    }
}

Then in the dataAdapter you can use this.options and read the propertyValues for w/e you want to do.
I realize that if Select2 decides to add a property with the same name you could run into a problem. So I would suggest giving the properties a unique prefix. Something like MyCompanyNamePropertyName: ... or w/e.
Also I feel it is good practice to wrap third party libraries in your own Classes/Objects in case the behaviour you want is implemented differently in newer versions. Or if you want to swap out the library in it's entirty.
 Just throwing it out there in case someone has to re-write large parts of their code base because of a swap to Select2 4.0.
Side note
One thing I would like to comment is that I believe "query" and "current" get called in the wrong order.  That is if you use the dataAdapter as a means to retreive remote data.
I would expect to use "query" to query my remote, and "current" to select the initial value for that query. Though again, this is only the case if you use (or abuse, depending on "normal" dataAdapter usage) dataAdapters to retreive remote data.
Hope this helps someone, Robert.

Beautiful!
So much more easier to implement than that old bulky query:.

All I need is for my select box to show 3 options when one criteria is met and show one less when another criteria is met. Do I need to do all this adapter stuff just for that? The adapter seems like overkill. And plugins like this are so we don't need to mess around with DOM elements.
The only way I can find is to empty it and reinitialize it, which seems horribly inefficient.

This thread is so long to read all of them.
All I can say, is that, next time.. I think before implementing such APIs.. consider RFC(request for comments) and maybe have a votation on how and what the api should look like.

By the way, I am having problem on how can I display default selection with the same formate or template defined in my templateSelection.

@ajcastro agreed.  The tragic thing is that AMD is largely falling out of favor these days, with technology like Webpack on the rise.

I only have to change the arrow in the selectionAdapter and can't find a way to do it. Is there any example out there of how to do something like this?

I'm going to say that this issue has gotten too lengthy and off-topic to still be useful at this point.  Initial options for remotely sourced data is now documented: https://select2.org/data-sources/ajax#default-pre-selected-values
As a preemptive note to anyone who wants to give me a hard time about this...I'm a relatively new contributor/maintainer and was not part of this decision when it was made.  So, please don't yell at me about this 😛
Further discussion on the overall trajectory of Select2, and the whole UMD adapter/decorator/whatever architecture, can be continued on the new forums.
There are other issues open about documenting the adapter/decorator system in general - contributions would be greatly appreciated as I don't really understand it myself at this time.


Update revision control information

Seems like it wasn't updated in the forking.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.0 out of 4 committers have signed the CLA.:x: johannessarpola:x: elisamozammel:x: LockeBirdsey:x: jaakkorautYou have signed the CLA already but the status is still pending? Let us recheck it.

Accidentally created PR in this upstream repository after merging from the upstream project, the default branch fields were set incorrectly.


Swarm 391

Hi Wildfly-Swarm, this a pull request for supporting resource adapter deployments in wildfly-swarm. I was able to write a test for the wildfly-swarm-examples repo. I will push this change later this week.
This version should support external ironjacamar.xml files. The declarative approach is not finalized yet. First, I have to understand, why the resource-adapter class in config api is not covering for example xa stuff.
Please let me know what I should make better for this push
Thanks,
Ralf

I have corrected the wrong pom versions.

Thanks @rbattenfeld . I'll have a look this week.

@kenfinnigan @bobmcwhirter feel free to grab this one. I won't be able to look into before next week

Merged

Thanks for this @ralfbattenfeld!
Do you happen to have an example showcasing this PR that we could integrate into our examples repo?
If you do, a PR would be great
Thanks again!


Ratio component - iOS issue with  or

This TODO comment was in ratio.scss component where it was successfully forgotten.
TODO: There are issues in iOS when placing  or  elements within a ratio component. Solutions depend on context, but we need a good one, at least for iframes.

where it was successfully forgotten.

:smile_cat:

Probably this issue doesn't exist. But need to keep an eye on it.


Overflow view is not touchable

I have wrapped the toolbar from the above picture in ViewOverlfow and got the modal to properly display. However, the modal is only touchable within the area of the toolbar (red rectangular), and not touchable in the blue rectangular area. Is it possible to make the entire modal touchable?
Toolbar's render method:
  render() {
    return (
      <ViewOverflow
        style={styles.container}>

        {this._renderAIAction()}

        ...

        {this._renderAutocompleteSelectionActions()}

        {this._renderAlignModal()}

      </ViewOverflow>
    );
  }

modal's render method:
  _renderAlignModal = () => {
    LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
    if (this.state.isAlignModalVisible) {
      return (
        <TouchableWithoutFeedback
          onPress={() => this.setState({isAlignModalVisible: false})}>
          <View style={styles.modalBackground}>

            <View style={[styles.modalContainer, {
                left: this.state.alignActionButtonLayout.x,
                bottom: this.state.alignActionButtonLayout.y + this.state.alignActionButtonLayout.height / 2
              }]}>
              {this._renderAction(actions.alignLeft)}
              {this._renderAction(actions.alignCenter)}
              {this._renderAction(actions.alignRight)}
              {this._renderAction(actions.alignFull)}
            </View>

          </View>
        </TouchableWithoutFeedback>
      )
    }
  }

styles:

const styles = StyleSheet.create({
  container: {
    height: TOOL_BAR_HEIGHT,
    backgroundColor: "#F7F7F7",
    borderTopColor: "#CCCCCC",
    borderTopWidth: 0.5,
    flexDirection: 'row',
    justifyContent: 'space-around',
    alignItems: 'center',
  },
  modalBackground: {
    position: 'absolute',
    height: Dimensions.get('window').height,
    bottom: 0,
    left: 0,
    right: 0,
  },
  modalContainer: {
    width: TOOL_BAR_HEIGHT,
    paddingVertical: MARGIN_1,
    position: 'absolute',
    backgroundColor: COLOR_MATERIAL_LIGHT_1,
    alignItems: 'center',
    shadowColor: COLOR_MATERIAL_LIGHT_5,
    borderRadius: 2,
    shadowRadius: 6,
    shadowOpacity: 0.8,
    elevation: 6,
  },
}

try changing:
container: {
    height: TOOL_BAR_HEIGHT,
    backgroundColor: "#F7F7F7",
    borderTopColor: "#CCCCCC",
    borderTopWidth: 0.5,
    flexDirection: 'row',
    justifyContent: 'space-around',
    alignItems: 'center',
  }

to
container: {
    height: TOOL_BAR_HEIGHT,
    flexDirection: 'row',
    justifyContent: 'space-around',
    alignItems: 'center',
  }

Same here

basically what seems to be it that touch events are not happening inside <ViewOverflow> such as  TouchableOpacity someone give a hint for where to look pls?

my knowledge of android is java is none, but I think maybe after you set Clip  ((ViewGroup) getParent()).setClipChildren(false); you need to check for touch event, something like this
TouchDelegate touchableArea;
Object childviews;
setTouchDelegate(touchableArea, childviews);

and that set touch delegate can be wrapped as
parentView.post(new Runnable() {
    public void run() {}
....
....
setTouchDelegate
}

ain't sure how to solve really. I wish now I knew some more native code any help? @sibelius

Touch-Feature is crucial for 99% of all overflow implementations. Is there really no way??

I have the same problem

@ethanyuwang Do you have any solutions?

Anyone found a solution for this? I have the same problem.

Yikes... this was literally the reason why I needed this library, and it seems no one has even found a workaround. Disappointing.

I think you should try react-native-gesture-handler. Might be relevant. Not
sure though.
בתאריך יום ג׳, 26 במרץ 2019, 17:03, מאת Dror-Bar<EMAIL_ADDRESS>
:

Yikes... this was literally the reason why I needed this library, and it
seems no one has even found a workaround. Disappointing.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/entria/react-native-view-overflow/issues/32#issuecomment-476690620,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AgwLcVynLMO80yA7yI0gS3-nnctWGgmvks5vajbagaJpZM4UbhFe
.

@Dror-Bar you could try solving it and send a PR instead of just complain...

@felippepuhle haha, I guess you are right. I ended up solving my use-case (masonry list) without using this library in the end. Long story short, I had overlapping views using negative margin. This allowed my (touchable) components to look like they were on top of the view above them, and the trick I used was pointerEvents='box-none' to allow the clicking event to register through the top view to the bottom view.

I believe this pull request (from the react-native repo) would fix the issue. However, it's not gaining much traction for now.


adapting Device Plugin status report in Module to v.2

This commits adds implementation of reporting device plugin status into the Module's status.
The following fields are reported:

number of targeted nodes ( based on selector field) 2) number of desired podsto be run
current number of the pods actually running

/lgtm

/cherry-pick release-2.0


Downloading course information, course I'd not found (failed!)

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

udemy course url: [e.g https://www.udemy.com/machinelearning/] '...'
Run the following command to reproduce the error.
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Python Environment (please complete the following information):

OS Platform: [e.g. Windows 10, Ubuntu 16.04, macOS Sierra]
Python Version [e.g. 3.x.x]

Additional context
Add any other context about the problem here.
issue pic

im getting this same issue.  After logging in and attempting the URL https://www.udemy.com/course/learn-how-to-create-a-2d-tower-defense-game-in-unity-2020/
using: python udemy-dl.py https://www.udemy.com/course/learn-how-to-create-a-2d-tower-defense-game-in-unity-2020/
Th error appears:
[-] : Downloading course information, course id not found ..  (failed)
[i] : It seems either you are not enrolled or you have to visit the course atleast once while you are logged in.

Please clone latest from the repo. And try again.
Hope you will be able to download.

I have the same problem
C:\udemy-dl>udemy-dl.py https://www.udemy.com/course/universidad-spring-framework-springboot-java-security-rest-webservices/learn/lecture/18217012?start=105#overview -k cookie.txt
          __                               ____

__  / /  ____ ___  __  __      __/ / /
/ / / / __  / _ / __ ` / / / // __  / /
/ // / // /  / / / / / / /_/ // // / /
_,/_,_/_// // //_, /      _,//
/___/
Version : 1.1
Author  : Nasir Khan (r0ot h3x49)
Github  : https://github.com/r0oth3x49
[i] : Trying to login using session cookie
[i] : Updating session cookie..
Access Token : xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[i] : Logged in successfully.
[i] : Downloading course information ..
[-] : User Interrupted..
...
...

Thank You I will let you know did it downloaded or not 😊
On Fri, Jun 18, 2021, 12:03 AM victorfz40 @.***> wrote:

I have the same problem
C:\udemy-dl>udemy-dl.py
https://www.udemy.com/course/universidad-spring-framework-springboot-java-security-rest-webservices/learn/lecture/18217012?start=105#overview
-k cookie.txt
      __                               ____

__
/ / ____ ___ __ __ __/ / / / / / / __ / _ / __ ` / / / /
/ __ / / / // / // / / / / / / / /_/ /
/ // / / ,/,/// // //_, / ,/
/ /__/
Version : 1.1
Author : Nasir Khan (r0ot h3x49)
Github : https://github.com/r0oth3x49
[i] : Trying to login using session cookie
[i] : Updating session cookie..
Access Token : xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[i] : Logged in successfully.
[i] : Downloading course information ..
[-] : User Interrupted..
...
...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/r0oth3x49/udemy-dl/issues/653#issuecomment-863470090,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AUG36DIAQQWDIVWI644UISLTTI5XXANCNFSM45ZAXHMA
.

Hello,
Delete my post because then it downloaded successfully.
Thanks and regards
El El sáb, 19 jun 2021 a las 7:32, Andrew Neil @.***>
escribió:

Thank You I will let you know did it downloaded or not 😊
On Fri, Jun 18, 2021, 12:03 AM victorfz40 @.***> wrote:

I have the same problem
C:\udemy-dl>udemy-dl.py

https://www.udemy.com/course/universidad-spring-framework-springboot-java-security-rest-webservices/learn/lecture/18217012?start=105#overview

-k cookie.txt

__
/ / ____ ___ __ __ __/ / / / / / / __ / _ / __ ` / / / /
/ __ / / / // / // / / / / / / / /_/ /
/ // / / ,/,/// // //_, / ,/
/ /__/
Version : 1.1
Author : Nasir Khan (r0ot h3x49)
Github : https://github.com/r0oth3x49
[i] : Trying to login using session cookie
[i] : Updating session cookie..
Access Token : xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[i] : Logged in successfully.
[i] : Downloading course information ..
[-] : User Interrupted..
...
...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/r0oth3x49/udemy-dl/issues/653#issuecomment-863470090
,
or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AUG36DIAQQWDIVWI644UISLTTI5XXANCNFSM45ZAXHMA
.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/r0oth3x49/udemy-dl/issues/653#issuecomment-864359103,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABSWBGLV5EWDI6XXSXC7DULTTQTVNANCNFSM45ZAXHMA
.

Sry I can't Understand which Post?
On Sat, Jun 19, 2021, 11:22 AM victorfz40 @.***> wrote:

Hello,
Delete my post because then it downloaded successfully.
Thanks and regards
El El sáb, 19 jun 2021 a las 7:32, Andrew Neil @.***>
escribió:

Thank You I will let you know did it downloaded or not 😊
On Fri, Jun 18, 2021, 12:03 AM victorfz40 @.***> wrote:

I have the same problem
C:\udemy-dl>udemy-dl.py

https://www.udemy.com/course/universidad-spring-framework-springboot-java-security-rest-webservices/learn/lecture/18217012?start=105#overview

-k cookie.txt

__
/ / ____ ___ __ __ __/ / / / / / / __ / _ / __ ` / / / /
/ __ / / / // / // / / / / / / / /_/ /
/ // / / ,/,/// // //_, / ,/
/ /__/
Version : 1.1
Author : Nasir Khan (r0ot h3x49)
Github : https://github.com/r0oth3x49
[i] : Trying to login using session cookie
[i] : Updating session cookie..
Access Token : xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[i] : Logged in successfully.
[i] : Downloading course information ..
[-] : User Interrupted..
...
...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
https://github.com/r0oth3x49/udemy-dl/issues/653#issuecomment-863470090
,
or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AUG36DIAQQWDIVWI644UISLTTI5XXANCNFSM45ZAXHMA

.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/r0oth3x49/udemy-dl/issues/653#issuecomment-864359103
,
or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/ABSWBGLV5EWDI6XXSXC7DULTTQTVNANCNFSM45ZAXHMA
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/r0oth3x49/udemy-dl/issues/653#issuecomment-864360853,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AUG36DNVIS3UVQQCD2D7KBLTTQWCRANCNFSM45ZAXHMA
.

Nothing, he had written by mistake, sorry.
El El sáb, 19 jun 2021 a las 10:42, Andrew Neil @.***>
escribió:

Sry I can't Understand which Post?
On Sat, Jun 19, 2021, 11:22 AM victorfz40 @.***> wrote:

Hello,
Delete my post because then it downloaded successfully.
Thanks and regards
El El sáb, 19 jun 2021 a las 7:32, Andrew Neil @.***>
escribió:

Thank You I will let you know did it downloaded or not 😊
On Fri, Jun 18, 2021, 12:03 AM victorfz40 @.***> wrote:

I have the same problem
C:\udemy-dl>udemy-dl.py

https://www.udemy.com/course/universidad-spring-framework-springboot-java-security-rest-webservices/learn/lecture/18217012?start=105#overview

-k cookie.txt

__
/ / ____ ___ __ __ __/ / / / / / / __ / _ / __ ` / / / /
/ __ / / / // / // / / / / / / / /_/ /
/ // / / ,/,/// // //_, / ,/
/ /__/
Version : 1.1
Author : Nasir Khan (r0ot h3x49)
Github : https://github.com/r0oth3x49
[i] : Trying to login using session cookie
[i] : Updating session cookie..
Access Token : xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[i] : Logged in successfully.
[i] : Downloading course information ..
[-] : User Interrupted..
...
...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
https://github.com/r0oth3x49/udemy-dl/issues/653#issuecomment-863470090
,
or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AUG36DIAQQWDIVWI644UISLTTI5XXANCNFSM45ZAXHMA

.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<
https://github.com/r0oth3x49/udemy-dl/issues/653#issuecomment-864359103
,
or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/ABSWBGLV5EWDI6XXSXC7DULTTQTVNANCNFSM45ZAXHMA

.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/r0oth3x49/udemy-dl/issues/653#issuecomment-864360853
,
or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AUG36DNVIS3UVQQCD2D7KBLTTQWCRANCNFSM45ZAXHMA
.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/r0oth3x49/udemy-dl/issues/653#issuecomment-864376959,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABSWBGLW5WY2MIAVZ3J7HJTTTRKAFANCNFSM45ZAXHMA
.

Okok 👌
On Sat, Jun 19, 2021, 8:46 PM victorfz40 @.***> wrote:

Nothing, he had written by mistake, sorry.
El El sáb, 19 jun 2021 a las 10:42, Andrew Neil @.***>
escribió:

Sry I can't Understand which Post?
On Sat, Jun 19, 2021, 11:22 AM victorfz40 @.***> wrote:

Hello,
Delete my post because then it downloaded successfully.
Thanks and regards
El El sáb, 19 jun 2021 a las 7:32, Andrew Neil @.***>
escribió:

Thank You I will let you know did it downloaded or not 😊
On Fri, Jun 18, 2021, 12:03 AM victorfz40 @.***> wrote:

I have the same problem
C:\udemy-dl>udemy-dl.py

https://www.udemy.com/course/universidad-spring-framework-springboot-java-security-rest-webservices/learn/lecture/18217012?start=105#overview

-k cookie.txt

__
/ / ____ ___ __ __ __/ / / / / / / __ / _ / __ ` / / / /
/ __ / / / // / // / / / / / / / /_/ /
/ // / / ,/,/// // //_, / ,/
/ /__/
Version : 1.1
Author : Nasir Khan (r0ot h3x49)
Github : https://github.com/r0oth3x49
[i] : Trying to login using session cookie
[i] : Updating session cookie..
Access Token : xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[i] : Logged in successfully.
[i] : Downloading course information ..
[-] : User Interrupted..
...
...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<

https://github.com/r0oth3x49/udemy-dl/issues/653#issuecomment-863470090

,
or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AUG36DIAQQWDIVWI644UISLTTI5XXANCNFSM45ZAXHMA

.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<
https://github.com/r0oth3x49/udemy-dl/issues/653#issuecomment-864359103
,
or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/ABSWBGLV5EWDI6XXSXC7DULTTQTVNANCNFSM45ZAXHMA

.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
https://github.com/r0oth3x49/udemy-dl/issues/653#issuecomment-864360853
,
or unsubscribe
<

https://github.com/notifications/unsubscribe-auth/AUG36DNVIS3UVQQCD2D7KBLTTQWCRANCNFSM45ZAXHMA

.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/r0oth3x49/udemy-dl/issues/653#issuecomment-864376959
,
or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/ABSWBGLW5WY2MIAVZ3J7HJTTTRKAFANCNFSM45ZAXHMA
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/r0oth3x49/udemy-dl/issues/653#issuecomment-864419422,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AUG36DPXEBIW6OW4TSCDCTDTTSYGVANCNFSM45ZAXHMA
.

No it didn't worked it show the same errors I want to download this course
https://www.udemy.com/course/tally-erp-9-step-by-step-guide-to-accounting-with-tally/
Kindly help me 😔
On Tue, Jun 22, 2021, 4:58 PM Nasir Khan @.***> wrote:

Closed #653 https://github.com/r0oth3x49/udemy-dl/issues/653.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/r0oth3x49/udemy-dl/issues/653#event-4922120088, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AUG36DOAZMY3TJEP57WCEGLTUBXWLANCNFSM45ZAXHMA
.


Week starting from saturday when using moment timezone and browser timezones are different

Do you want to request a feature or report a bug?
Report a bug
What's the current behavior?
I am using moment as a localizer. I have the set the timezone as America/New York. When I open the calendar with the browser in that time zone(ET), it works fine. However, when I open it from my timezone(IST), it starts the day from Saturday. I have made some customisation to the calendar, one of which uses the dayOfWeek value to do something. And because of this localizer thing, it's breaking.

It even adds this extra empty line on the calendar, because of the localizer problem.

What's the expected behavior?
It should start from Sunday, no matter what the timezone is.
The week starts from Sunday if I change my browser timezone to ET. This works fine.

Can anyone help me with this problem? I've sat at it for hours and even checked the issues section but I couldn't find a solution. Thank you so much!

Btw, since I'm showing the events using my own layout using a custom DateCellWrapper and I only need to show the calendar for a single locale(en-US), is there any way I can skip adding the localizer to BigCalendar?

Also check #118

Hi, I found this possible result for your question. It was useful to me, I don't know if it will help you
Stackoverflow-- question 45671732


[Feature] Add relevant tab title and logo

Logo must be the the official logo of GDSC AEC chapter
Tab title must be "GDSC AEC"

Hey, I would like to work on this. Can you please assign this to me?

@hemanth110702 Sure, go ahead.


Price Rules depending on land does not apply - the cart does not refresh

PHP Version: 8.3.9   | Shopware Version: <IP_ADDRESS>  | Affected area / extension: Platform(Default)

Expected behaviour:
We have price rules depending on differing countries. So if the customer is logged in and ADD a article to his cart the price is - like expected 19.18 EUR.
If the customer is NOT logged in the shown price is 19.00 EUR - correct. But if he is changing the land in the cart/checkout process the cart should update the price depending on price rules.
Actual behaviour:
The Customer is not logged in - he adds a article for 19.00 EUR to his cart. He change the shipping address to Austria - for Austria is a price of 19.18 EUR (defined by price rule if country is one of ... use price ...) but the cart does not update the price - the customer can checkout with the lower price. In fact - the price rule is IGNORED.
How to reproduce:
Everytime a customer changes the shipping address the cart would not update/check for price rules - inacceptable.
Edit: i think this change is causing my issue:
https://github.com/shopware/shopware/blob/v<IP_ADDRESS>/changelog/release-6-6-6-0/2024-08-13-dont-save-cart-on-any-request.md
--> the cart ignores everything wenn the article is not updated. How can i disable this?

[public] Shopware automated response: This issue is linked to the internal issue: NEXT-38208
[created from NEXT-38208, comment 493170]

Tested on dockware/dev:<IP_ADDRESS> and confirmed.
Standard rate is 19
cart checkout with Austria (or other) defined as delivery address, the tax rate remains 19

We will release a patch version tomorrow to fix the issue. Sorry guys!

We also confirm that issue in version <IP_ADDRESS>.
@shyim two days have passed, no fix for that issue yet.

The fix is merged https://github.com/shopware/shopware/commit/75f35f06c590ef070241fad4e714b4c1c53fb773, but the release team is working on releasing a patch

Thank you for the quick reply and the information.

It has been 2 weeks since the reported issue should be fixed.
Still no update there?

@rockit-ta it's already fixed in the latest shopware version... or at least we no more have any issues.


Publish Markdown and Scaladoc to the interwebs

We used to use https://github.com/bigdatagenomics/adam/blob/master/scripts/publish-scaladoc.sh but it didn't work well.

Pushed a gh-pages branch.

And here's our docs: http://bdgenomics.org/adam/
Aren't they lovely? :-p

Eesh, those project docs look pretty sad.  A bunch of the links and some of the MathJax formatting didn't work.
From what I can tell, we can use GitHub Pages Jekyll with the gh-pages branch.  Then we could leave the markdown pages unrendered by pandoc.
As far as sequencing, do you want to merge #1461 before the 0.22.0 release then then have us look into better markdown rendering after?

See also #774

Under the principle of "perfect is the enemy of good", I would rather publish a release with ugly docs than a release with no docs. That said, I'd like to merge #1461 before 0.22.0.

+1


Wrong printf specifiers

When LFS_TRACE is enabled, some printf-like calls are compiled.
Some of the %-specifiers are wrong (they do not match the actual type of the arguments), which raises compiler warnings, possibly escalated to errors.
In two cases (see below), the specifier should be changed. In another one, a cast is needed.
In lfs.c:5889: ".block_cycles=%"PRIu32  --> PRIi32
In lfs.c:5919: ".block_cycles=%"PRIu32  --> PRIi32
In lfs.c:6078: flags  -->  (unsigned)flags

Hi @stefano-zanotti, thanks for creating an issue.
This would be good to fix.
Out of curiousity, what compiler are you using? Compiling littlefs with -DLFS_YES_TRACE unfortunately doesn't report these warnings with our current makefile.

Compiling littlefs with -DLFS_YES_TRACE unfortunately doesn't report these warnings with our current makefile.

In hindsight what PRI* expands to depends on the exact architecture. Given how printf/PRI* works, I don't think it's going to be possible for us to prevent these sort of mistakes in CI...

I gone ahead and created https://github.com/littlefs-project/littlefs/pull/997 to fix this. Will bring it in on the next patch, though this is low priority.
I had forgotten printf accepts %i, but I changed these to PRId32 for consistency.
Let me know if you see any other uncaught format warnings.

I'm using GCC, with these flags (among others)
-Werror=format-extra-args
-Werror=format-overflow=2
-Werror=format-signedness
-Werror=format-truncation=2
-Werror=format=2
(According to the docs, the latter implies -Werror=format -Werror=format-nonliteral -Werror=format-security -Werror=format-y2k)
The specific issue reported here is raised by "-Werror=format=2"; GCC reports something like:
error: format '%lu' expects argument of type 'long unsigned int', but argument 14 has type 'int32_t' {aka 'long int'} [-Werror=format=]
Signedness problems should be evident on every platform, though it's true that number-of-bits errors might be missed by CI depending on the target architecture.
Anyway, not catching these automatically is not really a big deal, I think.
It's mostly to get a warning-free compilation, so that actual problems are not drowned out by a large number of minor warnings.
It's very possible that I missed some other cases (as you've already found), because of the specific LFS configuration flags I'm using.
I'll let you know if something else comes up in the future.


Working on the Apache proposal draft

This is the discussion place about Apache incubator proposal. Apache member @michaelsembwever will help me to do this. I will drop the proposal in this wiki page.
All members of @OpenSkywalking/pmc @OpenSkywalking/committer-team @OpenSkywalking/huawei-devcloud-contributor-team can give me feedbacks through any channel you like, e.g GitHub comments, Gitter, Wechat, Cell Phone, Huawei internal espace.
@michaelsembwever , we can stay in gitter, or discuss in here. And you have the right to edit the proposal.

🎉🎉 🎉  Thanks for creating this proposal. This is a very big step forward for the SkyWalking project and encourages everyone to move on. 💪 💪 💪

Thanks @wu-sheng
I'm here and very happy to help. I believe we are in similar time zones, which will make things a lot easier. So anyone who's got any questions please do reach out 😎

I finished the first edition. Please review it.

@bsideup Received your notification, and do the adjustments. Also I invited you to join the project as a collaborator. So you can help us out in the Apache way.

This year's efforts were not in vain.

Great to hear this news. Thanks very much. @michaelsembwever

FYI @peng-yongsheng
@ascrutae
@hanahmily
@lytscu
@zhangkewei
@oracle219
@IluckySi
@titsquid
@bai-yang
Most works have been done. @michaelsembwever will start the formal processes for us in these days.

Mick has moved the draft proposal has been moved to https://wiki.apache.org/incubator/SkyWalkingProposal . We will work on that, and post our formal proposal soon.


spaces added in f-strings

snakefmt 0.10.0 re-formats f-strings that are originally like this:
print(f"{x=}")

to be like this:
print(f"{x =}")

I don't think this is intended, is it?

This is essentially a duplicate of #220. I'll close this in favour of that issue and you can follow along there


MailCrab always proceeds AUTH PLAIN even though ENABLE_TLS_AUTH is not set

I just discovered the app today, and thanks a lot for this awesome tiny app! The UI looks so nice and clean, and it even has dark mode which is just :rocket:.
However, when I'm using it as a replacement for MailCatcher, I cannot receive any email from my app. When launching MailCrab with RUST_LOG=debug to find the pitfall, I found that the backend always got Sending: 503 Bad sequence of commands after Received: AUTH PLAIN AAA=.
When I set ENABLE_TLS_AUTH=true, my app just hangs and on the backend side of MailCrab nothing is logged after the message Connection from <IP_ADDRESS>:{random port} (just like when running the curl command without -k --ssl-reqd options).
Therefore, I think my app just doesn't have a proper SSL authentication in the development environment, and as MailCrab always proceeds AUTH PLAIN no matter ENABLE_TLS_AUTH is set or not, I cannot see any email from my app.
The key thing here is that I'm running MailCatcher/MailCrab mostly in a development environment, so I think it should be better to just ignore the AUTH PLAIN header, right? Both MailCatcher and MailHog seem to be doing it as they can receive my app emails normally (just that their UI is meh...).

How are you connecting to MailCrab - which SMTP parameters are configured in your app?
Maybe your app tries to upgrade a plain SMTP connection to TLS using STARTTLS, which we do not support (in fact, I want to discourage people from using STARTTLS given the security implications).
In that case you just have to change your SMTP parameters in your app for development.
MailCrab ignores any client authentication, it will accept and proceed any username password, but you can also just omit them in you SMTP parameters.

Thanks for taking a look at this issue.
My app is using Rails 6, and yes, there is a config to use STARTTLS (enable_starttls_auto: true in their docs). However, I also initialized a plain new Rails 6 project and used the identical config and MailCrab was receiving the emails very fine.
As I said, the only difference is that somehow my app emails contain a line AUTH PLAIN AAA= while the plain new Rails project's don't.

My app is quite large already and I'm not sure how to remove that line when sending emails in development environment...

After diving into the MailCrab codebase, I found that the SMTP library maillin parses the AUTH PLAIN line and then handles it in the HelloAuth struct. However, since StateMachine.allow_auth_plain needs both StateMachine.auth_plain and StateMachine.tls to be set correctly (i.e. ENABLE_TLS_AUTH=true)
=> no pattern is matched within allow_auth_plain function
=> default_handler is called with Cmd::AuthPlain
=> unhandled is called
=>  BAD_SEQUENCE_COMMANDS response is returned eventually
In the handle_steam function of MailCrab, even though response.action is still Action::Reply, somehow stream cannot read anything more after processing the line. Not sure whats going on here since stream is from Tokio and is separated from maillin...
But the most interesting thing is that when I tried editing the default_handler function of mailin to handle Cmd::AuthPlain just like Cmd::Noop, everything is working normally and my app emails are received by MailCrab without losing a single bit!
So now I can confirm the root cause is from maillin, I'm not sure whether I should raise this to the library author or suggest MailCrab to tackle this.
From my point of view:

maillin is like a standard SMTP server library which means making AUTH PLAIN lines become Noop might not be a good idea.
Whereas MailCrab is an email test server, it should be better to just ignore or at least provide an option to ignore the irrelevant lines.

Thank you @cuongvuong-phoenix for your thorough analysis!
So I think for mailin it is required to call with_authentication() (https://github.com/tweedegolf/mailcrab/blob/main/backend/src/smtp/mod.rs#L25) in order to accept the AUTH command. That is why authentication is accepted only when TLS is enabled. I will make a fix for that!

As you stated mailin explicitly forbids authentication when TLS is not enabled. This seems reasonable to me, since any credentials would be sent in plaintext if TLS is not enabled. This would be possibly disastrous in a production environment, since credentials could be leaked this way.
MailCrab is intended for a test environment, but not allowing sending encrypted credentials might help users to not make this mistake production. Also in a test setting sending credentials this way would not make much sense.
So for now, MailCrab only supports one of the following:

SMTP without TLS or authentication
SMTP over TLS with PLAIN or LOGIN authentication

The LOGIN authentication variant was added to mailin recently, so I will also enable this in MailCrab (see #118)
Thanks again for your deep dive into this issue. I will consider writing a custom SMTP parser in the future.


Powered Lights causing major TPS issues

I had built a 39x39x6 base on my server.  Lit it up with 81 powered lights, spaced evenly with 3 blocks in between each light.  When I started server today, I kept getting massive 13 second lag spikes, and the server was skipping up to 300 ticks.  Server was outputting the "Server cannot keep up" warning.  I removed all of the powered lights and it went from constantly skipping 300 ticks to skipping only about 50 occasionally.

Which EnderIO version? The powered lights have been reworked in the 2.3 beta.

Ah, alright thanks. I had been using 2.2.8 version that is provided with FTB Infinity.  I'll be sure to update it.  Thanks.  If I still have any issues, i'll be sure to give an update.


AbstractAssert breaks type enforcement of Assert's parameters

Interface Assert defines methods with a generic parameter:
public interface Assert<S, A> extends Descriptable<S>, ExtensionPoints<S, A> {
    S isEqualTo(A expected);

However its basic implementation AbstractAssert breaks this type enforcement by implementing those methods with Object parameter:
AbstractAssert<S extends AbstractAssert<S, A>, A> implements Assert<S, A> {
    @Override
    public S isEqualTo(Object expected) {

In this Stack overflow thread, you mentioned the flexibility it brings, but it's actually  preventing anyone to extends AbstractAssert and to override methods from Assert.
Of course the custom assert can define its own assertion method. For example:
public class MyClassAssert extends AbstractAssert<MyClassAssert, MyClass>{
    public MyClassAssert isEqualToWithType(MyClass expected){

But the name has to be different and will be hard to see among the dozens of standard methods already provided by AbstractAssert.
I tried to directly implement Assert but then I loose all the benefits of AssertJ implementations (clear failure messages for example)

It was a deliberate decision to make isEqualTo taking an Object parameter, changing that to use a generic type would break the API compatibility.
I want to keep the flexibility mentioned in the SO thread, but it does not prevent you to override isEqualToif you want to change the behavior, you just can't use a generic parameter.

Indeed I can override isEqualTo if I quit using generic types on my custom assertion.
I'll do something like that as I understand the API won't change:
public class MyClassAssert extends AbstractAssert<MyClassAssert, Object>{
    @Override
    public CalcFeeAssert isEqualTo(Object expected){
        assertThat(expected).isInstanceOf(CalcFee.class);
        // ... some custom assertions
     }

A question about the interface though:
Why does method Assert.isEqualTo() (among others) use a generic parameter if it is always hidden behind implementations using Object?

It's legacy of fest-assert the project AssertJ comes from.
I'm closing this issue asa we won't change isEqualTo.