RuntimeError in DeviseTokenAuth::OmniauthCallbacksController#omniauth_success on google_oauth2 login

.rvm/gems/ruby-2.2.2/gems/devise_token_auth-0.1.42
.rvm/gems/ruby-2.2.2/gems/omniauth-google-oauth2-0.5.0
i'm using angular2-token

Following is the error facing while login with google

`Processing by DeviseTokenAuth::OmniauthCallbacksController#omniauth_success as HTML
Parameters: {"state"=>"976a7db99948496ccb2d5b309233a07eaaf01d5e8f146eed", "code"=>"4/5eV4wYYnqfRlbBpFrlvHVBkuTTQvnvEyk2WPf95MCD4", "provider"=>"google_oauth2"}
Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms)
RuntimeError (No resource_class found):
devise_token_auth (0.1.42) app/controllers/devise_token_auth/omniauth_callbacks_controller.rb:109:in resource_class' devise_token_auth (0.1.42) app/controllers/devise_token_auth/omniauth_callbacks_controller.rb:237:in get_resource_from_auth_hash'
devise_token_auth (0.1.42) app/controllers/devise_token_auth/omniauth_callbacks_controller.rb:29:in omniauth_success' actionpack (5.1.1) lib/action_controller/metal/basic_implicit_render.rb:4:in send_action'
actionpack (5.1.1) lib/abstract_controller/base.rb:186:in process_action' actionpack (5.1.1) lib/action_controller/metal/rendering.rb:30:in process_action'
actionpack (5.1.1) lib/abstract_controller/callbacks.rb:20:in block in process_action' activesupport (5.1.1) lib/active_support/callbacks.rb:131:in run_callbacks'
actionpack (5.1.1) lib/abstract_controller/callbacks.rb:19:in process_action' actionpack (5.1.1) lib/action_controller/metal/rescue.rb:20:in process_action'
actionpack (5.1.1) lib/action_controller/metal/instrumentation.rb:32:in block in process_action' activesupport (5.1.1) lib/active_support/notifications.rb:166:in block in instrument'
activesupport (5.1.1) lib/active_support/notifications/instrumenter.rb:21:in instrument' activesupport (5.1.1) lib/active_support/notifications.rb:166:in instrument'
actionpack (5.1.1) lib/action_controller/metal/instrumentation.rb:30:in process_action' actionpack (5.1.1) lib/action_controller/metal/params_wrapper.rb:252:in process_action'
activerecord (5.1.1) lib/active_record/railties/controller_runtime.rb:22:in process_action' actionpack (5.1.1) lib/abstract_controller/base.rb:124:in process'
actionview (5.1.1) lib/action_view/rendering.rb:30:in process' actionpack (5.1.1) lib/action_controller/metal.rb:189:in dispatch'
actionpack (5.1.1) lib/action_controller/metal.rb:253:in dispatch' actionpack (5.1.1) lib/action_dispatch/routing/route_set.rb:49:in dispatch'
actionpack (5.1.1) lib/action_dispatch/routing/route_set.rb:31:in serve' actionpack (5.1.1) lib/action_dispatch/routing/mapper.rb:16:in block in class:Constraints'
actionpack (5.1.1) lib/action_dispatch/routing/mapper.rb:46:in call' actionpack (5.1.1) lib/action_dispatch/routing/mapper.rb:46:in serve'
actionpack (5.1.1) lib/action_dispatch/journey/router.rb:46:in block in serve' actionpack (5.1.1) lib/action_dispatch/journey/router.rb:33:in each'
actionpack (5.1.1) lib/action_dispatch/journey/router.rb:33:in serve' actionpack (5.1.1) lib/action_dispatch/routing/route_set.rb:832:in call'
omniauth (1.6.1) lib/omniauth/strategy.rb:189:in call!' omniauth (1.6.1) lib/omniauth/strategy.rb:167:in call'
omniauth (1.6.1) lib/omniauth/strategy.rb:407:in call_app!' omniauth (1.6.1) lib/omniauth/strategy.rb:361:in callback_phase'
omniauth-oauth2 (1.4.0) lib/omniauth/strategies/oauth2.rb:75:in callback_phase' omniauth (1.6.1) lib/omniauth/strategy.rb:230:in callback_call'
omniauth (1.6.1) lib/omniauth/strategy.rb:187:in call!' omniauth (1.6.1) lib/omniauth/strategy.rb:167:in call'
omniauth (1.6.1) lib/omniauth/builder.rb:63:in call' rack (2.0.3) lib/rack/session/abstract/id.rb:232:in context'
rack (2.0.3) lib/rack/session/abstract/id.rb:226:in call' warden (1.2.7) lib/warden/manager.rb:36:in block in call'
warden (1.2.7) lib/warden/manager.rb:35:in catch' warden (1.2.7) lib/warden/manager.rb:35:in call'
rack (2.0.3) lib/rack/etag.rb:25:in call' rack (2.0.3) lib/rack/conditional_get.rb:25:in call'
rack (2.0.3) lib/rack/head.rb:12:in call' activerecord (5.1.1) lib/active_record/migration.rb:556:in call'
actionpack (5.1.1) lib/action_dispatch/middleware/callbacks.rb:26:in block in call' activesupport (5.1.1) lib/active_support/callbacks.rb:97:in run_callbacks'
actionpack (5.1.1) lib/action_dispatch/middleware/callbacks.rb:24:in call' actionpack (5.1.1) lib/action_dispatch/middleware/executor.rb:12:in call'
actionpack (5.1.1) lib/action_dispatch/middleware/debug_exceptions.rb:59:in call' actionpack (5.1.1) lib/action_dispatch/middleware/show_exceptions.rb:31:in call'
railties (5.1.1) lib/rails/rack/logger.rb:36:in call_app' railties (5.1.1) lib/rails/rack/logger.rb:24:in block in call'
activesupport (5.1.1) lib/active_support/tagged_logging.rb:69:in block in tagged' activesupport (5.1.1) lib/active_support/tagged_logging.rb:26:in tagged'
activesupport (5.1.1) lib/active_support/tagged_logging.rb:69:in tagged' railties (5.1.1) lib/rails/rack/logger.rb:24:in call'
actionpack (5.1.1) lib/action_dispatch/middleware/remote_ip.rb:79:in call' actionpack (5.1.1) lib/action_dispatch/middleware/request_id.rb:25:in call'
rack (2.0.3) lib/rack/runtime.rb:22:in call' activesupport (5.1.1) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in call'
actionpack (5.1.1) lib/action_dispatch/middleware/executor.rb:12:in call' actionpack (5.1.1) lib/action_dispatch/middleware/static.rb:125:in call'
rack (2.0.3) lib/rack/sendfile.rb:111:in call' rack-cors (0.4.1) lib/rack/cors.rb:81:in call'
railties (5.1.1) lib/rails/engine.rb:522:in call' puma (3.9.1) lib/puma/configuration.rb:224:in call'
puma (3.9.1) lib/puma/server.rb:602:in handle_request' puma (3.9.1) lib/puma/server.rb:435:in process_client'
puma (3.9.1) lib/puma/server.rb:299:in block in run' puma (3.9.1) lib/puma/thread_pool.rb:120:in call'
puma (3.9.1) lib/puma/thread_pool.rb:120:in block in spawn_thread'

I have the same issue, using Angular 1 front end and ng-token-auth
", "provider"=>"google_oauth2"}
Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms)

RuntimeError (No resource_class found):

devise_token_auth (0.1.42) app/controllers/devise_token_auth/omniauth_callbacks_controller.rb:109:in `resource_class'
devise_token_auth (0.1.42) app/controllers/devise_token_auth/concerns/set_user_by_token.rb:21:in `set_user_by_token'
devise_token_auth (0.1.42) lib/devise_token_auth/controllers/helpers.rb:123:in `current_user'
devise_token_auth (0.1.42) lib/devise_token_auth/controllers/helpers.rb:111:in `authenticate_user!'

maybe related issue I've just posted #910

I got the same issue on my current project.
After searching around without any solutions, I decided to use omniauth strategies with devise  only, by following this wiki. Then, generate tokens and add them to response headers.

Thanks!
there are lots of issues in this,so I'm thinking of using only devise without devise_token_auth.

Sadly going to close this for now. Hopefully we can meet your needs better in the future!

Same issue and i can not find solution. Is there any solution for this?

@jameseggers it is not working. I am sadly seeking solutions for this issue.

To what controller did you add it, @Thananjaya ?

@jameseggers ApplicationController Sir

@Thananjaya  protect_from_forgery does not exist when you intherits from ActionController::API. Only from ActionController::Base
If you are building an Rails API app it is probably not the way to implement it

Started POST "/omniauth/facebook/callback" for <IP_ADDRESS> at 2019-03-12 13:26:08 +0530
Processing by DeviseTokenAuth::OmniauthCallbacksController#redirect_callbacks as */*
  Parameters: {"provider"=>"facebook"}
Completed 500 Internal Server Error in 0ms (ActiveRecord: 0.0ms)

RuntimeError (No resource_class found):

app/controllers/application_controller.rb:6:in `configure_permitted_parameters'

Now my configure_permitted_parameters are defined and needed during /auth/ .
How do i overcome this? Is their a workaround for this?
Is it still an issue which has not been resolved?

This doesn't become a solution to the root of the problem, but as a quick-fix I override DeviseTokenAuth::OmniauthCallbacksController like this:
# Based on: https://github.com/lynndylanhurley/devise_token_auth/blob/v1.1.2/app/controllers/devise_token_auth/omniauth_callbacks_controller.rb

