latest fails to build

Collecting git+https://github.com/skorokithakis/catt
  Cloning https://github.com/skorokithakis/catt to /tmp/pip-l_sty7jq-build
Requirement already up-to-date: youtube-dl>=2016.07.13 in /usr/local/lib/python3.5/dist-packages (from catt==0.4.2)
Requirement already up-to-date: PyChromecast==0.7.7 in /usr/local/lib/python3.5/dist-packages (from catt==0.4.2)
Requirement already up-to-date: Click>=5.0 in /usr/local/lib/python3.5/dist-packages (from catt==0.4.2)
Requirement already up-to-date: six>=1.10.0 in /usr/lib/python3/dist-packages (from PyChromecast==0.7.7->catt==0.4.2)
Requirement already up-to-date: protobuf==3.0.0b2 in /usr/local/lib/python3.5/dist-packages (from PyChromecast==0.7.7->catt==0.4.2)
Requirement already up-to-date: zeroconf>=0.17.4 in /usr/local/lib/python3.5/dist-packages (from PyChromecast==0.7.7->catt==0.4.2)
Requirement already up-to-date: requests>=2.0 in /usr/local/lib/python3.5/dist-packages (from PyChromecast==0.7.7->catt==0.4.2)
Requirement already up-to-date: setuptools in /usr/local/lib/python3.5/dist-packages (from protobuf==3.0.0b2->PyChromecast==0.7.7->catt==0.4.2)
Requirement already up-to-date: netifaces in /usr/local/lib/python3.5/dist-packages (from zeroconf>=0.17.4->PyChromecast==0.7.7->catt==0.4.2)
Requirement already up-to-date: enum-compat in /usr/local/lib/python3.5/dist-packages (from zeroconf>=0.17.4->PyChromecast==0.7.7->catt==0.4.2)
Requirement already up-to-date: packaging>=16.8 in /usr/local/lib/python3.5/dist-packages (from setuptools->protobuf==3.0.0b2->PyChromecast==0.7.7->catt==0.4.2)
Collecting appdirs>=1.4.0 (from setuptools->protobuf==3.0.0b2->PyChromecast==0.7.7->catt==0.4.2)
  Downloading appdirs-1.4.3-py2.py3-none-any.whl
Collecting pyparsing (from packaging>=16.8->setuptools->protobuf==3.0.0b2->PyChromecast==0.7.7->catt==0.4.2)
  Downloading pyparsing-2.2.0-py2.py3-none-any.whl (56kB)
    100% |████████████████████████████████| 61kB 4.9MB/s
Installing collected packages: catt, appdirs, pyparsing
  Found existing installation: catt 0.4.2
    Uninstalling catt-0.4.2:
      Successfully uninstalled catt-0.4.2
  Running setup.py install for catt ... done
  Found existing installation: appdirs 1.4.2
    Uninstalling appdirs-1.4.2:
      Successfully uninstalled appdirs-1.4.2
  Rolling back uninstall of appdirs
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2813, in _dep_map
    return self.__dep_map
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2624, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2804, in _parsed_pkg_info
    return self._pkg_info
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2624, in __getattr__
    raise AttributeError(attr)
AttributeError: _pkg_info

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/pip-9.0.1-py3.5.egg/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/local/lib/python3.5/dist-packages/pip-9.0.1-py3.5.egg/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/usr/local/lib/python3.5/dist-packages/pip-9.0.1-py3.5.egg/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/usr/local/lib/python3.5/dist-packages/pip-9.0.1-py3.5.egg/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/usr/local/lib/python3.5/dist-packages/pip-9.0.1-py3.5.egg/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/usr/local/lib/python3.5/dist-packages/pip-9.0.1-py3.5.egg/pip/wheel.py", line 247, in move_wheel_files
    prefix=prefix,
  File "/usr/local/lib/python3.5/dist-packages/pip-9.0.1-py3.5.egg/pip/locations.py", line 140, in distutils_scheme
    d = Distribution(dist_args)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/dist.py", line 320, in __init__
    _Distribution.__init__(self, attrs)
  File "/usr/lib/python3.5/distutils/dist.py", line 281, in __init__
    self.finalize_options()
  File "/usr/local/lib/python3.5/dist-packages/setuptools/dist.py", line 386, in finalize_options
    ep.require(installer=self.fetch_build_egg)
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2324, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 862, in resolve
    new_requirements = dist.requires(req.extras)[::-1]
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2568, in requires
    dm = self._dep_map
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2815, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2824, in _compute_dependencies
    for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 2806, in _parsed_pkg_info
    metadata = self.get_metadata(self.PKG_INFO)
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 1468, in get_metadata
    value = self._get(self._fn(self.egg_info, name))
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 1577, in _get
    with open(path, 'rb') as stream:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.5/dist-packages/appdirs-1.4.2.dist-info/METADATA'

Looks like an appdirs problem? I can't reproduce this, I'm afraid.

@skorokithakis yeah thanks.
Fix is upgrading appdirs to latest
pip install --upgrade appdirs

By the way, this runs great on termux android with youtube-dl. thanks for the great software!

Thank you, I'm glad you like it!


Updating android target and gradle build tools.

I was testing the library and needed to fix some problems with build tools and Android version. Here are the fixes that I needed to do.

Already did in version 0.4.0 Thanks


Double-click on scrollbar creates a new file, and it should not ...

Type: Bug

At 00:14 you can see that a double-click on scrollbar triggers « New File ... » action.
At 00:18 you can see that clicking twice on the scrollbar (without releasing the cursor) then scrolling will trigger the « New File ... » action when releasing the cursor whatever your are still on the the scrollbar or anywhere else in the editor.

This regression has been introduced by https://github.com/microsoft/vscode/issues/116676
This issue has already been mentioned but not addressed in:
https://github.com/microsoft/vscode/issues/173261 (the published fix only takes workbench.list.scrollByPage into account)
https://github.com/microsoft/vscode/issues/195708
And by the way please fix https://github.com/microsoft/vscode/issues/30191, it is daily painful for user with disability.
Vidéo.webm
VS Code version: Code - Insiders 1.85.0-insider (055458feab40fc308fc6d70b185068138c8cf8eb, 2023-11-27T05:35:23.734Z)
OS version: Windows_NT x64 10.0.19044
Modes:

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz (8 x 4200)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: enabled_ondirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: enabled

Load (avg)
undefined

Memory (System)
31.96GB (17.62GB free)

Process Argv
--crash-reporter-id a0d380e0-614c-4e38-9e2e-edc44c0a94b9

Screen Reader
no

VM
33%

Extensions: none
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
vscod805cf:30301675
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30404738
py29gd2263:30784851
vsclangdf:30492506
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30618038
2i9eh265:30646982
showlangstatbar:30737417
pythonfmttext:30716741
fixshowwlkth:30771523
showindicator:30805243
pythongtdpath:30726887
i26e3531:30792625
welcomedialogc:30812479
pythonnosmt12:30779711
pythonidxpt:30768918
pythonnoceb:30776497
asynctok:30898717
dsvsc013:30777762
dsvsc014:30777825
pythonmpsinfo:30859869
dsvsc015:30821418
pythontestfixt:30866404
pythonregdiag2:30871582
pyreplss1:30879911
pythonmypyd1:30859725
pythoncet0:30859736
pythontbext0:30879054
accentitlementst:30870582
dsvsc016:30879898
dsvsc017:30880771
dsvsc018:30880772
aa_t_chat:30882232

I am interested in fixing this issue, but wondering which of the solutions is preferred:

Case 2 won't trigger "New File", while Case 1 still triggers it;
Both Case 1 and Case 2 won't trigger "New File".

Could you share some opinion on this?


FEAT: ADD PRETTIER TO VALIDATE CODE CONSISTENCY ✨

Description

As our project continues to grow and attract more contributors, maintaining consistent code formatting becomes increasingly crucial for readability and collaboration. To address this, I propose integrating Prettier into our GitHub repository as a code formatting tool.
In this case, the workflow is designed to trigger whenever a code change is pushed to the repository, this workflow automatically checks the codebase for proper formatting using Prettier.
With Prettier, we can ensure that all code contributions align with the established coding standards, reducing the burden on developers to manually maintain consistent formatting.

Hey there @amanjaiman1, @balaji-sivasakthi 👋🏻
Please make sure to assign this issue to me as soon as possible so that i can proceed my progress regarding fixing this issue.
Thank you!

@0xabdulkhalid  Thank you for your patience towards this project, and it's really appreciated. However, this issue is not needed as we already have a prettier pre-commit hook in our code base itself.


rds: support dynamic routing to writer and reader instances

Describe the solution you'd like
I'm using AWS Aurora, which provides endpoints to reader replicas and writer instances. However, today, I need to create two instances of a pool and orchestrate in the code the moment to use the reader_pool or writer_pool.
Describe alternatives you've considered
use sqlx::{Pool, Postgres, PgPoolOptions, Error};
use sqlx::postgres::PgRow;
use sqlx::Row;

pub struct AuroraDatabase {
    read_pool: Pool<Postgres>,
    write_pool: Pool<Postgres>,
}

impl AuroraDatabase {
    pub async fn new(read_db_url: &str, write_db_url: &str) -> Result<Self, Error> {
        let read_pool = PgPoolOptions::new()
            .max_connections(5)
            .connect(read_db_url)
            .await?;

        let write_pool = PgPoolOptions::new()
            .max_connections(5)
            .connect(write_db_url)
            .await?;

        Ok(Self { read_pool, write_pool })
    }

    fn get_pool_for_query(&self, query: &str) -> &Pool<Postgres> {
        if is_read_query(query) {
            &self.read_pool
        } else {
            &self.write_pool
        }
    }

    pub async fn query_auto(&self, query_str: &str) -> Result<sqlx::postgres::PgQueryResult, sqlx::Error> {
        let pool = self.get_pool_for_query(query_str);

        sqlx::query(query_str)
            .execute(pool)
            .await
    }
}

This is a suggestion of an approach to supporting this feature. This is my first time in the SQLX community, and I don't know all the internal things related to SQLx. Opening this issue to discuss this is the best approach, or we can build another way,, maybe using macros or traits.
Additional context
I don't think putting this in the core library is necessary, but maybe it can be a feature like "aws-aurora."

Parsing the sql query to determine if a query reads or writes is not quite simple and has an performance impact.
Currently, the query is not parsed by sqlx.
I think it might be better to have two pools and actively manage them, because this way it is more obvious when you may be reading stale data (read after write, you know the drill).
Having this abstracted away might lead to a class of heisenbugs/race-conditions/inconsistencys which are especially hard to track down on the application side.
Example how this might end really badly