class Api::V1::OmniauthCallbacksController < DeviseTokenAuth::OmniauthCallbacksController
  include Devise::Controllers::Rememberable

  def omniauth_success
    get_resource_from_auth_hash
    set_token_on_resource
    create_auth_params

    if resource_class.devise_modules.include?(:confirmable)
      # don't send confirmation email!!!
      @resource.skip_confirmation!
    end

    # ================================================
    # Update here to Model Class
    # from :
    #      sign_in(:user, @resource, store: false, bypass: false)
    # to:
    sign_in(:traveler, @resource, store: false, bypass: false)

    @resource.save!

    yield @resource if block_given?

    render_data_or_redirect('deliverCredentials', @auth_params.as_json, @resource.as_json)

  end

  protected
  def get_resource_from_auth_hash
    # find or create user by provider and provider uid

    # ================================================
    # Update here to Model Class
    # from :
    #    @resource = resource_class.where(
    # to:
    @resource = Traveler.where({
      uid:      auth_hash['uid'],
      provider: auth_hash['provider']
    }).first_or_initialize

    if @resource.new_record?
      handle_new_resource
    end

    # sync user info with provider, update/generate auth token
    assign_provider_attrs(@resource, auth_hash)

    # assign any additional (whitelisted) attributes
    if assign_whitelisted_params?
      extra_params = whitelisted_params
      @resource.assign_attributes(extra_params) if extra_params
    end

    @resource
  end

end

Also needed to update config/routes.rb like this:
Rails.application.routes.draw do
   # ================================================
   # Enable custom controller
   # from :
   #   mount_devise_token_auth_for 'Traveler', at: 'traveler'
   # to:
   mount_devise_token_auth_for 'Traveler', at: 'traveler', controllers: { omniauth_callbacks: "api/v1/omniauth_callbacks" }
end

why is this closed? any solution?


download from watch.travelchannel not working

Checklist

[x] I'm reporting a broken site support
[x] I've verified that I'm running youtube-dl version 2020.06.06
[x] I've checked that all provided URLs are alive and playable in a browser
[x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[x] I've searched the bugtracker for similar issues including closed ones

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://watch.travelchannel.com/tv-shows/ghost-nation/full-episodes/a-nightmare-in-the-nursery']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.06.06
[debug] Python version 2.7.16 (CPython) - Darwin-19.4.0-x86_64-i386-64bit
[debug] exe versions: avconv 12.3, avprobe 12.3, ffmpeg 4.2.3, ffprobe 4.2.3, rtmpdump 2.4
[debug] Proxy map: {}
[Discovery] a-nightmare-in-the-nursery: Downloading token JSON metadata
[Discovery] a-nightmare-in-the-nursery: Downloading content JSON metadata
[Discovery] a-nightmare-in-the-nursery: Downloading streaming JSON metadata
ERROR: This video is only available via cable service provider subscription that is not currently supported. You may want to use --cookies.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/discovery.py", line 104, in _real_extract
    display_id, 'Downloading streaming JSON metadata', headers=headers)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 892, in _download_json
    expected_status=expected_status)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 870, in _download_json_handle
    expected_status=expected_status)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 660, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query, expected_status=expected_status)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 645, in _request_webpage
    raise ExtractorError(errmsg, sys.exc_info()[2], cause=err)
ExtractorError: Unable to download JSON metadata: HTTP Error 403: Forbidden (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/discovery.py", line 114, in _real_extract
    ' is not currently supported. You may want to use --cookies.', expected=True)
ExtractorError: This video is only available via cable service provider subscription that is not currently supported. You may want to use --cookies.

Description

I am not able to download the video from this link
https://watch.travelchannel.com/tv-shows/ghost-nation/full-episodes/a-nightmare-in-the-nursery
or any other video after watching/downloading one already.
I am working on a Mac.
The first one worked fine with youtube-dl.
youtube-dl tells me to use --cookies but that didn't work either.

URL no longer valid


Unrecognized font family "FontAwesome"

I've used this library before and it worked fine, but then I upgraded to React Native 0.17 and now I'm getting this error. Any help appreciated.

Are you on Android?
I had an issue with the folder name having a lowercase "f", so I had to change to upper.  Try switching the case.

Are you on Android?
I had an issue with the folder name having a lowercase "f", so I had to change to upper.  Try switching the case.

I think that's an iOS error. Did you run react-native upgrade? That might overwrite Info.plist etc, so go through the steps of adding the icon fonts again.

I think that's an iOS error. Did you run react-native upgrade? That might overwrite Info.plist etc, so go through the steps of adding the icon fonts again.

Closing due to inactivity.


Category disabled still shows up in menus

Expected Behaviour
After making a category unavailable, it should disappear from the site with all products linked to it
Actual behaviour
After making a category unavailable, it remains perfectly visible on the site, not hiding it from the site
Reproduce steps

Create a new category with several menu items assigned to it

Make the category unavailable

The category is not disabled by the site (not even its child category) and all the products connected to it are available and can be ordered

The only effect is that, disabling the category, it disappears from the list on the left of the site

This patch might be related, the category disappears from the category and menu list but any item attached to the category is still listed. I think we can work with that for now.


Focus readme files only when preview pane is open

Resolved / Related Issues
-
Details of Changes
A readme file will be selected only when preview pane is opened.
Validation
How did you test these changes?

[x] Built and ran the app

May not be caused by this PR, but if another item contains the term readme, it will be selected instead of readme.md on navigated. Eg, a folder named readme_assets will be selected instead of readme.md.


Retired characteristic names - corrected for WQX data but not USGS data

Describe the bug
There are several characteristic names existing in WQX-submitted data that have been retired in favor of more concise or clearer names. These characteristic names are denoted by [old name]retired use [new name], and have the corrected target name (new name) in the WQX QAQC validation table. The TADA team recently created a new function that automatically substitutes the target name into the TADA.CharacteristicName field. However, I noticed that USGS data may still carry the old name, and without the retired use [new name] suffix in the CharacteristicName field, they do not join to the WQX QAQC validation table and thus do not get corrected.
To Reproduce
I found this issue with the characteristic names: Inorganic nitrogen (nitrate and nitrite) and Inorganic nitrogen (nitrate and nitrite) retireduse Nitrate + Nitrite
Code to reproduce the behavior:
library(TADA)

test = TADA_DataRetrieval(startDate = "2022-10-01", statecode = "OR")
test = subset(test, grepl("Inorganic nitrogen",test$CharacteristicName))
unique(test$CharacteristicName)
unique(test$TADA.CharacteristicName)

Expected behavior
All of the results in the example above should be converted to TADA.CharacteristicName "NITRATE + NITRITE" for data harmonization purposes.
Reminders for TADA contributors addressing this issue
New features should include all of the following work:

[ ] Create the function/code.

[ ] Document all code using comments to describe what is does.

[ ] Create tests in tests folder.

[ ] Create help file using roxygen2 above code.

[ ] Create working examples in help file (via roxygen2).

[ ] Add to appropriate vignette (or create new one).

Proposed solution: Use WQX characteristic domain table to identify retired characteristics, grepl everything before the retired characters, and join to NWIS data to convert NWIS characteristics to current WQX characteristic structures. This would happen in autoclean.

I'd like to work on this issue.

This solution does work (tried on the OR example above as well as with random state and national datasets), but I am not sure if it is similar to what you had in mind originally. I used TADA_GetCharacteristicRef() to create a data frame and then filter for "retired" CharacteristicNames and then modified them to be compatible with the NWIS names. These additional CharacteristicName options can then be joined to the original ref.table of deprecated CharacteristicNames.
read in characteristic reference table with deprecation information, filter to deprecated terms and for "retired" in CharactersticName.
remove all characters after first "*" in CharacteristicName and remove any leading or trailing white space to make compatible with deprecated NWIS CharactersticName.
nwis.table <- TADA_GetCharacteristicRef() %>%
dplyr::filter(
Char_Flag == "Deprecated",
grepl("retired", CharacteristicName)
) %>%
dplyr::mutate(CharacteristicName = trimws(stringr::str_split(CharacteristicName, "\*", simplify = T)[, 1]))
read in characteristic reference table with deprecation information and filter to deprecated terms.
join with deprecated NWIS CharacteristicName data.frame.
ref.table <- TADA_GetCharacteristicRef() %>%
dplyr::filter(Char_Flag == "Deprecated") %>%
full_join(nwis.table)
rm(nwis.table)

This solution makes sense to me. When you are ready you can create a pull request and then I can review and test the code before we merge it in. Happy to walk though this process together on our call later this week.


ApiVersionMapping Flags

Hi,
The ApiVersionMapping enum gets used with bitwise logic.
Should it be marked as [Flags]?
Cheers,
Josh

This was a really interesting design decision, which arguably doesn't have a perfect answer. There are only a handful of scenarios where you might ask for both implicit and explicit mappings. Most, if not all, of those touch points are abstracted away with extension methods or other components such as the API Explorer. If we were only considering how you ask for an API model to be populated, you'd be 100% correct.
The inverse of this scenario is that you can ask how an API version is mapped a la the MappingTo extension method which returns the same ApiVersionMapping enumeration. The code analysis rules state that a bitwise enumeration should be plural (e.g. ApiVersionMappings). Ultimately, the real reason that it's not a bitwise enumeration though is that it would not make any sense in this context. An API version cannot be mapped explicitly and implicitly at the same time. Every API version is mapped explicitly, implicitly, or not at all (e.g. None).
This put things in an interesting place because the enumeration values are the same, but on the way in there is a scenario for them to be bitwise and on the way out there isn't. An alternate solution would have been to have two enumerations, but that seemed like overkill. Since there will only ever be these 3 values I decided to go ahead without making the enumeration bitwise. I also assumed that testing how an API version is mapped would be more prevalent than asking for the model itself. .NET doesn't perform much validation on enumerations, so I errored on what I thought would be the proverbial 80%.
I'm not sure it's truly needed, but I'm open to hear arguments about why this should be a bitwise enumeration. I hope that clarifies things.

Thanks for the detailed (and speedy) explanation :)
I guess it should technically be two enums, possibly with mapping between them but I agree that it would be overkill here, and if done now it would be a breaking change with very little benefit.
I'd stumbled across this because we're doing a logical OR on the enum in our code & resharper was warning about it. I'll just add a link to this issue and otherwise leave everything as-is 👍


Cannot join a management node to an existing cluster

Steps to reproduce:

install by iso and join to an existing cluster as a management node
As a result, the node does not join after installation.

Other details:
The latest K3OS embeds K3S v1.18.9, and embedded etcd HA is available as of K3S v1.19.1.

I saw the node name for the management node is harvester-1 while additional nodes are harvester-<uuid>. Maybe the duplicate name is the issue.

close in favor of https://github.com/rancher/harvester/issues/252 as the node management will be auto managed by the harvester controller.


Combine all modified and deleted files that been compressed to the prompt

Description
Add two sections to the the prompt:

More Modified files: all modified file that been compressed into one list
Deleted file: all deleted files into one list

The final PR will have this format :
[PATCH 1]
[PATCH 2]

More modified files:
file_path_3
file_path_5

Deleted files:
file_path_4

instead of:
[PATCH 1]
## file_path_3

File was modified

[PATCH 2]

## file_path_4

File was deleted

## file_path_5

File was modified

All tests pass

@CodiumAI-Agent

Preparing review...

PR Analysis

🎯 Main theme: Refactoring the way modified and deleted files are presented in the PR
🔍 Description and title: Yes
📌 Type of PR: Refactoring
🧪 Relevant tests added: Yes
✨ Minimal and focused: Yes, the PR is focused on changing the presentation of modified and deleted files in the PR
🔒 Security concerns: No, the PR does not introduce possible security concerns or issues.

PR Feedback

💡 General PR suggestions: The PR is well-structured and follows good practices. The changes are focused and relevant. The use of constants for the strings is a good practice. However, it would be better to use more descriptive variable names for better code readability.

🤖 Code suggestions:

relevant file: pr_agent/algo/pr_processing.py
suggestion content: Consider renaming the variables 'modified_files' and 'deleted_files' to 'modified_file_names' and 'deleted_file_names' respectively, to better reflect their content. [medium]

relevant file: pr_agent/algo/pr_processing.py
suggestion content: Consider adding a comment explaining the logic behind the token counting for the 'modified_files' and 'deleted_files' lists. This would improve code readability and maintainability. [medium]

relevant file: pr_agent/algo/pr_processing.py
suggestion content: Consider refactoring the 'pr_generate_compressed_diff' function to reduce its complexity and improve readability. You could extract the logic for handling modified and deleted files into separate functions. [important]

relevant file: pr_agent/algo/pr_processing.py
suggestion content: Consider adding type hints to the return value of the 'pr_generate_compressed_diff' function to improve code readability and maintainability. [medium]

How to use

Tag me in a comment '@CodiumAI-Agent' to ask for a new review after you update the PR.
You can also tag me and ask any question, for example '@CodiumAI-Agent is the PR ready for merge?'

@CodiumAI-Agent summerize me the PR, in 4 bullet points

Preparing answer...

Question: summerize me the PR, in 4 bullet points
Answer:

The PR introduces a new format for the final PR, where all modified and deleted files are compressed into separate lists. This is a change from the previous format where each file was listed individually with its status (modified or deleted).
The handle_patch_deletions function has been updated to return None instead of the string "File was deleted" when a file has been deleted.
The get_pr_diff and pr_generate_compressed_diff functions have been updated to handle the new format, including the addition of modified_file_names and deleted_file_names lists.
The PR also includes updates to the unit tests to reflect these changes, and a new test file test_language_handler.py has been added.

@CodiumAI-Agent  summerize the PR, in 3 bullet points. add small code snippet to explain each one

Preparing answer...

Question: summerize the PR, in 3 bullet points. add small code snippet to explain each one
Answer:

The PR modifies the way deleted files are handled. Instead of appending a string "File was deleted\n" to the patch, it now sets the patch to None. This change is made to facilitate the new way of listing deleted files separately in the final PR format.
if not new_file_content_str:
    patch = None # file was deleted

The PR modifies the get_pr_diff and pr_generate_compressed_diff functions in pr_processing.py to generate lists of modified and deleted files. These lists are then appended to the final diff string in a new format, where all modified and deleted files are listed under separate headers.
patches_compressed, modified_file_names, deleted_file_names = pr_generate_compressed_diff(pr_languages, token_handler)
final_diff = "\n".join(patches_compressed)
if modified_file_names:
    modified_list_str = MORE_MODIFIED_FILES_ + "\n".join(modified_file_names)
    final_diff = final_diff + "\n\n" + modified_list_str
if deleted_file_names:
    deleted_list_str = DELETED_FILES_ + "\n".join(deleted_file_names)
    final_diff = final_diff + "\n\n" + deleted_list_str
return final_diff

The PR includes new unit tests for the sort_files_by_main_languages function in test_language_handler.py. These tests cover different scenarios to ensure the function behaves as expected.
class TestSortFilesByMainLanguages:
    def test_happy_path_sort_files_by_main_languages(self):
        ...
        assert sort_files_by_main_languages(languages, files) == expected_output

Generating PR code suggestions
Work in progress ...

Generating PR code suggestions
Work in progress ...

Generating PR code suggestions
Work in progress ...

Generating PR code suggestions
Work in progress ...

Preparing PR description...