(I know that this is sort of contrived on the spot and assumes bad programming..)
Having them be separate pools makes it for example more obvious that the following needs to be protected against:

Eve changes email from A -> B which updates the email and sets the unverified flag.
email-change is replicated
Eve changes email from B -> C which updates the email and sets the unverified flag.
Eve Verifies email B which is still in a readonly replica
email-change is replicated
email-verification is replicated
Eve changes their password, which reads the email and writes the new password-hash in a different query.
password-change is replicated

Eve now has access over C with a known password without ever having verified that email.

These Issues are related:

https://github.com/launchbadge/sqlx/issues/459
(loosly, regarding multiple Hosts) https://github.com/launchbadge/sqlx/issues/179
(loosly, regarding the HA-aspect) https://github.com/launchbadge/sqlx/issues/3333 https://github.com/launchbadge/sqlx/issues/2290

Yeah, I think it would be too surprising if SQLx did this implicitly. You'd risk either returning stale data or requests dying with random errors if it accidentally sent a write query to a read replica.
You're really much better off being explicit about this. I wouldn't even try to guess if it's a read or a write query or not; that should be obvious from the call site.
I'd also recommend creating newtype wrappers for the read pool and the write pool so it's harder to mix them up, and you can tell at a glance what a function needs.


add function to export calendar to iCal

I think it would be cool to have function that exports all holidays for a given year and jurisdiction in iCalendar format. I could implement this if it's within the intended scope of this module.

I'm not an expert in iCalendar, but that'd be a "nice to have" feature.
I think I remember trying to decipher the iCal spec to see if I could use the iCal definition of a country holidays to build the classes or a test suite, but I failed.
Exporting to iCal is surely a bit easier, so why not give it a try?

Here's my proof of concept:
from workalendar.america.canada import BritishColumbia
import icalendar as ic

#=== fetch BC calendar ===

# initialize BC calendar
bc = BritishColumbia()

# fetch holidays
holidays = []
for year in range(2016, 2021):
    holidays += bc.holidays(year)

#=== build iCal file ===

# initialize icalendar
mycal = ic.Calendar()
mycal.add('prodid', '-//Lukas Schreiber//a python script//EN') # default property
mycal.add('version', '2.0') # default property

# add an event for each holiday
for day in holidays:
    event = ic.Event()
    event.add('summary', day[1])
    event.add('dtstart', day[0])
    mycal.add_component(event)

# convert to ical
ical = mycal.to_ical()

#=== save iCal file ===
with open('bc_holidays.ics', 'wb') as f:
    f.write(ical)

I'm planning to turn this into a method of the class Calendar. Just wondering how to deal with the extra dependency to iCalendar. I think I'll import that lazily in the method.
(The proof of concept misses the non-mandatory UID field in the iCalendar file, I'll add this.)

almost there...

Now you can export any workalendar-generated calendar into the iCal format, thanks to you and your geat work!

https://pypi.org/project/workalendar/11.0.0/
https://github.com/peopledoc/workalendar/releases/tag/11.0.0

Happy upgrading!

There's also a basic documentation here: https://peopledoc.github.io/workalendar/ical.html


chore/call-to-actions-LPFG-426-LPFG-302

reason for this PR:
DisciteCourseActions were handled by the template with a series of if statements. It became very hard to read and difficult to add any new statements in the correct places. DisciteCourseModules has less logic but good to keep it consistent anyway. Also makes it more testable. 🤓❤
PR includes:

[x] Refactor Course Actions into a .ts function

[x] Unit tests
[x] should probably move this into lib/ui

[x] Refactor Module Actions into .ts function

[x] Unit tests

[x]  LPFG-302 'Just added' label
[x] LPFG-426 using correct attributes (download, target=_blank) for modules
[x] squash!

Looks like tests are failing

I must've scrapped the class identifier the test was relying on when I was simplifying the .html file. I can add back or another way of verifying can be used. In the unit tests i'm checking if /book/ is in the href string
put as a todo in OP


createBrowserClient clears cookies set in createServerClient automatically with Remix

Bug report

[x] I confirm this is a bug with Supabase, not with my own application.
[x] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug
Following the doc here, I found that createBrowserClient will clear sb-[your-id]-auth-token cookie.
Using import { createClient } from "@supabase/supabase-js"; is fine.

I see, supabaseBrowserClient.auth.getUser() in useEffect cannot find user, which triggered cookie deletion


Uncaught TypeError: Connot set property 'focus' of undefined

Hi Guys,
I have an issue with angular code. After Refresh or Reload page while am Clicking or slecting tabs Errors throwing in console
Uncaught TypeError: Cannot set property 'focus' of undefined
at o.r._leave (bootstrap.bundle.min.js:6)
at HTMLAnchorElement. (bootstrap.bundle.min.js:6)
at HTMLAnchorElement.n (bootstrap.bundle.min.js:6)
at ZoneDelegate.invokeTask (zone-evergreen.js:399)
at Zone.runTask (zone-evergreen.js:167)
at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:480)
at invokeTask (zone-evergreen.js:1621)
at HTMLAnchorElement.globalZoneAwareCallback (zone-evergreen.js:1647)
Iam unable to findout issue. Please anybody knows, Plaese Help me

HI @Mounikaveggalam!
Is the issue still relevant for you with the latest version (v1.1.2)?


Change Text Color on Colored Background to reba(0,0,0, .75 );

@hudakdidit This includes the actual playlist page as well


Add native GCS support for goofys

After this merges it would be good to add a comparison against gcsfuse to the README.


Uncaught ReferenceError: module is not defined

as title says; error when including the JS file

Short answer
Use npm.
If not, try this in the Node.js REPL:
// assuming node (or node.exe) is run from the same directory as lunicode.js
lm = import('./lunicode.js');
lm.then((module) => console.log(module.default.tools.mirror.encode('HEY BRVH')));

Everything you do with Lunicode must be confined within the anonymous function inside the then() call.
Note for those running into Cross-Origin Security Errors
If you're doing this in a browser, you might run into Cross-Origin security errors. There are ways around it, like 'setting up a local server' (MDN Web Docs). The restrictions are intended to prevent security incidents given how risky browsers (large attack surface + public WAN-facing) can be. I might create a Dockerfile to make things easier.
Long Answer
Lunicode.js was designed for use with npm's require(), which has some perks like dynamic async loading, but makes little try-at-home experiments more contrived. Importing lunicode.js doesn't help because of the way the Lunicode tools are exported:
module.exports = new Lunicode();

The actual Lunicode() function isn't exported, just its results. The results of this call would only work with a dynamic import, or npm's require().
Further Reading:

V8. Dynamic import()
StackOverflow 59152731: How to Resolve A Promise From A Dynamic Import


Some hints regarding deBruijn implementation of meta solving

Could you provide some hints regarding meta solving with a deBruijn implementation? Specifically, what would checkSp and newMeta look like?

I'm using https://github.com/brendanzab/rust-nbe-for-mltt now, which seems to use your algorithm but with deBruijn indeces/levels.

I suppose the reason why we parameterize the solved meta with local variables is about scoping. With DBI, there won't be ambiguous names, therefore I didn't do the parameterization -- just solve the meta during conversion check and put them into the meta context. When a definition is checked, I inline all the solved metas.

For the record, here's my impl. It's using de Bruijn indices and meta indices.


Add DATASOURCE_DRIVER and DATASOURCE_POOL keys to all observations

I think that DATASOURCE_DRIVER and DATASOURCE_POOL should apply to all observations. Without this keys we cannot separate metrics in Prometheus when application have multiple datasources. ResutSet/Query metrics without separation by pool doesn't make sense.

Thank you for the PR.
I have merged, polished, and pushed the change.


Linear model and different models

I have added the baseline model and linear model. The scores are not that great. We would have to try out other complex models and see if there is a significant improvement in the scores.


The job used to run this action is reported in the table

In the Check Run summary, the job itself (like compile-status shows with conclusion: null). It should be instead skipped and hidden.

fixed by https://github.com/hellofresh/action-compile-job-status/pull/5


Converted to setPrototypeOf

Hmmm, given that this is what this module does, I'd much rather have this inlined. One less dep to download & manage for a tiny amount of code.

That's cool, I can inline it no problem.  It will be updated in just a minute.

Updated :)


Spanner change includeColumns param to includeProperties to also apply to interleaved properties

@vineela-gampa The PR for this change is now in review. You can now set a Set of properties to include with your queries and reads with the SpannerTemplate.
This way you can selectively load or write some interleaved children properties and not others. This means you can go back to using a simple select query for just the parents and you don't need to build your own nested struct-select queries.

Awesome !! will take a look at the changes done so that i understand.


Where to report typos in the FAQ?

There is a spelling mistake here

We greatly appreciate the data users do sent to us

do sent => do send
Should we make issues for similar mistakes?

The docs for that website are here: https://github.com/Microsoft/vscode-docs Please submit a PR with the fix


⚠ API Next - load whole book has degraded performance