PR Description updated to latest commit (https://github.com/Codium-ai/pr-agent/commit/ff720d32fe0a6bc1422de27162f9b5ca5d90cd97)

[ ] Copy walkthrough table to "Files Changed" Tab


Installing tries to install ember-cli-font-awesome which breaks

When I try to install this it tries adds ember-cli-font-awesome to my package.json file, when then breaks.  Shouldn't it just be using ember-font-awesome instead?  How can I install this without the ember-cli-font-awesome?
Thanks,

Yes, sorry, not sure how that was missed. Although I would have expected the install to still work, ember-font-awesome was renamed from ember-cli-font-awesome before version 2 of that addon.


fix: Camera state management

Yet another fix for the camera + some further extractions

Thanks for your review @monsieurtanuki, applied your suggestions

Yet another fix for the camera + some further extractions

What does it fix ?

Yet another fix for the camera + some further extractions

What does it fix?

There were some minor problems with disposing of the camera.
When going to another page or closing the camera it only stopped the image stream and not disposed the camera so for the system it was still active. (This is what caused #982)
The extraction part is just moving the life cycle management into its own widget.
Before:
ScanPage
-ML
--Overlay+life cycle
-QR Scanner
--Overlay+life cycle
Now:
ScanPage
-Overlay
-ML
--life cycle
-QR Scanner
--life cycle
The life cycle has to be below the scanners since we pass the stop and start methods.

Thanks for your review @jasmeet0817 and @monsieurtanuki you are right some renaming and commenting would be useful.
I, unfortunately, can't work on it until Monday if anyone of you wants to add those things feel free to do so that we can try the changes a bit faster.


[CDN] Property defined as non-nullable but the service return it as null

In the cdn swagger definition, there are some properties which are not marked as nullable, but the service will return these properties as null.
One example:
Api definition: https://github.com/Azure/azure-rest-api-specs/blob/2cd7c6eacc5430d8956885e8d19b87ce3f3ebd6e/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-09-01/cdn.json#L2699
Test: https://github.com/Yao725/azure-sdk-for-net/blob/feature/mgmt-track2-cdn/sdk/cdn/Azure.ResourceManager.Cdn/tests/SessionRecords/EndpointContainerTests/CreateOrUpdate().json#L2487

Close, will talk to service team.


Frontend changes to support ACS population schema changes

See https://github.com/SatcherInstitute/health-equity-tracker/issues/339 for context. race_and_ethnicity is changing to race and another column that indicates whether it includes hispanic/latino.
The frontend relies on the race_and_ethnicity column in a number of places. We will either need to do an audit of usages or generate a race_and_ethnicity column to continue using.

Dupe of #307


refs with IPLD: yml or json or toml file

once IPLD lands, we can keep the whole refs dag in one (or a collection of) config files. and we can use json, yml, toml as source:
a valid refs.ipfs.io source file:
---
# this is the src file for refs.ipfs.io

lists:
  denylists:
    dmca: {mlink: <ref-for-dmca>}

# solarnet is the ipfs cluster running bootstrap + gateway (ipfs.io) nodes.
solarnet:
  motd: {mlink: /ipfs/<ref-for-motd>}
  bootstrap: {mlink: <ref-for-bootstrap-list>}
  gateway: {mlink: <ref-for-gateways-list>}

IPLD will make it so you can just do this:
refshash=$(ipfs object put --enc yml refs.yml)
dnslink-deploy <args> dnslink=$refshash

\o/

Oh this is just lovely <3

@davidar you'll like that o/

@jbenet :D
I'd still like motd: !mlink /ipfs/<ref-for-motd>, but I won't push my luck :p


Include punctuation from 245 subfield $h

We don't want to include the full contents of $h (it's a legacy field), but we would like to include any punctuation at the end.
See this Slack thread for context: https://wellcome.slack.com/archives/C8X9YKM5X/p1636454727037400

Nic: "the punctuation belongs to the subfield in front (so : before |b rather than any relation to |h. It's just [format] in that subfield that we don't want to surface, i.e.:
Ethics & medicine|h[electronic resource] :|ba Christian perspective on issues in bioethics."

@alexwlchan Can this be closed now? It looks like the record https://wellcomecollection.org/works/kgrnmm9m is updated "Ethics & medicine : a Christian perspective on issues in bioethics." although the PR above is still open?

@pollecuttn No, I found an issue with the rule – we need to omit punctuation if it's the last thing, e.g. the trailing period on https://wellcomecollection.org/works/kf8mzy3p. That's fixed by the PR above, which is awaiting review.

@alexwlchan After today's reindex I can see that the trailing full stop has gone from https://wellcomecollection.org/works/kf8mzy3p.
Can this be closed now?

Yes!


vcpkg install blocks for minutes in Windows 19041

Describe the bug
I just updated my machine to the Insider release preview ring and now vcpkg takes several minutes at Building package $PACKAGE[core]:$CONFIG... for no reason
Environment

OS: Windows 10 19041.207
Compiler: Visual Studio 16.6.0 Preview 3

To Reproduce
Steps to reproduce the behavior:

./vcpkg install discord-rpc --debug (using that package as an example but happens for every package)
See vcpkg block at Building package discord-rpc[core]:x64-windows... for several minutes
Once it unblocks, see the extremely long time it took in cmd_execute_and_stream_data

Expected behavior
Install proceeds without blocking.
Failure logs
[DEBUG] Using vcpkg-root: T:\Projects\vcpkg
Computing installation plan...
[DEBUG] Found path: C:\Program Files\CMake\bin\cmake.exe
[DEBUG] CreateProcessW("C:\Program Files\CMake\bin\cmake.exe" --version)
[DEBUG] cmd_execute_and_stream_data() returned 0 after    17972 us
[DEBUG] CreateProcessW("C:\Program Files\CMake\bin\cmake.exe"  -P "T:/Projects/vcpkg/buildtrees/0.vcpkg_tags.cmake")
[DEBUG] cmd_execute_and_stream_data() returned 0 after    13951 us
The following packages will be built and installed:
    discord-rpc[core]:x64-windows
[DEBUG] <abientries>
[DEBUG] rapidjson|e19f4592ed0c708ae9c7de38f0915fecadabbc47
[DEBUG] CONTROL|1c796d7b13fa5c12af6b823c6bf85dea2f1a0e54
[DEBUG] disable-downloading.patch|a9f8d114b7f2f8251d82b6b0d5c8300ab2bb9f23
[DEBUG] portfile.cmake|e5547e25c873f313baa36d157968429a912055f0
[DEBUG] cmake|3.17.1
[DEBUG] powershell|ab1effc926b000a6adc12198a1886514ec203621a53b0cd7ec1cd9a8225dccda7e857feaabcfba4004bea73129b986abaad777c4573f44e0af70411226ce08b0
[DEBUG] vcpkg_fixup_cmake_targets|dac334f3bf50b8262be92623168023aa565aa729
[DEBUG] post_build_checks|2
[DEBUG] triplet|3eab5c64d9cf628fc0aec277fde66dbdc69b8516
[DEBUG] features|core
[DEBUG] </abientries>
Starting package 1/1: discord-rpc:x64-windows
Building package discord-rpc[core]:x64-windows...
[DEBUG] CreateProcessW("C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -all -prerelease -legacy -products * -format xml)
[DEBUG] cmd_execute_and_stream_data() returned 0 after    15214 us
[DEBUG] Found path: C:\Program Files\Git\cmd\git.exe
[DEBUG] CreateProcessW("T:\Projects\vcpkg\downloads\tools\git-2.25.1-1-windows\mingw32\bin\git.exe" --version)
[DEBUG] cmd_execute_and_stream_data() returned 0 after    12145 us
[DEBUG] CreateProcessW(cmd /c ""C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Auxiliary\Build\vcvarsall.bat" -vcvars_ver=14.2 amd64   2>&1 <NUL" & echo cdARN4xjKueKScMy9C6H& set)
[DEBUG] cmd_execute_and_stream_data() returned 0 after 201462459 us
...

Additional context
After injecting a debugger, it seems that the following line blocks:
https://github.com/microsoft/vcpkg/blob/b6cd6ca0ba71667e46610e3ecdf5de0cef043ef5/toolsrc/src/vcpkg/base/system.process.cpp#L407
Manually running vcvarsall.bat does not result in such long times.

duplicate of #10468

My bad, missed that.


rpmodels

A bunch of rock physics models, all written from scratch from invididual papers and/or books (references in each function). All tested informally during daily job, will provide a jupyter notebook where I have recreated a few figures from cited references.

This looks tremendous, thank you Alessandro. I will make time for this and Matteo's PR asap.
Exciting to see bruges grow!

This is a notebook that  shows some test I made using the rock physics models included here. Essentially I have tried to reproduce some of the figures from the original sources' (papers and books) used to code the equations. It is not comprehensive though!
https://github.com/aadm/geophysical_notes/blob/master/bruges_rpmodels.ipynb

All the functions require in input non-SI units, i.e. elastic bulk and shear moduli (K, G) in GPa, pressure in MPa, velocities in m/s, density in g/cc etc. This may not be scientifically sound or "clean" but these units are what practitioners commonly use. Maybe we could check what units all the other functions in bruges require and try to find some sort of agreement at the library level.

The name of the various functions are not modified and less cryptic. So we have:
critical_porosity, hertz_mindlin, soft_sand, stiff_sand
contact_cement, constant_cement, increasing_cement
vernik_consol_sand, vernik_sand_diagenesis, vernik_shale
vernik_soft_sand_1, vernik_soft_sand_2, vels
I have decided not to add _model to the end of each of these functions to keep names a bit shorter.

For now, the file with all the new stuff is called rockphysicsmodels.py. I accept suggestions as to where to move these functions (e.g., elastic.py or isotropy.py, but honestly I dont' like either; perhaps a simple models.py so that we will have bruges.rockphysics.models?

Docstrings now have a brief description of each model; not 100% happy with these and they may need rewriting at some point.

Just to explain my latest commit, while moving my function vels to fluidsub.py as agreed with @EvanBianco I also tried your fluid substitution routines (I usually have my own routines which are different, but still based on Gassmann's equation obviously). I realized that the docstrings (as well as the names) for smith_gassmann and avseth_gassmann were misleading, at least to me. The first is simply put the direct form of Gassmann: you have as input dry-rock, mineral and fluid bulk modulus and porosity and you calculate the saturated rock bulk modulus. The other (avseth_fluidsub) is the indirect form where you bypass kdry altogether -- having as input the rock in one fluid state and knowing the elastic properties of initial and final fluid state you get the saturated rock bulk modulus with the final fluid. I have quickly rewritten the docstrings, but I believe the names should be changed as well.

Thanks for all the changes here @aadm, things are looking great. I have suggested a bit of re-formatting some of the mathy bits for readability, but everything else is looking good as far as I can tell.
@kwinkunks, do you think we should merge these additions into a so-called rock-physics-model develop branch, first, and write some tests for it, before merging it to master?
@alessandro, it's a bit tricky to verify the equations are correct, but ultimately we'll want to work towards writing tests for these functions.
Also, I think it might be helpful if we include an example section in each function's documentation, using the doctest format.
I'll defer to @kwinkunks to advise if he wants to have those examples in place before we pull the code, or if we can work on that collaboratively. @aadm, if you have some examples – of verified values that have been sanity checked, then we could add those in pretty quickly.
Comments welcome.

Thanks @EvanBianco I see the doctest format, and it would be easy to include. The problem is finding these "verified values". I have this notebook where I have tested most of the functions as much as I can, and I only have ONE numerical examples, the others are all reproduction of published plots, so the accuracy is what it is:
https://github.com/aadm/geophysical_notes/blob/master/bruges_rpmodels.ipynb
All the years working on these bits of code and re-reading old papers, I still don't have this database of published values that I can compare the results to. What I used to do is to run the functions included in commercial packages and all the numbers match (up to a certain float), but this is obviously not a rigorous way of testing because who knows if the equations included in said packages are "correct"?

Thank you Alessandro and Evan!

@aadm, "All the years working on these bits of code and re-reading old papers, I still don't have this database of published values that I can compare the results to"
Sadly, for the state of our science, this is far too common in our industry than it should be. This complete lack of appreciation for reproducibility has become a big turn-off for me in the rock physics community, and I totally feel your pain.
This was exactly the motivation for doing the Repro Zoo, and why we all need to soldier on towards more useful technical publication systems.
Thanks again, for your efforts on adding these functions to bruges. Great contribution!


fix: replace export-to-csv-fix-source-map with papaparse

This fixes https://github.com/refinedev/refine/issues/5317, the current package used to generate the CSV is old and has few issues, this PR changes the implentation to use the same package as for useImport - papaparse for the CSV generation.
Test plan (required)
Due to changes regarding the underlying options (from options for export-to-csv to the options of papaparse)

Add tests to check backward compatibility of the old options as not to break interface.

Closing issues
closes https://github.com/refinedev/refine/issues/5317
Self Check before Merge
Please check all items below before review.

[X] Corresponding issues are created/updated or not needed
[X] Docs are updated/provided or not needed
[X] Examples are updated/provided or not needed
[X] TypeScript definitions are updated/provided or not needed
[X] Tests are updated/provided or not needed
[X] Changesets are provided or not needed

I did find a difference in the options the underlying library uses that may break code that uses those option.
From what I see, this fix can't be a patch as-is, do you want me to add backward-compatibility support (mapping the old options to the new ones) or release it as a minor/major change?

Old
New

showLabels
showColumnHeaders

headers
columnHeaders

Build does fail with the error
Module not found: ESM packages (export-to-csv) need to be imported. Use 'import' to reference the package instead. https://nextjs.org/docs/messages/import-esm-externals

From what I see it's related only to live-previews and export-to-csv been ESM but the build processes changes it to require.
Not sure how to fix this.

Adding
    experimental:{
        esmExternals: 'loose'
    }

to the packages/live-previews/next.config.js fixes the issue but I don't think this is correct as it's an issue with export-to-csv.

Hey @vikavorkin thank you for the PR and the investigation about the issue 🙏 For now, we're not aiming to convert refine to an ESM only package 🤷 I'm not sure if we can succeed if we try to import ESM in CJS and make it compatible for everyone 😅
Instead, we discussed an another option to resolve this issue. We already use papaparse package in useImport hook and it also provides an export option (unparse -what an unusual name 🤣-)
To avoid any breaking changes, we may keep the existing export-to-csv-fix-source-map for its types and provide backward compatible properties in exportOptions prop.
This means we should handle some stuff in our codebase.

Converting to papaparse.unparse from export-to-csv.ExportToCsv
The configuration is a bit different but I think this still can be done easily considering the job of both functions are converting arrays to csv 😅
Downloading the CSV
This was previously handled by the export-to-csv package which appends an anchor element with download attribute and triggers a click, then removes it from DOM. We can replicate that in our codebase to keep useExport making auto downloads. This can be done only for browser, so let's keep in mind to have a typeof document check before doing any actions.
We're pushing to make Refine work on any platform and not just browsers, so this might be a good chance to update the triggerExport command to return Promise<string> instead of Promise<void>. We can return the generated csv and for browsers still trigger a download. This will give ability to use useExport in other environments. (Nice to have but is not really in scope of this PR)
Mapping Old Parameters
I just checked the config types for the export-to-csv-fix-source-map:
export interface Options {
    filename?: string;
    fieldSeparator?: string;
    quoteStrings?: string;
    decimalSeparator?: string;
    showLabels?: boolean;
    showTitle?: boolean;
    title?: string;
    useTextFile?: boolean;
    useBom?: boolean;
    headers?: string[];
    useKeysAsHeaders?: boolean;
}

Let's see if we can find a respective option in papaparse for each of them 😅
filename is for download and after switching to papaparse will be handled by us.
fieldSeperator is delimiter
quoteStrings is quotes
decimalSeparator I think papaparse doesn't have this option (We can skip It I guess and redirect users to mapData in TSDoc)
showLabels this is removed in the latest version of export-to-csv but looks like its for the headers (showing or hiding them) and I think papaparse can control this via header: false 🤔
showTitle and title papaparse doesn't have this and we can prepend it in our code.
useTextFile this is also related with the download. papaparse.unparse returns a string, the extension of the dowloaded file is up to us.
useBom: Bom is \ufeff added to the start of the file. We can handle this as well.
headers: Explained below but I think columns will cover it.
useKeysAsHeaders: this is same as columns being unset.
I think that's all. If you have any other issues regarding the mapping of the parameters, let's get in touch!
Fixing the issue of this PR
This was the main issue of this PR, the exported csv does not have the defined headers if data is not consistent for all items. We can use the columns property of UnparseConfig along with the header property. I think we can just map headers to columns which essentially works the same. (We may need to check the source or documentation to make sure this is correct but looks like it)
Adding Tests
This will be crucial for us to make sure we're making it backward compatible. Existing tests are expected to work same and we can add additional ones for new configuration etc.

There are the expected changes for this PR, let's discuss if you have any other ideas. Let us know if you can spare some time to implement this or we can add this to our to-do and let our team work on this 🚀  A long comment may look a bit scary to handle but I think the changes will not be much complicated and possible to do with ease.

I have changed useExport to use papaparse and file-saver.
Added few tests, need to add more - WIP.

Hi,
Added what you asked for, sorry I missed what you wrote about the return type of triggerExport.
I tried to avoid using the generic download a file via data url by using file-saver package. I had trouble supporting all the different browser implementations and file-saver should provide a much more solid solution.
Generally I would prefer triggerExport return the CSV string and have the user handle it.
For now I added your implementation for the download.

Thank you for the update @vikavorkin 🙏 Can you update the documentation to reflect the current changes? Check out the docs section in the Contributing guide

Hi @aliemir, sorry had some trouble launching the docs and not enough time to troubleshoot it.
I will try to have something this weekend.

@vikavorkin Hello again, thanks for the PR. It looks great.
I updated useExport documentation, I would be very happy if you could review it when you are available.


Why Echo bot needs two apps?

I'm currently working on building an Echobot following the instructions (https://github.com/microsoftgraph/microsoft-graph-comms-samples/tree/master/Samples/PublicSamples/EchoBot).
According to the instructions, "Bot Registration" step should be completed before deploying. However, after deploying I noticed another app called  "GH_Echobot_**_BOT". What is different between these two bots? and which one should I use when the deploying script asks for "Azure Bot ADD Client ID"?
Initially, I entered the information for the app I manually created during the "Bot Registration" step. But when I ran 'Action' following an error occurred, and I suspect the issue might be due to using the wrong app.

I'm not familiar with the Echobot deployment scripts, but I suspect the following:
One app registration is used as identity for the bot to communicate with Graph and to perform it's actions during operation.
The other app registration serves as service principal to deploy infrastructure and code changes to Azure. It needs to have permissions to perform those tasks.
It's common to split those two aspects.

Thank you for explanation! I put an app registration one when I deploy and it worked smoothly!


Added mastering-bitcoin es & pt_BR

Hacktoberfest notes:

due to volume of submissions, we may not be able to review PRs that do not pass tests and do not have informative titles.
please read our contributing guidelines
be sure to check the output of Travis-CI for linter errors
if this is your first open source contribution, make sure it's not your last!

What does this PR do?
Added mastering-bitcoin Spanish & Brazilian Portuguese
For resources
Description
Why is this valuable (or not)?
It is the most important book of Bitcoin.
How do we know it's really free?
It has Creative Commons Atribución Compartir-Igual (CC-BY-SA)  license.
For book lists, is it a book? For course lists, is it a course? etc.
It is a book.
Checklist:

[x] Not a duplicate
[x] Included author(s) if appropriate
[x] Lists are in alphabetical order
[x] Needed indications added (PDF, access notes, under construction)

duplicate

@eshellman This book only appears in this repo in english but not in other languages so I think it cannot consider as duplicated.


build: Support docker to build binary package

Change-Id: I79000463955d16eec8809c870f7d02c60da53432
Bug: https://github.com/mapbox/node-sqlite3/issues/418
Forwarded: https://github.com/mapbox/node-sqlite3/pull/1028
Origin: https://github.com/tizenteam/node-sqlite3
Signed-off-by: Philippe Coval<EMAIL_ADDRESS>

Thank you @rzr

Now that this is merged what's the next step? How do you use this? My ultimate goal is #418.


Fairseq requirement fails to install

Collecting fairseq (from -r requirements.txt (line 7))
  Using cached fairseq-0.12.1.tar.gz (9.6 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      Traceback (most recent call last):
        File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\user\AppData\Local\Temp\pip-build-env-ma0u23mo\overlay\Lib\site-packages\setuptools\build_meta.py", line 327, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\user\AppData\Local\Temp\pip-build-env-ma0u23mo\overlay\Lib\site-packages\setuptools\build_meta.py", line 297, in _get_build_requires
          self.run_setup()
        File "C:\Users\user\AppData\Local\Temp\pip-build-env-ma0u23mo\overlay\Lib\site-packages\setuptools\build_meta.py", line 313, in run_setup
          exec(code, locals())
        File "<string>", line 27, in <module>
        File "<string>", line 18, in write_version_py
      FileNotFoundError: [Errno 2] No such file or directory: 'fairseq\\version.txt'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Any help?

Ended up using https://github.com/VarunGumma/fairseq, seems to work?

It doesn't work at all.

Ended up using https://github.com/VarunGumma/fairseq, seems to work?

按照你的方法运行成功了。
执行命令：poetry run pip install git+https://github.com/pytorch/fairseq

Nope not working huminghui. Windows doens't compete with python. Python is for selfish programmers.

poetry run pip install git+https://github.com/pytorch/fairseq

Here are some possible solutions:
1.Try upgrading pip and setuptools to the latest versions:
pip install --upgrade pip setuptools
2.Try manually downloading the fairseq source code and check if the fairseq\version.txt file exists. If it doesn't exist, you
can try manually creating an empty version.txt file.
3.If you are using Windows, ensure that backslashes \ are used in the file paths instead of forward slashes /.
4.Check if you have sufficient permissions to access and create files. Try running the command prompt or terminal with administrative privileges.
5.If the above steps do not resolve the issue, you can try installing fairseq manually from the GitHub repository:
pip install git+https://github.com/pytorch/fairseq.git

Just downgrade pip version:
python -m pip install pip==24.0
pip install fairseq

https://github.com/facebookresearch/fairseq/issues/5518


add mix transliteration transformation

This transformation converts randomly picked words in the text from their original script to their corresponding English transliteration. It can be used to augment/test multi-lingual models to improve/evaluate their capacity to understand various languages irrespective of its representation.
Authors: Tanay Dixit (tanay.dixit@smail.iitm.ac.in), Mukund Varma T<EMAIL_ADDRESS>

Hi @kaustubhdhole,
Thanks for pointing out the licencing issue. We were unable to find a suitable package under the MIT/Apache Licence which also satisfies the requirements of this transform. Therefore would it be alright if we reimplement whatever is required from indic-trans and include them as a script in this transform (essentially all we need to do is include a large lookup table to convert from any Indian language to English, which I believe is pretty straightforward).

@kaustubhdhole
Sorry for the delay from our end. Based on our prev conversations, we have updated the scripts as required. We hope it satisfies your concerns.

@kaustubhdhole
Update: We ran into 3aransia (licenced under Apache 2.0) and we have updated our scripts to use the same. Kindly let us know if the changes will address your concerns.
Thanks


Unite asset emitting code paths and fix tile parsing

Fixes  microsoft/pxt-arcade#2986
Fixes microsoft/pxt-arcade#3018
This unites all of the asset emitting and all of the parsing except in the monaco fields (which have some special behavior around creating new assets if the name does not exist)
@shakao you should be able to close https://github.com/microsoft/pxt/pull/7855
@jwunderl this might conflict with https://github.com/microsoft/pxt/pull/7858 because getShortIDCore can now return undefined.
I think I tested this pretty thoroughly, but please review carefully because it touches some key stuff

Pushed a quick change to fix python field editors and decompiling from python


Update Bazar and Alex links

Hey ArConnect team, great job on the new Explore page! We’ve been encountering UI issues with the “arweave.dev” gateway on Bazar and the Alex Archive, so I updated the links to the more stable “arweave.net.” I also updated the Discord link to Bazar’s community within the Weavers Discord.

@afisher3578 thanks for this, manually adding this in to the latest version due to some branching conflicts


Add .help command to the CLI

We currently just get this:
Welcome to Limbo SQL shell!
> .help
Unknown command: .help
Available commands:
  .schema <table_name> - Display the schema for a specific table
  .opcodes             - Display all the opcodes defined by the virtual machine

My humble intend to contribute!
#130

Fixed by e20028becca141f1246119b916c17c28c3668749


Return empty CSourceModule when no lowered_funcs exists in Relay mod

This PR implements the dummy function idea as mentioned in #4748 - when the whole Relay module is optimized to empty, we can insert a dummy operator that allows TVM to still produce a library.

cc @zhiics @FrozenGene

I agree that perhaps an empty module provides useful middle ground. The closest thing so far might be CSourceModule with an empty string https://github.com/apache/incubator-tvm/blob/master/src/target/source/source_module.cc#L190

CSourceModule with an empty string looks to me as well. @kumasento could you do that instead of creating a dummy llvm module? Thanks.

Thank you guys for all your kind reviews! @mbarrett97 @FrozenGene @tqchen @zhiics
I've updated this PR to fulfill the following revisions:

Using CSourceModule with an empty string as the returned module object ret_.mod, instead of creating a dummy lowered function.
Removed the warning based on @mbarrett97 review.

Now the generated module looks clean and tidy. No redundant dummy function generated and no extra design decisions should be made.
Please let me know if there is anything else you feel should be done. Thanks!

I don't think the empty CSourceModule method works. There's a check in source_module.cc that fails when you try and create one with an empty string.

I don't think the empty CSourceModule method works. There's a check in source_module.cc that fails when you try and create one with an empty string.

Hi @mbarrett97 thanks for your comment. Currently I haven't met such an issue while testing. Would you mind letting me know which assertion you were referring to?

@mbarrett97 Thanks, I just noticed that the base of my PR is not the latest commit. I will update it soon.

Hi @mbarrett97
Sorry I have got some questions for the case you've mentioned.

As you suggested, the assertion for lowered_funcs.size() in the branch assuming that external modules exist should be raised in the current implementation, but what is the expected behaviour when we actually use CSourceModule with an empty string? Should we simply remove this assertion since ret_.mod exists anyway and won't affect external module importing?
This line of code:

https://github.com/apache/incubator-tvm/blob/a5661611472c8e92b20bbe4d074333b8183f2878/src/target/source/source_module.cc#L101
is located in a SaveToFile function, which is not called frequently, and the single use case I've noticed:
https://github.com/apache/incubator-tvm/blob/fc1a1d83691f7229e25a37befdcd3ad9c3d430b3/tests/cpp/utvm_runtime_standalone_test.cc#L100
only exists in test and doesn't trigger that assertsion since fmt is "o". Even if fmt is "cc", assuming no such assertion and the string is empty, there should not be any exception caused (at the code level, I'm not sure whether functionally it is expected). So do you think we could simply remove that empty string checker?
Thanks!

I should probably explain my 'test case' :) Apologies if you know this all already. I'm using the external codegen feature which is relatively new. Essentially it allows you to take parts of the Relay graph and run them through a non-TVM compiler. In some cases, we take the entire Relay graph and put it through one of these external compilers resulting in the case where there are no lowered TVM functions. What does get produced though is 'external' runtime modules which correspond to the outputs from these external compilers.
You can see this happening in the BuildRelay function. We call 'GetExternalModules' to get those modules that have been produced by external compilers. But to be able to compile these modules into a shared library, we need a 'host' TVM module. This host module then 'imports' in all the external modules, as you can see here:
https://github.com/apache/incubator-tvm/blob/a5661611472c8e92b20bbe4d074333b8183f2878/src/relay/backend/build_module.cc#L458
However, if there is no host TVM module (which will happen when there are no lowered funcs), then you can't import the external modules into a host module and accordingly we fail to compile the result to a shared library. So this fix is very helpful by making sure that host module always gets created, even if it's empty, so we can always compile to a shared library.
Now addressing your questions. For 1, yes I think we just remove this branch entirely and have it always import the external modules. For 2, I hit the assert when trying to call export_library on the 'lib' output of the build function. I believe SaveToFile is called when doing this export, in particular this line:
https://github.com/apache/incubator-tvm/blob/79cfab00d1a5ae55b3324dae803d5e1389e12bbe/python/tvm/runtime/module.py#L302
I did try just commenting out the assert and it seems to work. However, I then ran into a new problem... Because what you produce is ostensibly a 'c source' file (even if it's empty), all the external modules are also exported as c files. This results in having to do a proper compile when you try and merge all the modules together to produce a shared library. If one of your external modules happens to be a binary artifact that's 150MB (my case), this compile uses an incredible amount of RAM and takes a long time to complete. I didn't get this problem with your first solution as it used an LLVMModule (I think?) which results in the external modules becoming object files so all you need to do is link, not perform a full compilation.
Sorry for the wall of text, if you have any further questions I'll happily answer them. I realise I may not have perfectly explained everything here :)

@mbarrett97 Thank you for your detailed explanation! I kind of understand what's going here.
For Q1, I have updated the logic involving external module importing. It now always import external modules into ret_.mod since it is always there.
For Q2, I'm afraid that I don't have a better idea for that. Maybe @tqchen @zhiics @FrozenGene can have an input on this? Thanks!

The reason that LLVMModule simplifies compilation is because it remembers the correct target triple. We can try to enhance the code by introducing an Empty LLVM module(with the correct target) when it is available(so that Q2 can be resolved) and fallback to the CSourceModule.

For Q2, a simpler would be feeding it with ";" instead of empty string. But LLVM module should be faster for compilation.

I did try just commenting out the assert and it seems to work. However, I then ran into a new problem... Because what you produce is ostensibly a 'c source' file (even if it's empty), all the external modules are also exported as c files. This results in having to do a proper compile when you try and merge all the modules together to produce a shared library. If one of your external modules happens to be a binary artifact that's 150MB (my case), this compile uses an incredible amount of RAM and takes a long time to complete. I didn't get this problem with your first solution as it used an LLVMModule (I think?) which results in the external modules becoming object files so all you need to do is link, not perform a full compilation.

This is because our new ModulePackImportsToLLVM simplifies complication and generate object file directly, it is designed for large artifact like your case.

The reason that LLVMModule simplifies compilation is because it remembers the correct target triple. We can try to enhance the code by introducing an Empty LLVM module(with the correct target) when it is available(so that Q2 can be resolved) and fallback to the CSourceModule.
cc @FrozenGene who created the mechanism for the binary exporting

I agree we could create empty llvm module if we have llvm target support, then we could fallback to CSourceModule.  We could refer logic here:
runtime::Module build(const Map<Target, Array<LoweredFunc>>& inputs,
                      const Target& target_host,
                      const BuildConfig& config)
  Target target_host_val = target_host;
  if (!target_host.defined()) {
    for (const auto& it : inputs) {
      if (it.first->device_type == kDLCPU) {
        target_host_val = it.first;
        break;
      }
    }
  }

  if (!target_host_val.defined()) {
    target_host_val = DefaultTargetHost(target_host_val);
  }

Here, we have logic to detect and extract the correct target host. According to this, we could know whether we have LLVM (with correct target).

Thank you for your valuable suggestions @tqchen @zhiics @FrozenGene !
I now changed the logic to try LLVMModule, and if the target_host is not llvm, we fallback to CSourceModule. I use the code snippet that @FrozenGene suggested to decide the target host. But I still need to bring back the dummy function idea, otherwise, I cannot find a way to generate a LLVMModule, which requires lowered_funcs to be non-empty.
@mbarrett97 Please see whether this version suits your scenario. Any other suggestions are also welcomed!

I've tested the most recent commit with my use-case (aarch64 with offloading to external codegen) and it looks to work well. It's still not a particularly elegant solution but I can't propose a better one.

@kumasento @FrozenGene can you followup on this PR?

@kumasento @FrozenGene can you followup on this PR?

Sure. I am waiting @kumasento 's new implementation as comments said.

Yes, I will do that very soon, was trapped at a conference. Sorry for the
delay.
On Wed, 26 Feb 2020 at 05:00, Zhao Wu<EMAIL_ADDRESS>wrote:

@kumasento https://github.com/kumasento @FrozenGene
https://github.com/FrozenGene can you followup on this PR?
Sure. I am waiting @kumasento https://github.com/kumasento 's new
implementation as comments said.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/incubator-tvm/pull/4847?email_source=notifications&email_token=ACC42R7WHOV6YFUXC32V4QDREXZPNA5CNFSM4KR43YZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM6ZTZA#issuecomment-591239652,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACC42R6SLTCAU4RARSUMEOLREXZPNANCNFSM4KR43YZQ
.

@FrozenGene @tqchen @zhiics @mbaret Would you mind giving another read on this? Now the approach is creating an empty LLVM module instead of using a dummy function. There is also a LLVMModuleCreate packed function implemented.

ping @FrozenGene please followup

@mbaret @zhiics @tqchen could take a look another round.

Thanks @kumasento @FrozenGene @mbaret @zhiics  This PR is now merged

This commit is causing segfaults when my entire relay program is offloaded to an external codegen.

Hi Trevor,
Thanks for the info. Can you provide more information about the bug you've
got? Thanks.
On Tue, 17 Mar 2020 at 17:29, Trevor Morris<EMAIL_ADDRESS>wrote:

This commit is causing segfaults when my entire relay program is offloaded
to an external codegen.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/incubator-tvm/pull/4847#issuecomment-600200202,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACC42R5SF23UYPEF6M5ABT3RH6XPNANCNFSM4KR43YZQ
.

HI @kumasento the graph runtime is trying to get my external codegen functions from the empty LLVM module.
Stack trace shows the segfault is coming from LLVMModuleNode, so I added a print statement after this line which showed that GetFunction() was called on the LLVM module for my function tensorrt_0 which should be going to my external codegen module instead.
Stack trace:
  [bt] (0) /home/ubuntu/anaconda3/lib/python3.6/site-packages/mxnet/libmxnet.so(+0x2e6b140) [0x7f3b510c0140]
  [bt] (1) /lib/x86_64-linux-gnu/libc.so.6(+0x354b0) [0x7f3bdd7134b0]
  [bt] (2) /lib/x86_64-linux-gnu/libc.so.6(strlen+0x26) [0x7f3bdd769746]
  [bt] (3) /data/neo-ai-tvm/build/libtvm.so(tvm::codegen::LLVMModuleNode::LazyInitJIT()+0x894) [0x7f3bcca32ad4]
  [bt] (4) /data/neo-ai-tvm/build/libtvm.so(tvm::codegen::LLVMModuleNode::GetFunction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, tvm::runtime::ObjectPtr<tvm::runtime::Object> const&)+0x488) [0x7f3bcca334b8]
  [bt] (5) /data/neo-ai-tvm/build/libtvm.so(tvm::runtime::ModuleNode::GetFunction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)+0x45) [0x7f3bcca757f5]
  [bt] (6) /data/neo-ai-tvm/build/libtvm.so(tvm::runtime::GraphRuntime::CreateTVMOp(tvm::runtime::TVMOpParam const&, std::vector<DLTensor, std::allocator<DLTensor> > const&, unsigned long)+0x4d5) [0x7f3bccad8e05]
  [bt] (7) /data/neo-ai-tvm/build/libtvm.so(tvm::runtime::GraphRuntime::SetupOpExecs()+0x661) [0x7f3bccadb0d1]
  [bt] (8) /data/neo-ai-tvm/build/libtvm.so(tvm::runtime::GraphRuntime::Init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, tvm::runtime::Module, std::vector<DLContext, std::allocator<DLContext> > const&)+0x260) [0x7f3bccadcf60]

Thanks @trevor-m
@FrozenGene sorry for bothering you but does this ring a bell?
I feel it is weird that GetFunction won't return an invalid/empty value directly when the function name cannot be found. I'm wondering why LazyJIT should be called in this scenario?

Thanks @trevor-m
@FrozenGene sorry for bothering you but does this ring a bell?
I feel it is weird that GetFunction won't return an invalid/empty value directly when the function name cannot be found. I'm wondering why LazyJIT should be called in this scenario?

Please see: https://github.com/apache/incubator-tvm/pull/4847/files#diff-8baddb83a9684e8373691bb48a946900R469-R474 When entire program is offloaded, I find previous logic will
// Execute the whole module using external runtime.
        ret_.mod = ext_mods[0];

However, current logic we will
// Import all external runtime modules.
    for (const auto& it : ext_mods)
      ret_.mod.Import(it);

Could you double check the logic is the same as previous? Thanks.

Hi @FrozenGene
Thanks for your explanation. I do have a question about this part, hope you won't mind:

Before this PR, we replace ret_.mod with ext_mods[0] when there is no lowered_funcs, which is sensible since no ret_.mod is available when lowered_funcs does not exist.
Now we will always create a ret_.mod. What would the logic be if there is only one external module (the condition for ret_.mod replacement)? Should we do replacement or import?

Also @trevor-m would you mind sending me a minimal workable example? I would like to do the tracing myself as well.
Thanks

Hi @FrozenGene
Thanks for your explanation. I do have a question about this part, hope you won't mind:

Before this PR, we replace ret_.mod with ext_mods[0] when there is no lowered_funcs, which is sensible since no ret_.mod is available when lowered_funcs does not exist.
Now we will always create a ret_.mod. What would the logic be if there is only one external module (the condition for ret_.mod replacement)? Should we do replacement or import?

Also @trevor-m would you mind sending me a minimal workable example? I would like to do the tracing myself as well.
Thanks

I think we should be ret_.mod replacement as previous pr. @zhiics do the external codegen part. He could answer it more authority. @zhiics Could you help to answer this question?

I think changing it to a llvm module and import all submodules is okay. Now if you only have an external module. You will need to create a llvm module first and them import the external module to it.
Stepping into llvm module to find the symbol is not wrong because we will always try to find the symbol from the host module first. If it is not found, we will then try to check each imported module. See the code here:
https://github.com/apache/incubator-tvm/blob/050f2bde2c694af9b5569ca954ca041c3767787b/src/runtime/module.cc#L65
A minimal example to reproduce this and track the root cause would be more helpful.

I think changing it to a llvm module and import all submodules is okay. Now if you only have an external module. You will need to create a llvm module first and them import the external module to it.
Stepping into llvm module to find the symbol is not wrong because we will always try to find the symbol from the host module first. If it is not found, we will then try to check each imported module. See the code here:
https://github.com/apache/incubator-tvm/blob/050f2bde2c694af9b5569ca954ca041c3767787b/src/runtime/module.cc#L65
A minimal example to reproduce this and track the root cause would be more helpful.

You can reproduce this by running test_extern_dnnl() after commenting out this line: https://github.com/apache/incubator-tvm/blob/master/tests/python/relay/test_pass_partition_graph.py#L203

Hi @trevor-m
Thanks for this information. I ran the test and reproduced the bug. I've located that the segfault should be raised from the create function of llvm::EngineBuilder (this line).
Now I'm looking at the internal logic in LLVM to find out what the actual cause is. Please bear with me for 1-2 days.

@trevor-m a tentative fix has been posted in #5146


Updated Community Section in Readme

Description
Updated Community Section in Readme
This PR fixes #211
Notes for Reviewers
Signed commits

[x] Yes, I signed my commits.

Hello @leecalcote ,take a look at the PR and consider the commit : 21e19e2c37a50b9cd4408663f69749c2f1a6f415

@leecalcote Please take a look at the PR :)

Thank you, @DARK-art108


class java.lang.Class cannot be cast to class java.lang.reflect.TypeVariable

Describe the bug
When generating a class using fixture monkey 0.4.12 or newer I get this error:
class java.lang.Class cannot be cast to class java.lang.reflect.TypeVariable (java.lang.Class and java.lang.reflect.TypeVariable are in module java.base of loader 'bootstrap')

It works fine on fixture monkey 0.4.11.
Your environment
0.4.12+
Java 17
Steps to reproduce
Run the entityTest() located in this repo:
https://github.com/esfomeado/fixture-monkey-bug/blob/master/src/test/java/com/example/bug/FixtureMonkeyTest.java
Expected behaviour
Should generate the class
Actual behaviour
Throws error

@esfomeado
Thank you for reporting an issue.
It'll be fixed in 0.4.14!
Is it the issue you mentioned in this PR?
https://github.com/naver/fixture-monkey/pull/519#issuecomment-1426297663

@esfomeado
0.4.14 is released!

I found others. I will report them later


vtgate batch api: fix bug caught by linter

I presume there are no objections to this, given that it's a trivial lint bug fix.
I'll merge this in a bit.


Create project management page

Give me some what of an idea of what you are looking for for this and I should be able to help. I also noticed that your README.md getting started instructions could be better (missing starting application cmd (npm start), also looks like you might be missing a few dependencies as well based on my initial peek at your application. I can update that as well. @raashidA let me know what your thoughts are.


Statement for intended purpose

Hi,
for legal and compliance reasons it would be great if there would be any public statement available that e.g. the IP's and IP Ranges listed in this doc are only used for exchange servers and the related resources hosted by MSFT itself.
There are no customer IP's in that range,...
All systems in that named IP range only fulfill the purpose of delivering Exchange Online Services...
etc.

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

ID: 66bd8666-3566-a901-b25b-eb6baba6264a
Version Independent ID: e9f6310f-2207-8c81-d31a-3d5a80beb26b
Content: Office 365 URLs and IP address ranges - Microsoft 365 Enterprise
Content Source: microsoft-365/enterprise/urls-and-ip-address-ranges.md
Service: microsoft-365-enterprise
GitHub Login: @kelleyvice-msft
Microsoft Alias: kvice

@J-a-k-o-b we appreciate your feedback. This page is automatically generated from a database so we can’t manually update the page. However, if you suspect there is an error in this list of URLs and IP addresses or have questions, please contact Microsoft Support.
To contact Microsoft 365 Support:

Sign in to Microsoft 365 admin center with your Microsoft 365 admin account, and select Support > Help and support, enter your question, and then select Contact support.

If you're an admin on the account, you can call<PHONE_NUMBER> (toll-free, US only).


To Reproduce
Steps to reproduce the behavior:

Click scale or rotate button
The element disappears

Expected behavior
WBApexTool.ts => line 148
    this.eventCollector.attachEvent(window, 'click', () => {
      this.remove();
    })

Maybe this line should be edited; this.remove MUST be called when remove button clicked only
Chrome version

74

Thanks, I recognized the bug.
I'll fix it asap.

Since I resolved the bug perfectly, I close this issue.


Function to get active organization in server components

Is your feature request related to a problem? Please describe.
I'm using Next.js with an external API, which is where I have my better-auth server. However, I want to also take advantage of server components so whenever I can, I'm using the better-auth client imperative API—like getSession—in server components and so far it's been working good.
The problem is that the only way to get the active organization using the imperative API is to first fetch the session and then get the activeOrganizationId from the session and use that id to then get the organization. I would love if there was a similar API to the useActiveOrganization hook, so we can get the active organization in server components with a single API call.
Describe the solution you'd like
Add an imperative API, similar to getSession to get the active organization from server components.
Describe alternatives you've considered
The current workaround, as I described before, it's to first get the session and. then the organization. Two api calls.

you can use
auth.api.getFullOrganization({
   headers: await headers()
})

you can use
auth.api.getFullOrganization({
   headers: await headers()
})

Oooh, good to know, didn't see that in the docs but I've might missed it. Thank you!


Compilation error: missing simdcomp

running: "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-m64" "-fPIC" "-I" "./cpp/simdcomp/include" "-std=c++11" "-O3" "-mssse3" "-o" "/home/maciej/git/tantivy/target/debug/build/tantivy-c843e95d6308187a/out/cpp/simdcomp_wrapper.o" "-c" "cpp/simdcomp_wrapper.cpp"
cargo:warning=cpp/simdcomp_wrapper.cpp:4:22: fatal error: simdcomp.h: No such file or directory
cargo:warning=compilation terminated.
ExitStatus(ExitStatus(256))
How should I install it? Documentation doesn't mention it.

simdcomp is a git submodule
You need to run
git submodule init
git submodule update

to download it

Thanks, works now.

Reopening. I really need to write something in the README.

Ran into this today, would you consider a PR to use git subtree instead to make it easier for new contributors?

To be honest I didn't know about git subtree and yes it sounds like a good idea.
I am looking forward to your PR.


allow "additional code"

Allow people to "extend" a base script by adding extra <source> tags. If those sources include a setup then those should resolve in source ordering.

added in v1.3.0


MergeSemantics does not take sortKey into account

b/163110107
Min repro case:
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: MergeSemantics(
            child: Column(
              mainAxisSize: MainAxisSize.min,
              children: [
                Semantics(sortKey: OrdinalSortKey(3), child: Text('line A')),
                Semantics(sortKey: OrdinalSortKey(2), child: Text('line B')),
                Semantics(sortKey: OrdinalSortKey(1), child: Text('line C')),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

Expected:
Merged semantics should read "line C / line B / line A"
Observed:
Merged semantics reads "line A / line B / line C"

CC @chunhtai

I also replied to the internal bug
This is WAI
The sortkey is meant for focus traversal order. https://api.flutter.dev/flutter/semantics/SemanticsProperties/sortKey.html
The concatenate order is determined by visitChildrenForSemantics. The document specifically says Called when collecting the semantics of this node.
https://api.flutter.dev/flutter/rendering/RenderObject/visitChildrenForSemantics.html

I find it surprising that MergeSemantics changes the focus traversal order when it is explicitly defined in the subtree. Perhaps the intention needs to be fixed here?

MergeSemantics does not change the focus traversal order. There are two things:

focus traversal order
2.semantics collection order.

The concatenation is depends on semantics collection order which by default is the paint order and is the same order where the children are passed into the column.
If the behavior is that the merge semantics must concatenate in a different order than the children in the column, this is a new feature request.

I agree that this is an FR.
I was asking whether it is a valid FR. Should MergeSemantics consider focus traversal order? One caveat is that I think focus traversal order isn't entirely determined in Dart. Even if we fix this, there will still be cases where labels will change when MergeSemantics is introduced to the widget tree.

I think we should not overload the sort key with the mergeSemantics. I am a bit worry that we may later on run into a request that want to separate out the sort key with mergeSemantics.
If we want to do this, we should come up with a new api. I wonder what is the use case where the customer wants the merge semantics to concatenate the string in reverse of the display order. That does not feel like a pleasant UI experience.

Agreed that we should learn more about the use case. Could you please post that question to internal issue? Thanks @chunhtai.

closed as WAI, see internal bug for more details


[Question]: The time recorded by llamatrace does not match.

Question Validation

[X] I have searched both the documentation and discord for an answer.

Question

I only made one modification of introducing llamatrace in __init__.py of the example at https://github.com/run-llama/llama_deploy/tree/main/examples/python_fullstack. In the above example, the difference between the total time and the step-by-step time is 5 seconds. My test case is just a simple "hi". I want to know what the reason is.
In addition, there are some strange cases.

I will continue to debug to find out the specific reason. But if anyone has experienced a similar situation, they can share the solution.

Workflows are tricky to properly trace
The actual .run() method runs instantly
The actual workflow does not execute until you call await -- this is because workflow.run() returns an asyncio.Future -- properly tracing this is pretty difficult.
Arize could probably update to ensure the time on the top-level trace matches the sum of the children. I would suggest opening an issue there for this?

@mnkasikci We can change this UI displayed value below, i.e. 0.34ms, on the tracer header to be max(all span end times) - min(all span start times) instead of just the timing of the root span, would that work for you? The underlying timing values for each span is accurate for the reasons Logan has described above.

"Got it, thanks!"

Going to close this for now, since its being tracked on the arize repo 👍🏻


Bug report: UnicodeDecodeError: 'ascii' codec can't decode byte 0xcf in position 0: ordinal not in range(128)

Here is the command I run :
livestreamer http://games.dailymotion.com/live/x29tfh3 best

Output :
[cli][info] Found matching plugin dailymotion for URL http://games.dailymotion.com/live/x29tfh3
[cli][info] Available streams: 132p (worst), 232p, 408p, 720p, 720p+ (best)
[cli][info] Opening stream: 720p+ (hds)
[cli][info] Starting player: 'C:\Program Files (x86)\VideoLAN\VLC\vlc.exe'
Exception in thread Thread-1:
Traceback (most recent call last):
  File "threading.py", line 551, in __bootstrap_inner
  File "livestreamer\stream\segmented.py", line 160, in run
  File "livestreamer\stream\hds.py", line 83, in write
  File "livestreamer\stream\hds.py", line 90, in convert_fragment
  File "livestreamer\packages\flashmedia\f4v.py", line 19, in __next__
  File "livestreamer\packages\flashmedia\packet.py", line 19, in deserialize
  File "livestreamer\packages\flashmedia\box.py", line 32, in _deserialize
  File "livestreamer\packages\flashmedia\types.py", line 42, in read
  File "livestreamer\packages\flashmedia\types.py", line 274, in unpack
UnicodeDecodeError: 'ascii' codec can't decode byte 0xcf in position 0: ordinal
not in range(128)

VLC opens, reads a stream for a few seconds and then closes.
[cli][info] Stream ended

I do not know what's going on with my PC, I tried the command on another computer and it works correctly.
Thank you in advance, I remain available for more information.

This is really strange, the crash happens because bad data is encountered when parsing the segment, but I'm not able to reproduce this at all. Do you use a proxy, VPN or anything else that might tinker with your HTTP traffic?

Hi! I'm facing the same problem in my computer. My network goes through a VPN but I can watch the same twitch stream without a problem in my browser. Let me know if I can be of any help!

Hi again! I was just able to watch the stream using the windows cmd as admin.
cheers!


Exploratory: Run libuv loop on a background thread

This implementation creates two threads:

Thread A runs the libuv loop in the Default mode (so it does not saturate the CPU).

On an incoming TCP connection, thread A's event loop is ticked on thread A.
This is because AFAIK libuv is not thread-safe, but arbitrary events/timers can do work on libuv handles.

Thread B runs a regular haxe.Timer.

On timer interval, a blocking TCP socket is being opened, connected to the server, and immediately closed.
This is so A's events are being run even if the Weblink server has no traffic.

There are a couple of reasons why not to merge it: it bumps Haxe version to 4.3.0 to use sys.thread.Condition, it breaks apps that depend on app.server.update, it slightly sabotages the Node.js port attempts, (edit: it craps itself on Windows), but most importantly:
It requires Hashlink nightly (or 1.15+ when/if that releases).
I'm too lazy to do a bisect right now, but running the server on HL 1.14.0 has a very high chance to hang somewhere inside hl_gc_alloc_gen. That seems to be fixed (possibly in 664/d82c3c), but not included in a tagged release.

Some further notes while I work on this:

It is possible to omit the Condition. You can use one Lock in listen(blocking: true). When you forcibly close the server, you create another Lock and pass it as a callback.
I was debugging an issue yesterday where the test suite would just hang up, but rather predictably so.

If you run a libuv loop in Default mode and do nothing with it, most of the time it will chill out down at epoll_wait.
Hashlink has a stop-the-world garbage collector.
... You see where I'm going. Connecting to the server helped. Gc.enable between requests can help too.

Thread B runs a regular haxe.Timer.
On timer interval, a non-libuv TCP socket is being opened, connected to the server, and immediately closed.

Walk me through why running the garbage collector is important for A's event are being running through the garbage collector even if there is no traffic? Is there a memory leak issue somewhere, and this is a temporary fix for that?
I don't know what you are trying to solve for.

Walk me through why running the garbage collector is important for A's event are being running through the garbage collector even if there is no traffic? Is there a memory leak issue somewhere, and this is a temporary fix for that?

Let's forget for a moment that Weblink exists. We create a TCP listener using HL's libuv bindings:
import hl.uv.Loop;
import hl.uv.Tcp;
import sys.net.Host;
import sys.thread.Thread;

function main() {

	Thread.create(() -> {
		final loop = @:privateAccess Loop.default_loop();
		final socket = new Tcp(loop);
		socket.bind(new Host("<IP_ADDRESS>"), 2000);
		socket.listen(100, () -> {});
		loop.run(Default);
	});

	Sys.sleep(1.0);
	Sys.println("Hello!");
}

As you might expect, this application runs for a second, prints "Hello" and exits. Pretty self-explanatory.

The application no longer exits! It also does not print to the console. Moreover, you may also realize that the main thread uses your entire CPU core:

You may want to attach a debugger to the main thread. Ideally, if you have a build of HL with some extra info, you might see:
0x00007b47a50580c9 in gc_stop_world (b=true) at src/gc.c:362
362				while( t->gc_blocking == 0 ) {}; // spinwait
(gdb) bt
#0  0x00007b47a50580c9 in gc_stop_world (b=true) at src/gc.c:362
#1  0x00007b47a5059b15 in gc_major () at src/gc.c:889
#2  0x00007b47a5059c75 in hl_gc_major () at src/gc.c:913

The garbage collector, triggered on the main thread, is waiting for some other thread to be stopped. It's a spinwait, so it should really happen any moment now! But where is that other thread, actually?
(gdb) bt
#0  0x00007b47a4de9750 in epoll_pwait () from /usr/lib/libc.so.6
#1  0x00007b47a4fe012a in ?? () from /usr/lib/libuv.so.1
#2  0x00007b47a4fc809f in uv_run () from /usr/lib/libuv.so.1

It's somewhere in native code, waiting for IO. Turns out stopping a thread that does not want to be stopped is a pretty difficult problem! Let's see if providing said IO will help.
curl http://localhost:2000

It did not! The curl request hangs, just like our server.
But, you might say, we technically did exit the native code for a moment! socket.listen takes a closure for an argument, so surely we must have notified the HL virtual machine we want to get off that wild ride, no?
Close, but not exactly.
The way Hashlink notifies the GC it is allowed to stop a thread is by calling a hl_blocking(bool) guard. It is a part of many standard library APIs, sure, but an empty function would not trigger any of them.
An example of an operation that would do that is printing to standard output. Or trying to allocate a new object. You can try it out by adding a simple call like this (unless you enable static analyzer and its local_dce module):
-		socket.listen(100, () -> {});
+		socket.listen(100, () -> {
+			final _:Dynamic = {};
+		});

The application still initially hangs, but unblocks when you try to make a request:
curl http://localhost:2000

curl: (56) Recv failure: Connection reset by peer

Let's go back to Weblink.
As you've seen in my implementation of this PR, I've decided to disable the GC between TCP events and enable it back as soon as such an event gets raised.
One of the reasons for this choice was this comment about saving the socket handlers for later. As an example:

Someone was the only client connected to the server.
You fetch this client's DB data in the background.
You schedule an event to respond to them with that data (libuv is not multithread-friendly).
GC hits.
You are not able to respond until someone else connects and unblocks the HL runtime for you.

Great writeup thanks for the detailed response, I see now given how threads behave, gc manipulation is necessary.


[QoI] Add return after coercing to TupleElementExpr in ExprRewriter

Adds missing return statement for coercions which extract a single
element from a tuple aka tuple-to-scalar conversions in ExprRewriter::coerceToType.

/cc @rudkx @DougGregor

@swift-ci please smoke test

/me facepalms.
Thank you!

No problem, @DougGregor! Happy to help! :)

Nice catch!


Thread leak from Unirest 1.x.y usage

Hi,
There's a thread leak coming with the usage of unirest in pagerduty-client.
We are using pagerduty-client through pagerduty-plugin in Jenkins.
Issue was logged here, but under pagerduty-plugin : https://issues.jenkins.io/browse/JENKINS-53214

Forked her https://github.com/h7kanna/pagerduty-client
Uses JDK11 HttpClient and remove Unirest as depedency.