In 4b2f444, API Next - load whole book (https://h-edu.cz/content.api/book/book-a/chaptersContent) experienced degraded performance:

HTTP code: 200
Response time: 15777 ms

Resolved: API Next - load whole book performance has improved in dab99f6 after 16 minutes.


Formalize the issue triage process

For any untriaged issue, we want to

understand whether it is a task for test framework itself or the component

assign an estimate  in the format of dev days

apply other labels to it. E.g good first issue

I like the idea of having a formal process. A few questions:

Is this a proposal, discussion or just a open idea that we need to address on day?
does this process have to be different from the one followed by the org, if not can we open the proposal/discussion/idea on the .github repo so that we can have a singular process across the org
The process seems very sparse on details. e.g. what do you mean task for the component? What components are you referring to here?

Can we also add a few more steps to this process, namely:

Assign a priority: it should be assigned a priority level based on its potential impact and urgency. For example, a critical issue that is blocking progress on the project would be given a higher priority than a minor issue that can be addressed at a later time.
Assign a team member: someone who has the appropriate skills and expertise to address the problem.


Automated cherry pick of #4293: fix: 避免未接收到tenant参数

Cherry pick of #4293 on release/2.12.
#4293: fix: 避免未接收到tenant参数

Codecov Report

:exclamation: No coverage uploaded for pull request base (release/2.12@ea12386). Click here to learn what that means.
The diff coverage is 0%.

@@              Coverage Diff               @@
##             release/2.12   #4295   +/-   ##
==============================================
  Coverage                ?   6.85%
==============================================
  Files                   ?     501
  Lines                   ?   85118
  Branches                ?       0
==============================================
  Hits                    ?    5839
  Misses                  ?   78786
  Partials                ?     493

Flag
Coverage Δ

#aFlag
6.85% <0%> (?)

Impacted Files
Coverage Δ

pkg/compute/models/cloudaccounts.go
0.87% <0%> (ø)

Continue to review full report at Codecov.

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

/lgtm

/approve


Add curation script for the scv2 dataset

Just make sure all the checks are green (I think only the linter is failing), and this LGTM.


bash is not on alpine by default, readme

apk add bash, but it would be better to make it not for bash, sh is enough for most scripts

agreeable, i fixed it.


unistd/getcwd: enhance getcwd when buf is NULL

Summary
Enhance getcwd.
Reference: https://pubs.opengroup.org/onlinepubs/007904975/functions/getcwd.html
Impact
Testing
daily test

@patacongo What is you take on this extension?

I don't have any strong opinion, as long as it is fully compatible with the require at the OpenGroup.org reference.  We do not want any non-standard behavior in the system.

@patacongo What is you take on this extension?

I don't have any strong opinion, as long as it is fully compatible with the require at the OpenGroup.org reference. We do not want any non-standard behavior in the system.

OG says "If buf is a null pointer, the behavior of getcwd() is unspecified."  Are you still good with this once the malloc is fixed?

@patacongo What is you take on this extension?

I don't have any strong opinion, as long as it is fully compatible with the require at the OpenGroup.org reference. We do not want any non-standard behavior in the system.

OG says "If buf is a null pointer, the behavior of getcwd() is unspecified." Are you still good with this once the malloc is fixed?

Yes, it's glibc specific behaviour. But, OG explicitly state that the behavior is unspecified which mean we can do any action here.
So we still confirm OG specification with this patch, but more compatible with the most used libc implementation.


Error when using flowbite-react in Next.js: ReferenceError: document is not defined

Describe the bug
When rendering a page with a modal, if the page wasn't navigated to from a previous context, e.g. using Link from next/link, then a huge stack trace about document being undefined appears from the Modal component.
To Reproduce
Steps to reproduce the behavior:
Use the Modal in any Next.js 13 page.
Expected behavior
The modal should open and the page should load normally.
Screenshots
If applicable, add screenshots to help explain your problem.
System information:

Device: Desktop PC
Resolution: 1440p
OS: Windows 10
Browser: Firefox
Version: Windows 10

Project information:

Tailwind: 3.2.0
Flowbite: 1.6.3
Flowbite React: 0.3.8
Type: Next.js

Additional context
Error trace:
 1 of 1 unhandled error
Server Error

ReferenceError: document is not defined
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
ModalComponent
<EMAIL_ADDRESS>(17:50)
renderWithHooks
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(5658:16)
renderIndeterminateComponent
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(5731:15)
renderElement
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(5946:7)
renderNodeDestructiveImpl
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6104:11)
renderNodeDestructive
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6076:14)
renderIndeterminateComponent
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(5785:7)
renderElement
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(5946:7)
renderNodeDestructiveImpl
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6104:11)
renderNodeDestructive
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6076:14)
renderNode
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6259:12)
renderChildrenArray
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6211:7)
renderNodeDestructiveImpl
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6141:7)
renderNodeDestructive
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6076:14)
renderNode
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6259:12)
renderHostElement
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(5642:3)
renderElement
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(5952:5)
renderNodeDestructiveImpl
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6104:11)
renderNodeDestructive
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6076:14)
renderIndeterminateComponent
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(5785:7)
renderElement
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(5946:7)
renderNodeDestructiveImpl
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6104:11)
renderNodeDestructive
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6076:14)
renderNode
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6259:12)
renderChildrenArray
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6211:7)
renderNodeDestructiveImpl
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6141:7)
renderNodeDestructive
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6076:14)
renderNode
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6259:12)
renderChildrenArray
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6211:7)
renderNodeDestructiveImpl
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6141:7)
renderNodeDestructive
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6076:14)
renderNode
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6259:12)
renderHostElement
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(5642:3)
renderElement
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(5952:5)
renderNodeDestructiveImpl
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6104:11)
renderNodeDestructive
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6076:14)
renderNode
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6259:12)
renderChildrenArray
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6211:7)
renderNodeDestructiveImpl
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6141:7)
renderNodeDestructive
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6076:14)
renderNode
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6259:12)
renderHostElement
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(5642:3)
renderElement
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(5952:5)
renderNodeDestructiveImpl
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6104:11)
renderNodeDestructive
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6076:14)
renderContextProvider
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(5920:3)
renderElement
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6017:11)
renderNodeDestructiveImpl
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6104:11)
renderNodeDestructive
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(6076:14)
renderIndeterminateComponent
file:/home/oleg/case0/node_modules/.pnpm/react-dom<EMAIL_ADDRESS>(5785:7)

Same issue here

It seems related to #123 but not the same issue. Maybe as @zhaodong-wang said we need to check for document. I'm not familiar with NextJS.
Can someone explain why it is working here in the NextJS sample project? 🤔

Can confirm this is happening here too, since last release 0.3.8
@rluders its because flowbite-next-starter is actually running on 0.3.7, if you see here: https://github.com/tulupinc/flowbite-next-starter/blob/main/yarn.lock#L1612
If you clone the repo, delete yarn.lock and then yarn install it will install the latest flowbite-react which is 0.3.8. Then the error mentioned in this issue occurs from yarn build && yarn start

Thank you, @cadu0xcarbon. Well, let's wait to see if the refactoring will solve this issue as well.

This is still broken on 0.4.1

I don't have this issue on the new Next.js branch so I expect it to be resolved soon. Will follow up.

@tulup-conner I'm still having this issue on Flowbite v0.4.2

Hi, also happening to me using the following versions:
"flowbite": "^1.6.3",
"flowbite-react": "^0.4.2",
"next": "13.2.4",
"react": "18.2.0"

@osilkin98 Have you found a workaround? Since I am not sure when the fix will be released.

Upvoting this issue. I'm getting the same errors with the following versions

Getting same problem with following versions
    "flowbite": "^1.6.4",
    "flowbite-react": "^0.4.2",
    "next": "^13.2.1",
    "react": "18.2.0",

Happens in the flowbite-remix-starter as well, when using flowbite-react > 0.3.7.

@nsoubelet My workaround has been to not use the flowbite-react component and instead convert the HTML they provide on flowbite.com into a Modal that I display on my page like this:
const useModal = () =>{
  // implementation
  return { modalContent, isOpen, setOpen, closeModal }
}

// somewhere later
const MyPage = () => {
  const { modalContent, isOpen, openModal, closeModal } = useModal();

  const handleAlert = () => {
    openModal(
      <div>
          {/* content from flowbite */}
          <button onClick={closeModal}>Close</button>
       </div>
    );
  }

  return (
    <>
      <MainPageComponents onAlertClick={handleAlert} />
      {isOpen && modalContent}
    </>
}

What is the ETA on this issue being fixed? At the moment it is blocking builds in Next.js:
@plicanta/nextjs:build: Error occurred prerendering page "/settings". Read more: https://nextjs.org/docs/messages/prerender-error
@plicanta/nextjs:build: ReferenceError: document is not defined
@plicanta/nextjs:build:     at ModalComponent (/home/oleg/case0/node_modules/flowbite-react/lib/cjs/components/Modal/Modal.js:26:32)
@plicanta/nextjs:build:     at Wc (/home/oleg/case0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:68:44)
@plicanta/nextjs:build:     at Zc (/home/oleg/case0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:253)
@plicanta/nextjs:build:     at Z (/home/oleg/case0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
@plicanta/nextjs:build:     at Zc (/home/oleg/case0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:481)
@plicanta/nextjs:build:     at Z (/home/oleg/case0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
@plicanta/nextjs:build:     at $c (/home/oleg/case0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)
@plicanta/nextjs:build:     at bd (/home/oleg/case0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:77:404)
@plicanta/nextjs:build:     at Z (/home/oleg/case0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:217)
@plicanta/nextjs:build:     at $c (/home/oleg/case0/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)

I get the same error in Remix. The server rendering does not have a document so the Modal component needs some tweaks for that.

I encourage anyone who is having this issue to contribute a PR that solves it. Unfortunately I haven't had time this month to get to this and, in general the Modal needs a lot of work to provide a good developer experience. See #568. I can't provide ETAs on anything.

Same problem here as others, not sure how to fix, have tried everything. I'm guessing its something to do with these lines in Modal.js:
if (!containerRef.current) {         containerRef.current = document.createElement('div');     }     // If the current value of the ref is not already a child of the root element,     // append it or replace its parent.     if (containerRef.current.parentNode !== root && (0, window_exists_1.default)()) {         root = root || document.body;         root.appendChild(containerRef.current);     }

I've opened up a fix here https://github.com/themesberg/flowbite-react/pull/677
In the mean time, I've published the changes under"@alfiejones/flowbite-react"

Sweet. I left a comment on #677. This is clearly impacting a lot of people so I'm happy to push a release out ASAP even with just this one fix.

Is this still not fixed? I am facing same issue in Nextjs

Yes, it was fixed in https://github.com/themesberg/flowbite-react/releases/tag/v0.4.3

"flowbite-react": "^0.10.2",
"next": "14.2.14",

The error occurs again
 ⨯ ReferenceError: document is not defined
    at Object.<anonymous> (D:\GitHub\mohistmc-frontend-cn\node_modules\flowbite-datepicker\dist\main.cjs.js:595:13)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at mod.require (D:\GitHub\mohistmc-frontend-cn\node_modules\next\dist\server\require-hook.js:65:28)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (D:\GitHub\mohistmc-frontend-cn\node_modules\flowbite\lib\cjs\components\datepicker\index.js:16:29)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at mod.require (D:\GitHub\mohistmc-frontend-cn\node_modules\next\dist\server\require-hook.js:65:28)

After returning to "flowbite-react": "^0.8.0", the problem no longer occurs

"flowbite-react": "^0.10.2",
"next": "14.2.14",

The error occurs again
 ⨯ ReferenceError: document is not defined
    at Object.<anonymous> (D:\GitHub\mohistmc-frontend-cn\node_modules\flowbite-datepicker\dist\main.cjs.js:595:13)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at mod.require (D:\GitHub\mohistmc-frontend-cn\node_modules\next\dist\server\require-hook.js:65:28)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (D:\GitHub\mohistmc-frontend-cn\node_modules\flowbite\lib\cjs\components\datepicker\index.js:16:29)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at mod.require (D:\GitHub\mohistmc-frontend-cn\node_modules\next\dist\server\require-hook.js:65:28)

After returning to "flowbite-react": "^0.8.0", the problem no longer occurs

Make sure to rm -rf node_modules and do a fresh package install, I just tested this and it works perfectly fine.

"flowbite-react": "^0.10.2",
"next": "14.2.14",

The error occurs again
 ⨯ ReferenceError: document is not defined
    at Object.<anonymous> (D:\GitHub\mohistmc-frontend-cn\node_modules\flowbite-datepicker\dist\main.cjs.js:595:13)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at mod.require (D:\GitHub\mohistmc-frontend-cn\node_modules\next\dist\server\require-hook.js:65:28)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (D:\GitHub\mohistmc-frontend-cn\node_modules\flowbite\lib\cjs\components\datepicker\index.js:16:29)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at mod.require (D:\GitHub\mohistmc-frontend-cn\node_modules\next\dist\server\require-hook.js:65:28)

After returning to , the problem no longer occurs"flowbite-react": "^0.8.0"

Make sure to and do a fresh package install, I just tested this and it works perfectly fine.rm -rf node_modules

I have tried it many times, but still no solution.

@Mgazul if u could provide more context, or even better a reproduce snippet using https://codesandbox.io/ or https://stackblitz.com/ (or others)

@Mgazul if u could provide more context, or even better a reproduce snippet using https://codesandbox.io/ or https://stackblitz.com/ (or others)

https://github.com/MohistMC/mohistmc-frontend-cn
This is my project, you only need to update the corresponding version to reproduce the error

@Mgazul if u could provide more context, or even better a reproduce snippet using https://codesandbox.io/ or https://stackblitz.com/ (or others)

https://github.com/MohistMC/mohistmc-frontend-cn This is my project, you only need to update the corresponding version to reproduce the error

The main issue is that u are importing flowbite and flowbite-react in src/pages/_app.tsx, which is wrong in many ways:

flowbite and flowbite-react don't need to be imported top level, at all
flowbite package is only used and installed as a dependency in flowbite-react because we need to extend the main tailwindcss plugin (this will be gone in the future versions, but for now that's how it is)
the error is thrown because there have been some changes in flowbite-datepicker package that try to access DOM API's and this fails during SSR

importing flowbite top level in any framework of choice that does SSR will fail with the same error, unless treated accordingly so that it only imports on the client, and/or its being triggered/initialized on the client

Now, I'm not sure the reason behind importing both flowbite and flowbite-react top level, maybe it was because u wanted to use components from https://flowbite.com/  and needed the required JS for interactivity and business logic, idk!
But if this is the case, there's a better approach and I can describe it.

@Mgazul now I played around more with ur app, it seems like u do actually use vanilla components from https://flowbite.com/, for example in the navbar->dropdowns, in that case, please add the following snippet in src/pages/_app.tsx to enable JS for vanilla components:
useEffect(() => {
    import('flowbite').then(({ initFlowbite }) => initFlowbite())
}, [])


Implementation of basic HTTP auth and project locking functionality

Before we merge into asreview:auth-layer, it might be good to fix the test-frontend. Pep8 linting would also be nice.

Thanks a lot for the implementation. Looking forward to the PR of @leonardovida extending this.


Lidar question

I now have waveshare + Raspi 4 + IMU working correctly, thanks!

Is WayPonDEV FHL-LD19 Plus 2D Lidar Sensor the same as DTOF LD19 Laser LiDAR Sensor Kit?

Can I somehow connect the Lidar directly without the USB connector? Either to the Pi or to the gendev?

I have an LDS-02 Lidar (from Robotis). It also has USB connector. How hard is it to make it work with gendev and your fork?

Thank you!

They are the same. Some named it as D300, too.
Yes, you can. LD19 is simple, 5V GND, RX data to pi. You will need to assign lidar serial port in your linorobot2 bringup launch. esp32 might not have the resources to handle the lidar messages. In wifi setup, I forwarded the lidar data to udp without processing. However, I would suggest USB connections for both the waveshare and lidar as the initial tests. I believe USB serial will be easier than hardware serial ports on pi. It will be more flexible when you want to try out jetson or mini pc/laptop.
I think it will be easy. The lidar has nothing to do with micro-ROS/waveshare. I think LDS-02 lidar ROS2 driver should be available with turtlebot3. I will check more details later. The laser launch in the linorobot2 bringup will need some mod.

Please note both waveshare and lidar might use similar device id/names. udev rules might be useless. We will need to specify the ports with by-path names.
https://github.com/hippo5329/linorobot2_hardware/wiki#esp32-with-serial-transport-and-lidar-on-the-robot-computer

This is the lidar launch file, which start the lidar driver.
https://github.com/linorobot/linorobot2/blob/humble/linorobot2_bringup/launch/lasers.launch.py
Before connect lidar to linorbot2. You should run lidar view test program to see the lidar scan on rviz2.
LDS-02 = LD08 driver
https://github.com/ROBOTIS-GIT/ld08_driver

I am able to build the ld08 driver with humble branch. But there is no view launch. You may try to view the  scan on rviz2. The serial port assignment will be an problem as it uses cp2102 which is the same as waveshare. We will need to modify the driver src/main.cpp to use our lidar port.


Unable show environment name correctly on spyder notebook

Issue Report Checklist

[x] Searched the issues page for similar reports
[x] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
[x] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
[ ] Could not reproduce inside jupyter qtconsole (if console-related)
[ ] Tried basic troubleshooting (if a bug/error)

[x] Restarted Spyder
[x] Reset preferences with spyder --reset
[ ] Reinstalled the latest version of Anaconda
[ ] Tried the other applicable steps from the Troubleshooting Guide

[x] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description
I installed Spyder and spyder-notebook in Conda base env on my Linux device, and access other python environments with spyder-kernel. The editor is running smoothly. But for Spyder Notebook, it unable to show environment name correctly. And I have to blind test each env till correct one. Here is the screenshot for select the python environment, as you can see, all env show "Python3 (Spyder)".

I am sure that I set ipykernel correctly. Because it shows normally on jupyrt lab and jupyter notebook as following screenshot.

What steps reproduce the problem?

What is the expected output? What do you see instead?
Paste Traceback/Error Below (if applicable)

PASTE TRACEBACK HERE

Versions

Spyder version: 5.5.1
Python version: Python 3.12.2
Qt version: 5.15.2
PyQt version: PyQt5 5.15.10
Operating System name/version: ubuntu 22.04

Dependencies

PASTE DEPENDENCIES HERE

Hi @hawkiyc thank you for the report! I'm not totally sure what could be happening but what do you think @jitseniesen ? Maybe some sort of extension is missing over spyder-notebook? Or maybe spyder-kernels should setup something to be able to properly show the kernel env name? 🤔

Sorry, I missed this report when it was originally submitted. I need to dive into the code to figure out what exactly is happening. If I remember correctly, then the name of the kernel is set to "Python 3 (Spyder)", so we do need to change this so that it also shows the environment. I think that when you start the notebook, it will use the kernel from the environment that is specified in the Spyder preferences (or maybe the environment that was specified when the notebook server was started). I believe that we never considered the possibility of changing the kernel after the notebook was started.
I am transferring this issue to the spyder-notebook repository and I will try to find some time to have a proper look so that we can decide how to improve.


Rename internal types to match the public types

The write/read/bufread modules all repeat the same type names:
pub use gz::EncoderReader as flate2::read::GzEncoder;
pub use deflate::EncoderReader as flate2::read::DeflateEncoder;

Unfortunately the rustdoc for flate2::read::GzEncoder shows the private names:
impl<R: Read> EncoderReader<R>
fn new(r: R, level: Compression) -> EncoderReader<R>

This is a rustdoc bug but even aside from that, this pattern is confusing to people browsing the code because what they see clicking through a [src] link does not match how they will be using the library. Let's try to make the real type names match the public names they are exported as.
Relevant API guideline: https://github.com/brson/rust-api-guidelines/issues/5
Rustdoc bug: https://github.com/rust-lang/rust/issues/41072

I think it would be neat to have the same name for the same functionality but for different modules:
read::deflate::Encoder
read::zlib::Encoder
read::gz::Encoder

So the module declaration would be:
pub mod read {
    pub use deflate;
    pub use zlib;
    pub use gz;
}

@opilar yeah that seems plausible, but other compression/decompression formats probably wouldn't want to mirror that (e.g. read::xz::Decoder). Basically for consistency across crates (e.g. bzip2, xz2, brotli2, etc) I'd favor dropping the inner deflate, zlib, and gz modules here

@alexcrichton so all encoders and decoders goes to one lib.rs file? That's not good.

Oh no I think they'll be in src/read.rs, src/write.rs, and src/bufread.rs

(oops didn't mean to close)

Hi! I'm interested in working on this (it'll be my first Rust OSS contribution). After reading through the code, I have a couple questions. I understand the goal to be to restructure the modules {deflact,zlib,gz}.rs -> {read,bufread,write}.rs. . If that's correct, where would you like the Builder and Header structs, and the test submodule, within each of the existing modules to live?
I poked around your other compression crates to try and find a convention but I found none. I was thinking perhaps either

Keep the format-specific modules but only have them contain the builder and header code; have them import from the new read/bufread/write modules.
Have additional modules headers.rs, builders.rs.

...or others I'm not thinking of. What do you think?

Thanks for picking this up @sw12!
I think the header types are ok to keep living in a (private) gz.rs submodule, they're just reexported at the root of the crate. The main problem with the other types today is that they're renamed on reexport, which is a no-no wrt rustdoc.
For tests I'd just jettison them all from the library anyway. At this point they'd probably all be best as tests/{deflate,zlib,gz}.rs separate from the library crate itself.
But yeah juggling the three similar-but-different-enough formats is a bit of a pain :(

Cool. I've made a bit of progress--lots of deleting, replacing, deleting, etc.; for my future self's sake, what's the fastest way to do this kind of refactoring that you know of? What would be your procedure, roughly?
In any case, my branch is here. cargo build passes (and tests still need to be updated), but only when I have #![deny(missing_docs)] commented out. The reason is that when I separate the structs into different modules (bufread, read, write), code which formerly relied on being able to directly refer to private struct fields (e.g., GzEncoder's inner, head, pos, and eof) breaks. That lead me to resolving the error by making the requisite fields pub, but... is there a better way?

@sw12 ah that's unfortunate, sorry about that! This is a problem that pub(restricted) is intended to solve, but that's unfortunately not stable just yet! With such a feature we'd tag these fields as pub(crate) so the entire crate can access them but not external users. We definitely want to make sure they're private in the long run b/c we don't want them to be part of the public interface!
I think these errors are primarily related to read accessing the internals of the bufread module, right? If that's the case we can perhaps do something like:

Create a private module, bufread_
Move definitions of all flate2::bufread types into bufread_
Reexport all types from bufread_ inside of bufread
Add top-level public functions to bufread_ which access the internals of the types
Implement read types using these top-level functions

That way the top-level functions stay private to the crate (they're in a private module). Does that make sense?

@sw12 how everything is going? I may would like to help you with your contribution.

Looks like this has stalled. As far as I can tell we just need to do what @alexcrichton recommended above. @opilar feel free to do so if you like.

Hi all. My sincere apologies for the unresponsiveness. Yes, Michael, you're
welcome to pick up where I left off if you're interested :)
On Jun 2, 2017 8:21 PM, "Brian Anderson"<EMAIL_ADDRESS>wrote:

Looks like this has stalled. As far as I can tell we just need to do what
@alexcrichton https://github.com/alexcrichton recommended above. @opilar
https://github.com/opilar feel free to do so if you like.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/alexcrichton/flate2-rs/issues/75#issuecomment-305947384,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFXRM00tLfvfj9pB8yUb6lAIfSz1Ht2Yks5sANErgaJpZM4Mzd7P
.

Looks like this is the only 1.0 blocker left.

@opilar are you still making progress on this?

@dtolnay sorry. No.

Fixed in https://github.com/alexcrichton/flate2-rs/pull/120


Chore: fix spelling in StoreType.swift

Just a minor spelling mistake I discovered while using this amazing library
Change interaface to interface in top comment in StoreType.swift

Thank you! 🎉  We've decided to invite all contributors as collaborators to the GitHub Org!
Feel free to ignore if you're not interested!


BEAM-9826 - Update Tika to 1.24.1

This task is to update Tika to 1.24.1 due to:
[CVE-2020-9489] Denial of Service (DOS) Vulnerabilities in Some of Apache Tika's Parsers
https://www.openwall.com/lists/oss-security/2020/04/24/1

Run Java PreCommit


Move internal & common & trace to the new package io.opencensus

Create a new directory "api" for the opencensus-api target.
Make the old instrumentation-api depend on the opencensus-api for the common and internal.
For the moment the implementations still live in the same top directories.

PTAL

Codecov Report

Merging #339 into master will increase coverage by <.01%.
The diff coverage is 75%.

@@             Coverage Diff              @@
##             master     #339      +/-   ##
============================================
+ Coverage     89.26%   89.27%   +<.01%
  Complexity      509      509
============================================
  Files            81       81
  Lines          2059     2060       +1
  Branches        167      167
============================================
+ Hits           1838     1839       +1
  Misses          184      184
  Partials         37       37

Impacted Files
Coverage Δ
Complexity Δ

.../src/main/java/io/opencensus/trace/Annotation.java
100% <ø> (ø)
4 <0> (?)

.../main/java/io/opencensus/trace/AttributeValue.java
100% <ø> (ø)
4 <0> (?)

api/src/main/java/io/opencensus/trace/Link.java
100% <ø> (ø)
2 <0> (?)

...src/main/java/io/opencensus/trace/SpanContext.java
92% <ø> (ø)
15 <0> (?)

...entation/stats/MeasurementDescriptorToViewMap.java
92.68% <ø> (ø)
12 <0> (ø)
:arrow_down:

api/src/main/java/io/opencensus/trace/Sampler.java
100% <ø> (ø)
1 <0> (?)

...pi/src/main/java/io/opencensus/trace/SpanData.java
100% <ø> (ø)
2 <0> (?)

.../io/opencensus/trace/BinaryPropagationHandler.java
100% <ø> (ø)
3 <0> (?)

.../src/main/java/io/opencensus/trace/TracerImpl.java
100% <ø> (ø)
1 <0> (?)

...src/main/java/io/opencensus/trace/TraceConfig.java
88.46% <ø> (ø)
3 <0> (?)

... and 58 more

Continue to review full report at Codecov.

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


Release 0.31.0 does not compile with macos template of Xcode 15.4

Description
I created a new project using Xcode 15.4 with macOS / App template.
I added hedera-sdk-swift package to the project (release 0.31.0 is automatically selected).
Build fails when Xcode tries to compile hedera-sdk-swift:
/Users/eric/Library/Developer/Xcode/DerivedData/Tagada-afirnpgcsvmepebtrdnhddpmxfev/SourcePackages/checkouts/hedera-sdk-swift/Sources/Hedera/CustomFee.swift:302:17: error: type 'UInt64' does not conform to protocol 'IntegerNumber'
         amount: Rational<UInt64> = "1/1",
                 ^
 /Users/eric/Library/Developer/Xcode/DerivedData/Tagada-afirnpgcsvmepebtrdnhddpmxfev/SourcePackages/checkouts/hedera-sdk-swift/Sources/Hedera/CustomFee.swift:333:24: error: type 'UInt64' does not conform to protocol 'IntegerNumber'
     public var amount: Rational<UInt64> {
                        ^
 /Users/eric/Library/Developer/Xcode/DerivedData/Tagada-afirnpgcsvmepebtrdnhddpmxfev/SourcePackages/checkouts/hedera-sdk-swift/Sources/Hedera/CustomFee.swift:351:43: error: type 'UInt64' does not conform to protocol 'IntegerNumber'
     public mutating func amount(_ amount: Rational<UInt64>) -> Self {
                                           ^
 /Users/eric/Library/Developer/Xcode/DerivedData/Tagada-afirnpgcsvmepebtrdnhddpmxfev/SourcePackages/checkouts/hedera-sdk-swift/Sources/Hedera/CustomFee.swift:471:24: error: type 'UInt64' does not conform to protocol 'IntegerNumber'
         exchangeValue: Rational<UInt64> = "1/1",
                        ^
 /Users/eric/Library/Developer/Xcode/DerivedData/Tagada-afirnpgcsvmepebtrdnhddpmxfev/SourcePackages/checkouts/hedera-sdk-swift/Sources/Hedera/CustomFee.swift:518:31: error: type 'UInt64' does not conform to protocol 'IntegerNumber'
     public var exchangeValue: Rational<UInt64> {
                               ^
 /Users/eric/Library/Developer/Xcode/DerivedData/Tagada-afirnpgcsvmepebtrdnhddpmxfev/SourcePackages/checkouts/hedera-sdk-swift/Sources/Hedera/CustomFee.swift:536:57: error: type 'UInt64' does not conform to protocol 'IntegerNumber'
     public mutating func exchangeValue(_ exchangeValue: Rational<UInt64>) -> Self {
                                                         ^
 /Users/eric/Library/Developer/Xcode/DerivedData/Tagada-afirnpgcsvmepebtrdnhddpmxfev/SourcePackages/checkouts/hedera-sdk-swift/Sources/Hedera/Protobufs/Rational+ProtobufCodable.swift:4:37: error: no type for 'T' can satisfy both 'T == UInt64' and 'T : IntegerNumber'
 extension Rational: ProtobufCodable where T == UInt64 {
                                     ^
 /Users/eric/Library/Developer/Xcode/DerivedData/Tagada-afirnpgcsvmepebtrdnhddpmxfev/SourcePackages/checkouts/hedera-sdk-swift/Sources/Hedera/Protobufs/Rational+ProtobufCodable.swift:4:37: error: no type for 'T' can satisfy both 'T == UInt64' and 'T : SignedInteger'
 extension Rational: ProtobufCodable where T == UInt64 {
                                     ^
 /Users/eric/Library/Developer/Xcode/DerivedData/Tagada-afirnpgcsvmepebtrdnhddpmxfev/SourcePackages/checkouts/hedera-sdk-swift/Sources/Hedera/Protobufs/Rational+ProtobufCodable.swift:4:37: error: no type for 'T' can satisfy both 'T == UInt64' and 'T : SignedNumeric'
 extension Rational: ProtobufCodable where T == UInt64 {

Steps to reproduce

Start Xcode 15.4
File > New > Project

Select macOS / App
Enter project name XXX

File > Add Package

Select hedera-sdk-swift

Product > Build

=> build fails (see above)
Additional context
No response
Hedera network
other
Version
v0.31.0
Operating system
macOS 14.6.1

After investigation, it looks like NumberKit 2.6.0 is not compatible with hedera-sdk-swift.
If you force NumberKit to release 2.5.1 project builds successfully.

@ericleponner I have merged a PR that fixes this issue, making the SDK compatible with NumberKit version 2.6.0. This will be present on the SDK 0.32.0 release early next week.

@cdigiacinto 0.32.0 has been released with this fix.


⚠ Bofrost.es has degraded performance

In f233376, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1297 ms

Resolved: Bofrost.es performance has improved in 4d4caff after 22 minutes.


[NDM] Netflow status formatting changes

What does this PR do?
Updates the formatting in the status page in both the GUI and CLI for NDM Netflow. The functionality should be exactly the same, but the spacing has been adjusted to match other integrations.
Motivation
Noticed the spacing wasn't the same as other integrations during QA. See the updated formatting below:

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes
QA this change by adding a few Netflow listeners to your config:
network_devices:
  netflow:
    enabled: true
    listeners:
      - flow_type: netflow5
        workers: 4
        port: 2056
      - flow_type: ipfix
        port: 5023
      - flow_type: netflow9
        port: 4066
      - flow_type: sflow5
        workers: 7
        port: 4077

To check closed listeners, bind an application to UDP on one or more of the ports configured in datadog.yaml. You can use this program to block UDP ports: https://gist.github.com/ken-schneider/c9fba5d8ba5b8cd82f007f31b7e69a48
Reviewer's Checklist

[ ] If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
[ ] Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
[ ] A release note has been added or the changelog/no-changelog label has been applied.
[ ] Changed code has automated tests for its functionality.
[ ] Adequate QA/testing plan information is provided if the qa/skip-qa label is not applied.
[ ] At least one team/.. label has been applied, indicating the team(s) that should QA this change.
[ ] If applicable, docs team has been notified or an issue has been opened on the documentation repo.
[ ] If applicable, the need-change/operator and need-change/helm labels have been applied.
[ ] If applicable, the k8s/<min-version> label, indicating the lowest Kubernetes version compatible with this feature.
[ ] If applicable, the config template has been updated.

This is pretty stale at this point and I believe was fixed with another PR


Exclusive attribute validation mode

Sometimes it makes sense to permit only those attributes which are explicitly declared within the ruleset. It makes validation stricter and prevents typos and unwanted values. This small feature helped us pinpoint bugs in our API output. It also works with custom validators (via global options) and nested attributes (to the extent validate.js supports them).
INPUT
{
    name: "Nicklas",
    age: 23
}

CONSTRAINTS
{
    name: true
}

RESULT
Output of validate(input, constraints, { exclusive: true }):
{
    age: ['Age is not permitted (exclusive mode)']
}

Coverage remained the same at 100.0% when pulling 0f318c93d37606dc1bf5e30974a2c248f61405c6 on gabi-com:master into cccc345aa70cda2a59bccdbc240ffd52b7528bda on ansman:master.

@ansman Why can't this be merged? I think is an awesome feature!

By the way, looking at the code changes in regards to my own needs, why not checking for the presence constraint instead of checking if there is any constraint? This would make it possible to define certain attributes as optional when the presence validation doesn't exist. Usually, you want to make sure that an attribute only when the presence attribute exists.

@ansman ?


Add extern to global vars

Doing some searching it seems that extern and extern "C" are not the same; the first declares that something has external linkage, while the second declares that the symbols are not mangled in C++. This PR hopefully fixes #22 by adding extern to the global variables, along with extern "C" when compiling with C++.
To use extern with extern "C" I needed to add curly brackets, so I created a couple of new macros for defining a block of statements as extern "C".

Oh, a legendary hero has arrived!!! Thanks!
That's a pattern I hadn't thought of at all. I wonder if this would work, also
#ifdef __cplusplus
#define OTIO_EXTERN extern "C" extern
#else
#define OTIO_EXTERN extern
#endif

and then OTIO_EXTERN below, instead of OTIO_API in those cases.
The only reason for the alternate pattern being that one wouldn't need the scoping braces, so the macro could be used anywhere.
If you want to try this, great, otherwise, I'm ready to land as is. LMK which you prefer.

That works with MSVC but not with GCC:
error: invalid use of ‘extern’ in linkage specification
   31 | #define OTIO_EXTERN extern "C" extern

I'm not super happy with the macros I added but couldn't think of a better way to add the curly brackets. Though one positive is you can now replace multiple uses of OTIO_API with a pair of OTIO_API_BEGIN and OTIO_API_END.

Ok, thanks for checking!


Unable to reference Data Structure object within array

Hi there, thanks for such an awesome product!
I am documenting using JSONAPI format, and i am having an issue with expressing an object within an array. This is required due to the JSONAPI spec for non-empty to-many relationships.
Here is my example code:
# Group Stock
All inventory information and management is exposed through the `stock` endpoint.

## Stock [/stock/{id}]

- Parameters
    - id: 1 (number, required) - Specific `id` of a stock item

- Attributes (Stock Base)
    - id: 1 (number) - Specific id of a stock item
    - type: stock (string) - Resource type

### Retireve Stock [GET]
Fetch details about specific stock.

- Response 200 (application/vnd.api+json)
    - Attributes (Stock)

## Stocks [/stock]

- Attributes
    - data(array[Stock]) - Full output of all data

### List all Stock [GET]
Return details of all stock.

- Response 200 (application/vnd.api+json)
    - Attributes (Stocks)

# Data Structures

## Stock Base (object)
- price: 4.50 (number) - Standard price
- sale_price: 3.00 (number) - Specific sale only price
- description: Coconut yoghurt (string) - Text description of stock item
- ingredients: Coconut, Nuts, Milk (string) - Comma separated list of all ingredients
- allergens: Nuts, dairy (string) - Comma separated list of all allergen information
- Include Stock Links Base

## Stock Links Base (object)
- links (object) - JSON API links section
    - *dietary_requirements* (array)
        - Include Linkage
    - *stock_type*
        - Include Linkage

## Linkage (object)
- linkage (object) - JSON API linkage section
    - id: 1 (number)
    - type: reference_type (string)

If you render this in apiary, you will notice that the dietary_requirements array is empty, even though it references the Linkage Data Structure.

Any help would be much appreciated.

Try changing this:
- *dietary_requirements* (array)
    - Include Linkage

To this:
- *dietary_requirements* (array[Linkage])

I don't believe it's possible to use mixins (include) with arrays like in this example.

Wow, totally amazing! Thanks so much for the speedy response, this worked perfectly :smile:

@kylef is correct – Include is meant to work with objects only (spec).
However the parser should warn on this occasion – isn't this the case? //cc @pksunkara

@pete001 also you can specify any type as a content of array like so:
- my_array (array)
    - (type1)
    - (type2)
    - (another type)

Thanks @zdne! The apiary parser wasnt complaining at me, was validating ok.

The parser should give a warning. Let me check.


Add Diagnostic messages to DecorationsReply [phab:D1606]

Created by schroederc at 2017-05-03 16:27:07:

fromberger commented inline (context lost during migration) at 2017-05-03 16:31:48:
Might it make sense to have this repeated?

fromberger accepted this revision at 2017-05-03 16:31:54

schroederc commented inline (context lost during migration) at 2017-05-03 16:45:31:
Possibly, but I can think of a really good motivating example.  As per the offline discussion, we could concatenate messages in extreme cases or have multiple diagnostics.
The same holds true for the context_url where it may be useful to have multiple, but the single url could also lead to a page that contains links to other pages, if necessary.

shahms wrote at 2017-05-03 16:52:33:
At some point it might be good to add a category enum to differentiate broad categories of issues, e.g. "failures" from "omissions".

shahms accepted this revision at 2017-05-03 16:52:33

fromberger commented inline (context lost during migration) at 2017-05-03 16:53:45:
Yeah, that makes sense; it'll be easy to extend it later if we need to.

schroederc closed via commit a8006e0b2e8881fef63f76af48dc05111615ec00 at 2017-05-03 17:22:45


Watcher EthereumEventListeners bound by PG speed

What was the reason that these two listeners (they're transforming events into postgres inserts) part of the same EthereumEventListener cluster of "security" properties of Watcher?
# this instance of the listener sends deposits to be consumed by the convenience API
      EthereumEventListener.prepare_child(
        service_name: :convenience_deposit_processor,
        synced_height_update_key: :last_convenience_deposit_processor_eth_height,
        get_events_callback: &Eth.RootChain.get_deposits/2,
        process_events_callback: fn deposits ->
          Watcher.DB.EthEvent.insert_deposits!(deposits)
          {:ok, []}
        end
      ),
# this instance of the listener sends exits to be consumed by the convenience API
      # we shouldn't use :exit_processor for this, as it has different waiting semantics (waits more)
      EthereumEventListener.prepare_child(
        service_name: :convenience_exit_processor,
        synced_height_update_key: :last_convenience_exit_processor_eth_height,
        get_events_callback: &Eth.RootChain.get_standard_exits/2,
        process_events_callback: fn exits ->
          exits |> Watcher.DB.EthEvent.insert_exits!()
          {:ok, []}
        end
      ),

Cluster setup for watcher is also important for this discussion.
def coordinator_setup do
    deposit_finality_margin = Application.fetch_env!(:omg, :deposit_finality_margin)
    finality_margin = Application.fetch_env!(:omg_watcher, :exit_finality_margin)

    %{
      depositor: [finality_margin: deposit_finality_margin],
      convenience_deposit_processor: [waits_for: [:depositor], finality_margin: deposit_finality_margin],
      block_getter: [
        waits_for: [depositor: :no_margin, convenience_deposit_processor: :no_margin],
        finality_margin: 0
      ],
      exit_processor: [waits_for: :depositor, finality_margin: finality_margin],
      convenience_exit_processor: [
        waits_for: [:convenience_deposit_processor, :block_getter],
        finality_margin: finality_margin
      ],
      exit_finalizer: [
        waits_for: [:depositor, :block_getter, :exit_processor],
        finality_margin: finality_margin
      ],
      exit_challenger: [waits_for: :exit_processor, finality_margin: finality_margin],
      in_flight_exit_processor: [waits_for: :depositor, finality_margin: finality_margin],
      piggyback_processor: [waits_for: :in_flight_exit_processor, finality_margin: finality_margin],
      competitor_processor: [waits_for: :in_flight_exit_processor, finality_margin: finality_margin],
      challenges_responds_processor: [waits_for: :competitor_processor, finality_margin: finality_margin],
      piggyback_challenges_processor: [waits_for: :piggyback_processor, finality_margin: finality_margin],
      ife_exit_finalizer: [
        waits_for: [:depositor, :block_getter, :in_flight_exit_processor, :piggyback_processor],
        finality_margin: finality_margin
      ]
    }
  end

@pdobacz @pnowosie inputs greatly appreciated 🙇

not sure what you mean by your question, but I can throw what I know on this.
So, the listeners weren't every properly divided into security-oriented and informational-API-oriented as this split has been not completed (in other words - there was no convenient way to turn off the informational API/Postgres part of the app).
I think, if you take them out and put somewhere else, maintaining the ordering of event processing that the coordinator_setup defines, it's going to make sense. The ordering is basically first deposits, second blocks, third exits.
Does this help?

You said:

maintaining the ordering of event processing that the coordinator_setup defines, it's going to make sense. The ordering is basically first deposits, second blocks, third exits.

Why is this ordering enforced?

I thought so! Thanks! So this is a strong consistency vs. eventual consistency argument... even though If you try to spend a UTXO not yet created - child chain would stop you at that.
The question is @unnawut (you’re looking at the split now), do we enforce strong consistency on the informational side as well or do we acknowledge that this would eventually converge in into the correct state. This is also where the product comes in (@Pongch )

do we enforce strong consistency on the informational side as well or do we acknowledge that this would eventually converge in into the correct state. This is also where the product comes in

Agree, I think this depends on the usage discussion in #1129
But meanwhile, my 2 cents now would be to aim for informational API with eventual consistency. If it needs a strong consistency then I'd argue the informational API we have now should also be part the security properties.

you'll attempt to "spend" a UTXO not yet created.
even though If you try to spend a UTXO not yet created

ah sorry, I maybe wrote that unclear, so just for clarity: by "spend" (in quotes) I meant do sth in the DB/state you're maintaining. So you'd attempt to say UPDATE a row that represents a deposit UTXO, without that row there, etc.

Solved by the split.


⚠ Unifi Controller has degraded performance

In 11f3c0f, Unifi Controller (https://unifi.vflits.com/) experienced degraded performance:

HTTP code: 200
Response time: 3693 ms

Resolved: Unifi Controller performance has improved in f66e1e1 after 12 minutes.


When multiline=true, TextInput's onChangeText() callback may not fire.

Description
I am working on a chat feature in an app. It works like most chat features. If you type a message and submit, the text is cleared.
The problem is that after clearing the TextInput (input focus is maintained) the first character typed does not fire the onChangeText() callback.
This only is a problem when multiline=true
React Native Version
0.71.10
Output of npx react-native info
System:
OS: macOS 13.4
CPU: (8) x64 Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
Memory: 1.30 GB / 24.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.17.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 9.6.1 - /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.12.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 14.3/14E222b - /usr/bin/xcodebuild
Languages:
Java: 18.0.2 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce

Tap on TextInput
Type "hello world"
Press "submit". Text should be cleared
Type "H"
Press "submit". Text will not clear because onChangeText() will not fire.

Snack, code example, screenshot, or link to a repository
const MessageInput = () => {
  const [message, setMessage] = useState('');

  const submit = () => {
    if(!message) {
      return;
    }
    setMessage('');
  }

  return (
    <>
        <TextInput
            placeholder='Message'
            placeholderTextColor={themes.texts.colors.placeholder}
            multiline={true}
            value={message}
            onChangeText={setMessage}
        />
        <Button title={'submit'} onPress={() => submit()}/>
    </>
  );
}

same issue.
Reverting the below changes worked fine.
https://github.com/facebook/react-native/commit/a804c0f22b4b11b3d9632dc59a6da14f6c4325e3

Hi, I have the same issue

I have confirmed for v0.71.10 as well that the issue still exists.

This is an additional information.
This issue has occurred from v0.71.8 below changes.
https://github.com/facebook/react-native/commit/a804c0f22b4b11b3d9632dc59a6da14f6c4325e3
Therefore, it is possible to work around this by creating a patch that reverts this fix.

Thanks @kkoudev , but I guess this fix was useful for another reason? (not firing onChange too often?)

@nmalzieu
Yes. If I revert the v0.71.8 fix, the issue (#36494) reoccurs.
I can't decide which one should be prioritized because it depends on the application,
If possible, the fix for #36494 should be re-fixed so that it no longer causes this issue.

I've created a PR (#37958) to fix this issue without recurring the #36494 issue.

Update: Fix has been merged https://github.com/facebook/react-native/commit/0c9c57a9f73294414d92428c5d2472dc1e1e5e96 (https://github.com/facebook/react-native/pull/37958#issuecomment-1620255303) 🎉
Thanks @kkoudev for fix.
@kelset can tell more about patches to latest and/or backports if needed :)

ask for it in the release discussions

Closed by #37958

Have folks found that this has been fixed with 0.71.13? It sounds exactly like the bug I'm encountering, I've updated to 0.71.13, and am still experiencing the issue.
What's also throwing me off is that I don't see the tag for 0.71.13 on the commit page, unlike what the documentation says should happen when a fix is released.

Have folks found that this has been fixed with 0.71.13?

@ajyang818 this fix is on main which means will land in 0.73.
Where have you found that this is included in 0.71.x?

Have folks found that this has been fixed with 0.71.13?

@ajyang818 this fix is on main which means will land in 0.73. Where have you found that this is included in 0.71.x?

The fix and reference to this issue is stated in the 0.71.13 change log. I need to verify the fix myself @ajyang818.

Right, I was referring to Should we release 0.71.13? - am I interpreting that discussion correctly?

If I look at the commit, and find the file that's supposed to have the change in my node_modules/, I do in fact see the change - this is in file RCTBackedTextInputDelegateAdapter.m. I'm guessing if I see it there, that means the change did come with 0.71.13, is that fair?

@ajyang818 I can confirm (after initializing a few React-Native projects) this issue was fixed in v0.71.13 and >= v0.72.2. Thanks @kkoudev . Have you deleted your node_modules folders and re-installed your app dependencies?

@ShadReyes Unfortunately still experiencing this bug on both 0.71.13 and 0.72.2. I've tried deleting node_modules and re-installing via yarn with both versions.
My code is slightly different as I've been trying various permutations of async to try to fix this issue:
    const earlierFunctionHandlingTextInputSubmission = async (...) => {
        ...
        await clearMainInput()
        ...
    }

    const clearMainInput = async () => {
        console.log("Calling clearMainInput")
        await setUserMessage('');
    }

    const textInputOnChange = ({ nativeEvent: { eventCount, target, text} }) => {
        console.log("onChange called");
        console.log("new text: " + JSON.stringify(text));
        setUserMessage(text);
    }

    <Swipeable ... >
        <TouchableOpacity ...>
            <TextInput
                    ref={combinedRef}
                    multiline
                    editable
                    placeholder='Type message here!'
                    placeholderTextColor={'lightgray'}
                    value={userMessage}
                    numberOfLines={50}
                    onChange={textInputOnChange}
                />
    ...

The repro with this is very similar to what the original poster had:

Type message into TextInput - I'll see textInputOnChange fire with every character typed, including the first one
Submit the TextInput (in my case, it involves swiping the input)
My fancifully named earlierFunctionHandlingTextInputSubmission runs, which clears the TextInput
Type 1 character - textInputOnChange does NOT fire
Type 2nd character - textInputOnChange DOES fire, and fires for anything typed from then on

I've also noticed that in step 4, if you paste something instead of type, textInputOnChange also does NOT fire.

@ajyang818 I am unsure what you issue is then. I just tested the following code and onChange does fire now when following the same steps.
function App(): JSX.Element {
  const [message, setMessage] = useState('');

  const submit = () => {
    if (!message) {
      return;
    }
    setMessage('');
  };

  return (
    <SafeAreaView>
      <TextInput
        placeholder="Message"
        multiline={true}
        editable={true}
        placeholderTextColor={'lightgray'}
        numberOfLines={50}
        value={message}
        onChangeText={setMessage}
      />
      <Button title={'submit'} onPress={() => submit()} />
    </SafeAreaView>
  );
}

export default App;

Sorry I can't be more help. I would just make sure your project and package.json is setup correctly. If you are working on a monorepo, this is especially important as there is a possibility of having different versions of react-native packages in different node_module folders. Though, I'm guessing you already know all of this.

@ShadReyes I did not know that, and appreciate your help! You may be onto something that there's something weird about how my project is set up. I'm using expo go, but am manually upgrading the react-native version with yarn - would that mess things up?
After reading your last message, I tried the following:

Updating to 0.72.4 - didn't seem to fix it
Creating a simpler repro case in my app on a different screen, very close to yours - this also has the buggy behavior
Tried checking for other versions of react-native by running npm ls react-native - seems to check out, with only 0.72.4 showing up:

├─┬<EMAIL_ADDRESS>│ └──<EMAIL_ADDRESS>deduped
├─┬<EMAIL_ADDRESS>│ └──<EMAIL_ADDRESS>deduped
├─┬<EMAIL_ADDRESS>│ ├─┬<EMAIL_ADDRESS>│ │ └──<EMAIL_ADDRESS>deduped
│ └──<EMAIL_ADDRESS>deduped
├─┬<EMAIL_ADDRESS>│ └──<EMAIL_ADDRESS>deduped
├─┬<EMAIL_ADDRESS>│ └──<EMAIL_ADDRESS>deduped
├─┬<EMAIL_ADDRESS>│ ├─┬<EMAIL_ADDRESS>│ │ └──<EMAIL_ADDRESS>deduped
│ └─┬<EMAIL_ADDRESS>│   └──<EMAIL_ADDRESS>deduped
├─┬<EMAIL_ADDRESS>│ ├─┬<EMAIL_ADDRESS>│ │ └──<EMAIL_ADDRESS>deduped
│ └──<EMAIL_ADDRESS>deduped
├─┬<EMAIL_ADDRESS>│ └──<EMAIL_ADDRESS>deduped
├─┬<EMAIL_ADDRESS>│ └──<EMAIL_ADDRESS>deduped
├─┬<EMAIL_ADDRESS>│ └──<EMAIL_ADDRESS>deduped
├─┬<EMAIL_ADDRESS>│ └──<EMAIL_ADDRESS>deduped
├─┬<EMAIL_ADDRESS>│ └──<EMAIL_ADDRESS>deduped
├─┬<EMAIL_ADDRESS>│ └──<EMAIL_ADDRESS>deduped
├─┬<EMAIL_ADDRESS>│ └──<EMAIL_ADDRESS>deduped
├─┬<EMAIL_ADDRESS>│ └─┬<EMAIL_ADDRESS>│   └──<EMAIL_ADDRESS>deduped
├─┬<EMAIL_ADDRESS>│ ├─┬<EMAIL_ADDRESS>│ │ └─┬<EMAIL_ADDRESS>│ │   └──<EMAIL_ADDRESS>deduped
│ └──<EMAIL_ADDRESS>deduped
└─┬<EMAIL_ADDRESS>  └──<EMAIL_ADDRESS>deduped

Would there be somewhere else to check if my code is somehow still drawing on an older version of react-native?

@ajyang818 As long as you ran that command from the root then that should be it. If it is a monorepo you ran it from the root, you would need to make sure package.json has the workspace set up so that npm/yarn install trickles down to all the children package.json.
I have one last thing you can try! I just realized that in an early comment I said to delete your node_modules folders and reinstall. I completely missed including that you should delete the iOS pods folder and re-run pod install. If that doesn't work, my last advice would be to delete the pods folder and podfile.lock and rerun pod install.
I apologize. I never asked your level of experience in RN. I don't want to assume that you do or do not know to try any of these things.

@ShadReyes I forgot to try pod install! Unfortunately that didn't help. But I appreciate your trying to help! I'll put this aside for now and come back to it later.

confirm. i had react-native: 0.72.0 - the issue is reproducible. upgraded to 0.72.4 - the issue is gone!

the same issue with react native 0.75.4


MLMD Model Card add colab example with more information

Expected Behavior
We should have a colab that can display the model architecture (model.summary() if using keras) as part of the model card.
In addition tensorflow data validation also output general statistics see screenshot:

Finally, It would be nice to show an example where we connect some tensorboard chart (ie. loss chart).
Actual Behavior
No example
Steps to Reproduce the Problem
This is a feature request not a bug

Hi @zippeurfou, I'm not sure I fully understand your suggestion. Is the idea to create a notebook on Colab then link to it from the model card? Or perhaps to create a notebook that's in itself a model card and contains interactive components? Or something else?

Thanks for getting back to me.
This is the latter.
The idea is to add more tensorflow components as mentioned before in the model card and create an example or tutorial explaining how to do so in a reproducible Google colab.

@codesue here is some sample code that can display what I mean.
Assuming keras:
Add model architecture:
from tf.keras.utils import plot_model
import io
model = get_model(...)
model_plot_fn = 'model.png'
def get_model_architecture():
    # Plot the model and save it to a file
    plot_model(model, to_file=model_plot_fn, show_shapes=True, show_layer_names=True)

    # Encode the image as base64
    with open(model_plot_fn, 'rb') as img_file:
        base64_image = base64.b64encode(img_file.read()).decode('utf-8')
    return base64_image
base64_image = get_model_architecture()
def get_model_param():
    buffer = io.StringIO()
    model.summary(print_fn=lambda x: buffer.write(x + '\n\n'))
    model_summary = buffer.getvalue()

    # Close the buffer to free up resources
    buffer.close()
    return model_summary
model_summary = get_model_param()
model_output = create_model_card()
model_output.model_parameters.data[0].graphics.collection.insert(0,mctlib.Graphic(name='Model architecture', image=base64_image))
model_output.model_parameters.model_architecture = model_summary
mct.update_model_card(model_output)

Of course a lot more can be done but this is just an example.

Hi @zippeurfou, I like the general ideas here! I think we could flesh out the design a bit more and confirm whether the tfdv and tensorboard widgets would work outside of a notebook. Would you be willing to contribute these features?

Would you be willing to contribute these features?

To be frank it depends, I have limited availabilities but I do feel like this would be a great addition.
One main reason is to follow metaflow model card where they create a model card by execution.
We have everything to allow us to compare production runs within the model card and I think this would be really helpful.
Starting with including Tensorboard information would be fantastic.


watchdog doesn't get updated when doing ays actor update

Needs investigating

@khaledkbadr please report on AYS9 repo.

see: https://github.com/Jumpscale/ays9/issues/341


APIView - Show language filter as dropdown

Currently language filter is shown as button in APIView to filter reviews created for a specific language.

This was earlier helpful when we supported only 4 languages. But we have added more language support in APIView and this button list is growing. We should convert this to a dropdown instead of button list.
Language :

Resolved in https://github.com/Azure/azure-sdk-tools/pull/2785


chore: bdd-spring-1572978623 to 0.0.1

chore: Promote bdd-spring-1572978623 to version 0.0.1

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Frame rate/performance documentation/configuration

Video recordings seem to be time-delayed and static images seem be get skipped.
Video: https://youtu.be/dEhQs6B4WCE
Device: Samsung Galaxy S5 neo SM-G903F
Android: 6.0.1
By the way: is there a way to know at what frame rate the output is recorded and is reducing recording resolution supposed to allow a higher frame rate? It doesn't seem to in my case.

You can set a breakpoint around here to see what the frame rate is.
It might be worth using CamcorderProfile.get(QUALITY_HIGH_SPEED_HIGH) instead of CamcorderProfile.get(QUALITY_HIGH).
https://developer.android.com/reference/android/media/CamcorderProfile.html#QUALITY_HIGH_SPEED_HIGH


NGINX 301

Got trouble, using this image with HUGO, when accessing tags or catezgories:
https://MYWEBSITE.com/tags/mytag
redirect with a 301 to localhost/tags/mytag  ...
My hugo setup works well with apache on it....

web:
image: jojomi/nginx-static
volumes:
- ./tech.frenchdev.com/public:/var/www
environment:
- VIRTUAL_HOST=tech.frenchdev.com
ports:
- 9099:80
restart: always`


Giveaway Extractor: check whether you've passed SGTools gates

Currently, the GA extractor only displays that there is a SGTools gate and does nothing beyond that. Seeing that it already grabs the link to the gate, it should also check whether you've already passed it and grab the URL if so.
Ideally, I'd like it to even attempt to pass the gate on its own, but I'm less sure about that degree of automation; you might want to talk to knsys and the SG staff about it before even considering implementing such a feature.

I don't think knsys would allow this.

Even if you've already passed the check? Because the only difference between that and loading the SGT tab manually is that you have only one extractor tab open instead of several.

Oh, if you've already passed the check, then retrieving that information would be no problem, I thought you wanted me to trigger the check.

I mean, ideally that would be nice (hey who doesn't want the machine to do all the jobs for them), but I also think that that's edging on abuse; if I were in your shoes, I would definitely not implement it without checking first.

Just checked with knsys and he thinks it's a bad idea to automate it, but he says I can do it if I want to.

Automate what, trigger the check or retrieve the URL if the check has already been triggered?

Trigger the check.
I guess this is the same case as entering giveaways from the main page, cg said there's no problem with that (and he also said that the fact that ESGST offers an option to check for the giveaway description upon entering is nice), even though it's usually frowned upon.
I'll think about it, but I don't see an issue with implementing this as an option.

I see. Well, up to you. I'm perfectly happy with just extracting the GAs from already open gates and can totally live with triggering the check manually, especially if #1212 gets implemented (because then I'll just go there, trigger the gate, and extract again, done). It's a couple of extra steps and some wasted CPU cycles, but it's nothing to stress over.


What license is this forth?

If it's not decided, then perhaps MIT?
https://choosealicense.com/licenses/mit/
Otherwise https://choosealicense.com

Good point, Rob - I just added it (MIT license).
I hope people find it useful, and drop me a note if they use it - I'll be happy to hear about it :-)


Update verdor and modify .gitignore file

Update verdor and modify .gitignore file.

Codecov Report

Merging #54 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #54   +/-   ##
=======================================
  Coverage   17.69%   17.69%
=======================================
  Files          41       41
  Lines        3549     3549
=======================================
  Hits          628      628
  Misses       2893     2893
  Partials       28       28

Continue to review full report at Codecov.

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


[Question] Detailed response on ocelot errors?

Expected Behavior / New Feature
We have custom ocelot middleware that performs custom request validation and want to write an integration test for it.
Is there a option like JwtBearerOptions.IncludeErrorDetails?
if no, is there a way to add desired behavior via custom middleware (or any other way)?

We've done this for errors returned by our middleware, but there are standard middlewares (such as AuthenticationMiddleware) that do not include error details into service response.

As far as I can see in the docs you can configure your authentication the way you want for example I will just expand the example from the docs:
public void ConfigureServices(IServiceCollection services)
{
    var authenticationProviderKey = "TestKey";
    Action<IdentityServerAuthenticationOptions> options = o =>
        {
            o.Authority = "https://whereyouridentityserverlives.com";
            o.ApiName = "api";
            o.SupportedTokens = SupportedTokens.Both;
            o.ApiSecret = "secret";
        };

    services.AddAuthentication()
        // Include error details
        .AddJwtBearer(x => x.IncludeErrorDetails = true)
        .AddIdentityServerAuthentication(authenticationProviderKey, options);

    services.AddOcelot();
}

You can also completely override the Authentication middleware

@ig-sinicyn commented on Jun 25, 2020

We've done this for errors returned by our middleware, but there are standard middlewares (such as AuthenticationMiddleware) that do not include error details into service response.

You needed to

Override AuthenticationMiddleware using Middleware Injection feature
Inherit from  AuthenticationMiddleware  and override behavior
Don't forget to enable logging or exception handling logic when calling base behavior

Good luck in the past!


[ENH] ngboost survival prediction model

The PR https://github.com/sktime/skpro/pull/215 has added ngboost as an skpro regressor.
The package can also be invoked for survival prediction, i.e., for using censoring information C as in the skpro survival models.
We should also add a version of the ngboost algorithm for survival prediction, hence.
To avoid user confusion, it might be better to add this as a separate estimator in the survival module, although the two estimators may end up sharing a lot of similarities and hence, possibly, an inheritance tree.

Should I start working on this issue?

If you find it interesting, of course!
Given that you've interfaced ngboost first time round, it should be less work for you than anyone.


Profile was not running And the issue was this can u help me out?

Traceback (most recent call last):
File "aws_inventory.py", line 11, in
import aws_inventory.invoker
File "/home/ec2-user/saipoc/aws-inventory/aws_inventory/invoker.py", line 11, in
import progress
File "/home/ec2-user/saipoc/aws-inventory/aws_inventory/progress.py", line 5, in
import Tkinter as tk
ImportError: No module named Tkinter

@bitsandsalsa  I am using the linux and i have done those but still i am facing the issue.

The title of this GitHub issue does not speak to the Python stack trace above. I am assuming the problem has to do with the Python stack trace.
I see you have a home directory of ec2-user. That is indicative of an AWS instance which does not by default have GUI functionality.
What distribution of Linux? If Tk is properly installed, the following file should exist: /usr/lib/python2.7/lib-dynload/_tkinter.so. Does it exist? There is a Tk demo you can run to see if it is working and the version: python -m Tkinter. What version of Python are you using: python -V?

@bitsandsalsa : I am using the ubuntu 18 server . I am facing the following issues. If u have some time can u help me to figure it out? It will help me a lot. Thanks.
Traceback (most recent call last):
File "aws_inventory.py", line 320, in
main(parse_args())
File "aws_inventory.py", line 317, in main
aws_inventory.invoker.ApiInvoker(args, service_descriptors, ops_count).start()
File "/home/ubuntu/aws-inventory/aws_inventory/invoker.py", line 44, in start
self._probe_services)
File "/home/ubuntu/aws-inventory/aws_inventory/progress.py", line 16, in init
ttk.Frame.init(self, relief='ridge', borderwidth=2)
File "/usr/lib/python2.7/lib-tk/ttk.py", line 738, in init
Widget.init(self, master, "ttk::frame", kw)
File "/usr/lib/python2.7/lib-tk/ttk.py", line 551, in init
master = setup_master(master)
File "/usr/lib/python2.7/lib-tk/ttk.py", line 354, in setup_master
master = Tkinter._default_root or Tkinter.Tk()
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1822, in init
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable