text:
[5.4] Blade @extends() new ordering system harder to reason about

Laravel Version: 5.4.4
PHP Version: 7.1.0
Database Driver & Version: MySQL 5.7.17

Description:
The new blade @extends() ordering system introduced in version 5.4 has made it harder to reason about view files and also made it almost impossible (to my knowledge) to implement a few hierarchical functionalities enjoyed in previous versions...
Steps To Reproduce:
Using this setup
global-layout.blade.php
<html>
<head>
@stack('scripts')
@section('scripts')@show
</head>
<body>

</body>
</html>

app-layout.blade.php
@extends('global-layout')

@push('scripts')
<script src="/js/jquery.js"></script>
@endpush

@section('scripts')
<script src="js/jquery.js"></script>
@endsection

some-view.blade.php
@extends('app-layout')

@push('scripts')
<script src="js/some-view.js"></script>
@endpush

@section('scripts')
    @parent
    <script src="js/some-view.js"></script>
@endsection

Using the @stack directive,
Expected 'jquery' to render before 'some-view.js'
but  'some-view.js' is rendered before 'jquery'
Reason: Child view executed first before parent view (extended view)
Using the @section method
This should work right?? But NO.. it doesn't but instead displays a ##parent-placeholder-3880b9413975c06b32c01851bbe852c1198bf003## in the HTML output...
The reason being that Calling the @parent directive would try to load the section content of the extended layout.. but this doesn't exist as the child view is executed first before the parent view..

See #17541 where this was discussed in detail. Taylor also spoke directly to this in the #internals slack channel yesterday.

The ##parent-placeholder-3880b9413975c06b32c01851bbe852c1198bf003## should not be shwon in the html output. Can you verify that you really are on 5.4.4 and try a php artisan view:clear?

@sisve @devcircus
Yea.. I do understand the ordering and it seems right since when the view is compiled the @extends is moved to the bottom of the generated php file....
But my issue is how do I achieve what I want using the arrangement above.... in a sane way....
** Thought ** I am thinking of creating a custom @prepends() directive that prepends the content to the stack instead.

I copied the Blade Template Inheritance example verbatim and I'm also getting ##parent-placeholder-...## in the output.
php artisan view:clear seems to allow the template to be rendered correctly but subsequent requests cause ##parent-placeholder-...##. to come back.

There are no plans to change the new behaviour. It's already been discussed at length.

@GrahamCampbell Forget what's been said previously for a moment -- are you saying that the official example in the documentation should produce placeholder garbage as the intended result?
I'm getting:
##parent-placeholder-19bd1503d9bad449304cc6b4e977b74bac6cc771##
This is appended to the master sidebar.

This is my body content.

Errrr. Ping @taylorotwell.

@GrahamCampbell @taylorotwell Just updated to version 5.4.6 of the framework and I am still getting the ##parent-placeholder--xxxx##

Also, if you have discussed this new behavior at length, can you suggest the way to go forward in achieving  what i want?
I have a template.blade.php layout and a few other layouts that extends the template layout...  app.blade.php  and auth.blade.php.... controller views extends from each of these say login.blade.php extends auth.blade.php.... I don't really care about the execution order that was discussed... But content inserted in the auth layout have to be rendered before those defined in the login view extending the auth layout...
So how to go about this?
Asked this in forums and no response....

Also, if you have discussed this new behavior at length, can you suggest the way to go forward in achieving what i want?
I have a template.blade.php layout and a few other layouts... app.blade.php layout and auth.blade.php layouts that extend the template layout.... controller views extends from each of these say login.blade.php extends auth.blade.php.... I don't really care about the execution order that was discussed... In my situation, content inserted in the auth layout have to be rendered before those defined in the login view extending the auth layout...
So how to go about this?
Asked this in forums and no response....

@mjason4x Throw the baby out with the bathwater and switch to Twig. I'm not going to waste any more time with this when there exists a viable alternative that works. Sometimes it's better in the long run to cut your losses.

@morrelinko Did you php artisan view:clear after upgrading Laravel version?

@sisve @taylorotwell @GrahamCampbell
Cleared it all yet no way forward... ** NOTE ** already upgraded to 5.4.6
I had to duplicate my global layout just to move forward..
It seems when you discussed this new behavior, multiple nested layouts, @parent directive and PARENT  -> CHILD order content injection were not considered...
Makes no logical sense why core team thinks content from child views should display first...
I would really like to see the thread where this was discussed to understand the reasoning behind it, probably they also discussed a way out of my issue...

I can't replicate this placeholder thing on latest 5.4, followed the steps to replicate stated in the original issue and @parent successfully displayed the content of the parent section.
Replacing the scripts loaded with some strings to be able to debug, the output I get is:
child stack content
parent stack content
parent section content
child section content

@themsaid I think the parent placeholders are from old cached 5.4.0 views, and should be fixed with an upgrade to 5.4.1 and a php artisan view:clear.
@mjason4x The view:clear would fix the "##parent-placeholder--xxxx##" issue mentioned earlier, not anything related to the order of the output.
Views are rendered before layouts so they can push content into stacks and sections that are contained within the layout. Imagine that the layout is executed first; the @stack would be empty when rendered, before the @push has executed by the view.
The blade-examples in this issue use several chained/nested layouts which further complicates the issue, they are all executed in reverse order so that the topmost is executed last and have the full @stack result.

If you think that the starting point of a view render is the top most parent then you'll find this as a bug, however the starting point is the view being rendered, in this case it's some-view.blade.php not global-layout.blade.php.

The @push issue is fixed a few days ago, I've submitted a PR to introduce a @reversestack that people who prefer the 5.3 behaviour can use. https://github.com/laravel/framework/pull/17675

authors: GrahamCampbell devcircus mjason4x morrelinko sisve themsaid tylercubell

repo: laravel/framework


text:
Request and Server variables are not available in routes while unit testing

Laravel Version: 5.4.17
PHP Version: 7.1

Sorry if just I'm not getting something. In the routes/web.php file we are accessing the Request::segments() for multi-lingual support. It's all great, except if we want to HTTP test it with $this->get('...'). Then in the routes file, REQUEST_URI is empty, segments is empty, everything is empty, but in the controller method everything is fine. Is this the expected behavior? If so, is there a general solution?

I think this happens because Laravel is bootstrapped by CLI when running tests and, therefore, no HTTP Request.

@KristofMorva hey Kristof I've tried to replicate this issue, yet I get the segments just fine:

This is the test file:

This is the tests output:

This is the browser output:

is that what you meant ?

Hey @edenreich, thanks for checking this out. In the Controller methods (and therefore in the route methods also) the segments are really available, however, they are not when building the routes, for example in our case:
Route::group(['prefix' => LanguageService::getRoutePrefix(Request::segment(1)), ...)

@KristofMorva ahh I see what you mean, I will take a look

@KristofMorva well the issue is that the routes while being registered in Illuminate\Routing\Router.php on line 364 are not yet aware of the current request. To fix this, or rather saying to allow this, it will require to set the current request before the routes are being registered. I will take a look at this a bit more later...but not sure yet if this is expected behavior too we need to ask taylor

Hi guys,
Any solution for this issue ?

I am facing same issue for api requests from different domain
With Illuminate\Http\Request $request its returning empty $request object
With request() helper request object is fine
sharing screen shot for difference in both
Its weird the difference in request() and $request of (Illuminate\Http\Request)

Now I have to replace $request with request(), I don't what's causing this issue, I event try laravel-cors plugin.

My issue is resolved There was a typo in "use Illuminate\Http\Request;"
I was using "use Illuminate\http\Request;" instead
Hope it helps someone

source: gharchive/issue

license: MIT

license_type: permissive

license_source: github-api


text:
Value attribute not getting replaced properly for gt/gte/lt/lte validation rules

Laravel Version: 5.7.0 (and below)
PHP Version: 7.1.14
Database Driver & Version: N/A

Description:
The :value attribute isn’t being replaced properly for gt/gte/lt/lte validation rules. When I specify a value, the error message always comes out as:

The quantity must be greater than or equal 0.

Looking under the hood, it seems the replacer method is validating the size rather than the integer value of the parameter.
Steps To Reproduce:
Create a brand new application; placed this in a route:
$validator = Validator::make(
    ['quantity' => 5],
    ['quantity' => 'gte:10']
);

Validation fails (as expected), but the error message is:

The quantity must be greater than or equal 0.

I expect:

The quantity must be greater than or equal 10.

@Alymosul Can you explain why you used
return str_replace(':value', $this->getSize($parameters[0], $this->getValue($parameters[0])), $message);

instead of just
return str_replace(':value', $parameters[0], $message);

in #24135?

@martinbean Yes I confirm that this is a bug, I'll submit a PR to fix it. Thank you for pointing this out.
@staudenmeir The purpose of these rules at first was to compare two attributes(input fields) against each other, then I extended the functionality to include comparing against values but it seems i missed to check if you passed an attribute or a value in the ReplaceAttributes trait methods.

Please close the issue.

authors: Alymosul martinbean staudenmeir


text:
selectRaw() doesn't work inside of withCount()

Laravel Version: 6.0.3
PHP Version: 7.2.16
Database Driver & Version: libmysql - mysqlnd 5.0.12

Description:
When using a closure inside of withCount(), the method selectRaw('...') is ignored whereas select(DB::raw('...')) works perfectly fine.
Steps To Reproduce:
Article::withCount([
	'contracts as sum_demands' => function($query) {
		$query->select(DB::raw('SUM(`demands`)')); // <-- this works
		$query->selectRaw('SUM(`demands`)'); // <-- this doesn't work
	}
]);

When using $query->selectRaw('SUM(demands)')); the output query is:
SELECT
	`articles`.*,
	(SELECT COUNT(*) // note the COUNT(*) here, this should me SUM(demands)
	FROM `contracts`
	WHERE `articles`.`id` = `contracts`.`article_id`
) AS `sum_demands`
FROM `articles`

select(DB::raw()) and selectRaw() are actually different: selectRaw() is equivalent to addSelect(DB::raw()), not select(DB::raw()).
I just saw that the documentation is incorrect on this point

Thanks for your help!
So would it make sense for future cases to create an idea to rename selectRaw() to addSelectRaw()? I'm not sure if renaming a function is worth creating an idea or if a pull request is enough.

I don't think we should rename the method. This would be a major breaking change and affect a lot of users.

I don't think changing the method name is a good idea either. Feel free to send in a PR to the docs. Thanks.

I sent in a pr for this: https://github.com/laravel/docs/pull/5511

authors: driesvints rimace staudenmeir


text:
Blade not able to parse array casted by Eloquent?

Laravel Version: 6.0
PHP Version: 7.4.0
Database Driver & Version: MySQL 8.0.18

Description:
I have a model Transaction that has a column line_items. The column is populated with a serialised json string. This is primarily used for invoice/receipt generation and keeping track of what the user purchased. I have a cast for this column inside my model like so;
protected $casts = [
    'line_items' => 'array'
];

Now when I try even use a basic reference to this inside my blade template like so;
{{ $transaction->line_items }}
it errors with;
Facade\Ignition\Exceptions\ViewException [E_WARNING] htmlspecialchars() expects parameter 1 to be string, array given
I'm not entirely sure if this is a bug or just me doing something wrong, but there is no documentation on it and every "solution" I've found involves some really messy double for-loop as well as inlining a json_decode inside the blade template and I'm not particularly keen on using that solution as it seems  not only unnecessary but also completely against the principle of Laravel imo.

Definitely seems like the expected output. Take any array and stick it between curly braces and you should get the same.

Hey there,
Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to report back and I'll gladly help you out and re-open this issue.

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

Thanks!

authors: devcircus driesvints zyxxyzyxz


text:
LogicException: Please make sure the PHP Redis extension is installed and enabled. in /home/user/public_html/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php:76

Laravel Version: 7.5.0
PHP Version: 7.2
Database Driver & Version: Redis

Everything was working fine but suddenly this error appear i changed the phpredis to predis but error is same.
Steps To Reproduce:
I am calling the event function event(new ChatsEvent($data));
LogicException: Please make sure the PHP Redis extension is installed and enabled. in /home/user/public_html/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php:76
Stack trace:
#0 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Support/helpers.php(428): Illuminate\Redis\Connectors\PhpRedisConnector->Illuminate\Redis\Connectors\{closure}(Object(Illuminate\Support\Facades\Redis))
#1 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php(104): tap(Object(Illuminate\Support\Facades\Redis), Object(Closure))
#2 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php(27): Illuminate\Redis\Connectors\PhpRedisConnector->createClient(Array)
#3 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php(31): Illuminate\Redis\Connectors\PhpRedisConnector->Illuminate\Redis\Connectors\{closure}()
#4 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Redis/RedisManager.php(111): Illuminate\Redis\Connectors\PhpRedisConnector->connect(Array, Array)
#5 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Redis/RedisManager.php(90): Illuminate\Redis\RedisManager->resolve('default')
#6 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php(108): Illuminate\Redis\RedisManager->connection('default')
#7 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php(64): Illuminate\Broadcasting\Broadcasters\RedisBroadcaster->broadcast(Array, 'ChatsEvent', Array)
#8 [internal function]: Illuminate\Broadcasting\BroadcastEvent->handle(Object(Illuminate\Broadcasting\Broadcasters\RedisBroadcaster))
#9 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(32): call_user_func_array(Array, Array)
#10 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Container/Util.php(36): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#11 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(90): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#12 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(34): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#13 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php(592): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#14 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(94): Illuminate\Container\Container->call(Array)
#15 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent))
#16 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent))
#17 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(98): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#18 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(83): Illuminate\Bus\Dispatcher->dispatchNow(Object(Illuminate\Broadcasting\BroadcastEvent), false)
#19 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent))
#20 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent))
#21 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(85): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#22 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(59): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\DatabaseJob), Object(Illuminate\Broadcasting\BroadcastEvent))
#23 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(98): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\DatabaseJob), Array)
#24 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(356): Illuminate\Queue\Jobs\Job->fire()
#25 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(306): Illuminate\Queue\Worker->process('database', Object(Illuminate\Queue\Jobs\DatabaseJob), Object(Illuminate\Queue\WorkerOptions))
#26 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(132): Illuminate\Queue\Worker->runJob(Object(Illuminate\Queue\Jobs\DatabaseJob), 'database', Object(Illuminate\Queue\WorkerOptions))
#27 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(112): Illuminate\Queue\Worker->daemon('database', 'default', Object(Illuminate\Queue\WorkerOptions))
#28 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(96): Illuminate\Queue\Console\WorkCommand->runWorker('database', 'default')
#29 [internal function]: Illuminate\Queue\Console\WorkCommand->handle()
#30 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(32): call_user_func_array(Array, Array)
#31 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Container/Util.php(36): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#32 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(90): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#33 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(34): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#34 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php(592): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#35 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Console/Command.php(134): Illuminate\Container\Container->call(Array)
#36 /home/user/public_html/vendor/symfony/console/Command/Command.php(255): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#37 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#38 /home/user/public_html/vendor/symfony/console/Application.php(912): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#39 /home/user/public_html/vendor/symfony/console/Application.php(264): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#40 /home/user/public_html/vendor/symfony/console/Application.php(140): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#41 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Console/Application.php(93): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#42 /home/user/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#43 /home/user/public_html/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#44 {main}

Hi there,
Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.

authors: driesvints umairali


text:
Eloquent find() method generate weird sql query

Laravel Version: 7.8.1
PHP Version: 7.3.12
Database Driver & Version: Mysql 8.0.19

Description:
The Eloquent find() method seems not generating sql as it should be, when we pass a Model to the $id parameter. The sql query maybe working as expected, but it seems weird for me.
$site->participants()->find(Auth::user())

It will produce a query something like this:
select
  `users`.*,
  `site_participant`.`site_id` as `pivot_site_id`,
  `site_participant`.`participant_id` as `pivot_participant_id`
from
  `users`
  inner join `site_participant` on `users`.`id` = `site_participant`.`participant_id`
where
  `site_participant`.`site_id` = 1
  and `users`.`id` in (
    1,
    'John Doe',
    'johndoe@example.com',
    '2020-04-28T22:50:03.000000Z',
    '2020-04-28T22:50:03.000000Z',
    '2020-04-28T22:50:03.000000Z'
  )

Instead only passing the Model's ID, Laravel pass the whole Model's data.
The docblock said that it accepts Model as a value. But it seems Laravel not handle it correctly.
It affects:

Illuminate\Database\Eloquent\Builder::find()
Illuminate\Database\Eloquent\Relations\BelongsToMany::find()
Illuminate\Database\Eloquent\Relations\HasManyThrough::find()

The docblock said that it accepts Model as a value.

Where does it say that? It says that it returns a model.

@staudenmeir Ah, you're right. Ok, let me re-phrase my statement.

It seems this is related to https://github.com/laravel/framework/pull/30312

I don't know this use case, but in Laravel 7.x now it's impossible to pass an EloquentCollection into Illuminate\Database\Eloquent\Relations\BelongsToMany::findMany().
In the end, I don't know this is a bug or just a feature that getting removed.
Because in 7.x there is still Illuminate\Database\Eloquent\Relations\Concerns\InteractsWithPivotTable::parseIds() that prepares ids from an EloquentCollection.

Passing a model isn't supported.

@driesvints But but..in 6.x, it's still supported. Is there any documentation about this?
So what's the purpose of this https://github.com/laravel/framework/blob/7.x/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php#L591 ?

Well, at least it has been fixed by @taylorotwell at the end...
https://github.com/laravel/framework/commit/353442d80722e8862c3f140b7e34c27578e89f7d#diff-fac59ee2778e54567a539e9140a1a42c

authors: driesvints nmfzone staudenmeir


text:
PUT method  400 bad request error

Laravel Version: 5.1.*
PHP Version: 7.1
Database Driver & Version: MYSQL 5.7

Description:
I couldn't use _method:put in form data to sent put request.
Everytime I add _method:put to form data , It generate 400 browser could not understand your request.
When i remove _method:put , It works as normal but it go with POST method.
Steps To Reproduce:

This seems like a question for one of the support channels.
You find all support channels here: https://laravel.com/docs/8.x/contributions#support-questions
What you need to Put as an Input into the Form:
<input type="hidden" name="_method" value="put" />

If you want to make a Request with Ajax, then you would put it there.
I don't know where you added _method:put because you didn't provide any example code.
Also did you use a "PUT" or only a "POST" route?

Also please check the currently supposed Laravel Versions: https://laravel.com/docs/8.x/releases#support-policy
And upgrade if possible.

This seems like a question for one of the support channels.
You find all support channels here: https://laravel.com/docs/8.x/contributions#support-questions
What you need to Put as an Input into the Form:
<input type="hidden" name="_method" value="put" />

If you want to make a Request with Ajax, then you would put it there.
I don't know where you added _method:put because you didn't provide any example code.
Also did you use a "PUT" or only a "POST" route?

Yes i have included _method field in every form request
 <form data-parsley-validate novalidate class="form-horizontal" action="{{ admin_url('single/'.$single->user_id) }}" method="post">
              {!! csrf_field() !!}
              {!! method_field('PUT') !!}

You can also use the  @method('put') and @csrf directives within you blade template.

@daniel-koertvelyessy I am not sure this was possible in Laravel 5.1 https://laravel.com/docs/5.1/routing#form-method-spoofing

@daniel-koertvelyessy I am not sure if this was possible in Laravel 5.1 https://laravel.com/docs/5.1/routing#form-method-spoofing

Is there a chance that laravel generate 400 bad request error ? Sir

authors: Jubeki alvinluo666 daniel-koertvelyessy


text:
Laravel sail does not work

I am on WSL2 trying to create a Laravel application with sail. I create a laravel project with the laravel.build system and run ./vendor/bin/sail up, but when I try to connect to localhost nothing happens.
My output from the docker container looks like this:
laravel.test_1  | 2022-05-18 02:06:20,611 INFO Set uid to user 0 succeeded
laravel.test_1  | 2022-05-18 02:06:20,612 INFO supervisord started with pid 9
laravel.test_1  | 2022-05-18 02:06:21,614 INFO spawned: 'php' with pid 10
laravel.test_1  | Starting Laravel development server: http://0.0.0.0:80
laravel.test_1  | [Wed May 18 02:06:21 2022] PHP 8.1.6 Development Server (http://0.0.0.0:80) started
laravel.test_1  | 2022-05-18 02:06:23,214 INFO success: php entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
laravel.test_1  | [Wed May 18 02:06:55 2022] 172.20.0.1:39250 Accepted
laravel.test_1  | [Wed May 18 02:06:55 2022] 172.20.0.1:39250 Closing
laravel.test_1  | [Wed May 18 02:07:03 2022] 172.20.0.1:39254 Accepted
laravel.test_1  | [Wed May 18 02:07:03 2022] 172.20.0.1:39254 Closing

Im just gonna use symfony


text:
Unhandled ErrorException when an invalid Accept Header received

Laravel Version
11.5
PHP Version
8.3
Database Driver & Version
No response
Description
Receiving a POST request with Accept header set to ; results in following error exception.
file: /var/www/html/vendor/symfony/http-foundation/AcceptHeader.php
line: 56
message: Trying to access array offset on null

Steps To Reproduce
Make a new Laravel project and serve it.
Issue a request using following curl command:
curl -X POST -H "Accept: ;" http://localhost:8000/up

Seems like an issue in Symfony as you can see from the class path. Please open an issue with them.

authors: driesvints rezsk


text:
Eloquent model silently omits fields when using "firstOrNew" on a model with fillable defined

If you request firstOrNew on an eloquent model, where there are fillable properties defined, if no model is found, one will be returned with only the properties defined in fillable.
So if I have the properties foreign_key and type which together create a candidate key, and I only have type in my fillable array, a new model object will be returned, with only type defined.
This problem could either be fixed in a number of ways.

Having eloquent fail when attempting this
Having it ignore fillable on firstOrNew, and set all the submitted properties
Documenting this behavior.

I believe this to be expected behavior.
If you want force fill it, use the unguarded method:
$attributes = [...];

$model = User::unguarded(function() use ($attributes)
{
    return User::firstOrNew($attributes);
});

I agree with Joseph. The mass assignment protection wouldn't make sense if it wasn't always enabled.

If this is expected and desired behavior (which I think is fine), it needs to be documented.

I actually bumped into this same thing. I had earlier defined one fillable attribute and I was wondering why it does not assign the rest of them. For me it would make much more sense if firstOrCreate and firstOrNew would throw MassAssignmentException like Model::create does in this case. We are still creating a new model based on array aren't we?

@lasselehtinen Model::create() behaves exactly the same as firstOrCreate() or firstOrNew(). If at least one $fillable attributes is defined no exception will be thrown. The simple reason being that they all use the constructor and then fill() to assign the attributes.

@lukasgeiter OK I did not actually know this. This might be a stupid question, but why shouldn't it throw a MassAssignmentException if you try to pass other attributes that are not fillable? Is bit for cases when user can pass for example garbage parameters from the URL and you pass it on to Model::create(Input::all()) and you don't want to throw an exception in those cases by default? In that scenario this behavior makes sense, I agree.
But like @john-mark-wilkinson mentioned, it would be probably wise to mention this in the documentation. I checked the WIP 5.1 documentation and seems like Taylor hasn't finished the Eloquent part just yet.

@lasselehtinen Exactly! :wink:

authors: JosephSilber john-mark-wilkinson lasselehtinen lukasgeiter


text:
[5.2] [Proposal] Restrict filling of Eloquent Collection with models only

The main feature of this PR if related to all bugs mentioned in #9163, #10627 and #10596.
As Eloquent Collection has many model-specific features, it must not accept any data different from Models, otherwise it can trigger errors.
Te realize this, I've implemented Arr::check helper with throws an exception in case an item in array does not match filter.
In second, there is a new method fill in base collection which allows to replace collection items. It is now used in __construct, so allows to control injected items in its descendant classes.
And finally all checks and type hints are implemented in Eloquent Collections.
Tests are currently fixed to work with new logic and don't test new features. However I'll do the new ones if you accept this proposal.

Going to hold off on this for now. I think it's kinda rare people would have Eloquent collections with non-eloquent values, especially after merging your other PR.

source: gharchive/pull-request

authors: rkgrep taylorotwell


text:
[9.x] Fix support of nullable type for AsArrayObject/AsCollection

Previous fix https://github.com/laravel/framework/pull/36526 of these 2 classes not covered the behavior of php json_encode / json_decode functions when casting null.
// Bugly fragment
public function get($model, $key, $value, $attributes)
{
    // if $attributes[$key] === "null" it is assumed as "set" but ArrayObject can't accept null values.
    return isset($attributes[$key]) ? new ArrayObject(json_decode($attributes[$key], true)) : null;
}

If you have tried to set AsArrayObject attribute value to null (or had it by default), json_encode processed it as sting "null" which is correct from the point of JSON, and it was stored successfully. Nothing wrong here.
But next time you tried to access the attribute, the error ArrayObject::__construct(): Argument #1 ($array) must be of type array, null given was raised because it was already converted to a string and json_decode returns null taking "null" as an argument, which is not acceptable by ArrayObject. Collection class casts null to an empty array under the hood, there was no problem on practice, but I consider better to keep the same predictable behavior of get methods for both cast attribute classes.
This PR also fix potential issues with json_encode / json_decode casting boolean values.

Why would it return an empty array object vs. null? It should just return null.

@taylorotwell it was a doubt, but I concluded it should be an empty ArrayObject because otherwise, it ruins the main purpose, and idea of AsArrayObject — casting the attribute to the object and allowing it to behave like an array.
You can't just call
$model->array_object['meta']['title'] = 'Developer';

Because array_object attribute is null.
You need to create something new
$model->array_object = ['meta' => ['title' => 'Developer']];

instead, but that's a bit against AsArrayObject idea, no?
Anyway, both variants are acceptable and close the bug.

https://github.com/laravel/framework/issues/38570

@foremtehan you are right, docs are misleading, I followed them in the wrong direction designing the behavior of AsArrayObject/AsCollection.
Ok then, I will update this PR and docs. Should contain also one-two examples more.
$user = new User();
$user->options = ['foo' => ['key' => $value]];
$user->options['foo']['key'] = $value;

Taylor, why should it return null instead of an empty ArrayObject? The whole point of casting a property as such is to allow subproperty modification.
As things are, $model->info['foo'] = 'bar' will fail unless the value had previously been set. Which, for new objects, isn't going to be the case.
Major inconvenience if it can return null -- devs either need to check and instantiate as an empty array before modifying any subproperties, or they will have to set the json column to default as {} in the migration as a hack.

authors: AyubM a-bashtannik foremtehan taylorotwell


text:
Update ClearCompiledCommand.php

This fixes the bug where these functions are getting called but are not yet defined.
I am closing #8257 because there were whitespace issues.
Please put this change through.

This is really just a matter of needing to clear the compiled file before updating Laravel.

I tried that, but the bug persists.
I'll just keep ignoring this message:
[exec] PHP Fatal error:  Call to undefined method Illuminate\Foundation\Application::getCachedCompilePath() in /var/lib/jenkins/jobs/API Production/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php on line 28
[exec] PHP Stack trace:
[exec] PHP   1. {main}() /var/lib/jenkins/jobs/API Production/workspace/artisan:0
[exec] Script php artisan clear-compiled handling the pre-install-cmd event returned with an error
[exec] PHP   2. Illuminate\Foundation\Console\Kernel->handle() /var/lib/jenkins/jobs/API Production/workspace/artisan:36
[exec] PHP   3. Symfony\Component\Console\Application->run() /var/lib/jenkins/jobs/API Production/workspace/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:94
[exec] PHP   4. Symfony\Component\Console\Application->doRun() /var/lib/jenkins/jobs/API Production/workspace/vendor/symfony/console/Symfony/Component/Console/Application.php:126
[exec] PHP   5. Symfony\Component\Console\Application->doRunCommand() /var/lib/jenkins/jobs/API Production/workspace/vendor/symfony/console/Symfony/Component/Console/Application.php:195
[exec] PHP   6. Illuminate\Console\Command->run() /var/lib/jenkins/jobs/API Production/workspace/vendor/symfony/console/Symfony/Component/Console/Application.php:874
[exec] PHP   7. Symfony\Component\Console\Command\Command->run() /var/lib/jenkins/jobs/API Production/workspace/vendor/laravel/framework/src/Illuminate/Console/Command.php:101
[exec] PHP   8. Illuminate\Console\Command->execute() /var/lib/jenkins/jobs/API Production/workspace/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
[exec] PHP   9. Illuminate\Container\Container->call() /var/lib/jenkins/jobs/API Production/workspace/vendor/laravel/framework/src/Illuminate/Console/Command.php:115
[exec] PHP  10. call_user_func_array:{/var/lib/jenkins/jobs/API Production/workspace/storage/framework/compiled.php:925}() /var/lib/jenkins/jobs/API Production/workspace/storage/framework/compiled.php:925
[exec] PHP  11. Illuminate\Foundation\Console\ClearCompiledCommand->fire() /var/lib/jenkins/jobs/API Production/workspace/storage/framework/compiled.php:925
This clearly isn't a priority, nor is it really affecting anything in my development, so hopefully it gets resolved eventually.

This is NOT a bug. You MUST clear the compiled file BEFORE you update.

authors: GrahamCampbell taylorotwell texmorgan


text:
remove double check of hidden relations

Remove unnecessary check for hidden relation inside the relationsToArray function.
[The function] (https://github.com/laravel/framework/blob/5.1/src/Illuminate/Database/Eloquent/Model.php#L2564) getArrayableItems already checked for hidden relations and removed them from the array.

Could you include tests to prove this please?

I've thought for a while how to show this, I think the best way is by showing that the function getArrayableRelations  returns an array of relations without the hidden relations.
A test case that describes that was added.

authors: GrahamCampbell dan-har


text:
Python 3.11: re.error: global flags not at the start of the expression at position

Python 3.11 expect (?i) to be at begging of regex:
abc: /(?i)def/
But lark probably contcatenate several regexes. So it leads to
abc: /(?i)def|(?i)qwe/
Second (?i) flag to be not at the begging of regex. So it raises exception and fail

That's unfortunate!
I think the only solution is to raise an error for Python 3.11 and up.

It is strange: I cannot reproduce it anymore.
Probable lark grammar was wrong

The Python documentation agrees with you: https://docs.python.org/3/library/re.html

Changed in version 3.11: This construction can only be used at the start of the expression.

So, it's strange that you can no longer reproduce it!

repo: lark-parser/lark


text:
[WIP] Fix for smart_decorator

[x] new test to catch edge cases.
[ ] find all edge cases? (@erezsh and @ornariece I would like to know if you find more edge cases)
[ ] rework smart_decorator

Ok, this is pretty much finished. The only missing edge case is when you use a staticmethod from one class in another. That is as far as I can tell impossible to differentiate from just a normal function definition. I think this is a complete alternative to #999, and should fix all problems encountered in that area. (Except pickling, but that is a different PR).

Can you provide a small example for that?

@v_args(inline=True)
class T(Transformer):
    @staticmethod
    def test():
        pass

@v_args(inline=True)
class T2(Transformer):
    test = T.test

T2.test()

That edge case still exist and is the same one as for non-v_args function, and also the expected behavior from a python standpoint. We can however special case and make it work...
class T:
    @staticmethod
    def test():
        pass

class T2:
    test = T.test

T2().test()

also doesn't work.

oh right yes, it's the exact same as using a normal function, for which you'd have to redeclare the staticity. i'd keep it that way, as it's what you'd expect from classic python classes

Yes, It was also a TIL for me, but I wouldn't deviate in that respect from python. The current implementation should now always exactly reflect what python would be doing.

i've run my project (which makes an extensive use of v_args decorators) with your branch and every output was correct 👍

@erezsh could you review this? it should be ready for merging, unless new edgecases are found

Interesting approach! Definitely seems better.

Also, examples\advanced\create_ast.py is failing for this branch.

What is this error message: cannot convert dictionary update sequence element #0 to a sequence? WTF does that mean?
(And create_ast was a very simple fix.)

Definitely seems better

Also, ignoring the tests this is one of those rare PRs that remove more code that they add :-).

The problem in dynamic_complete.py was not caused by this PR, but by the change of the default for maybe_placeholders.

The test looks okay. Where's the create_ast fix? :)

Always happy to remove code.

authors: MegaIng erezsh ornariece


text:
Updated test_basic.py

For clarity, I have enhanced the assertion messages and provided informative docstrings. These  tests concentrate on certain elements, encouraging readability and maintainability. Using pytest, the script runs without any difficulties. Every test carries out precise validations, improving understanding and debugging capacities for next development.

Did you use chatgpt for this?

Did you use chatgpt for this?

No, Not at all

Can you please guide me in depth about where I m lagging

I don't understand why you find these comments and docstrings important. For the most part you're just writing the test name with spaces instead of underscores..
Also, why add these comments to the tests? It's very simple code, and almost nobody reads it anyway.
But real problem for me is that you changed the indentation for the entire file, instead of only adding lines.

Sorry for it, I will definately take care of such thing in future.

Can I do something else inorder to merge this code ??

I'm going to try my best at a constructive comment with the assumption that the author is working to improve as an open source contributor.
This set of changes isn't adding much value to the test suite. The comment describing the commit itself doesn't make any sense. In most cases the docstrings don't add new information, although there is an argument the ones for test_start and test_no_placeholders offer improved readability, the others don't. The PR adds pytest as an import, which is used to let the file run as an executable, but it also adds an import that is otherwise unneeded. Personally, I do prefer the 4 space indentation, and I think a separate PR to normalize that over the entire repo would be a good idea, but it does mess with git blame and I don't want to start a religious war.
It seems to me that the author is mainly incentivized by having a commit rather than improving the library. There's nothing necessarily wrong with the former - I like having my name on repos too - but the latter needs to be the primary driver. I recommend thinking more about the amount of library-value added compared to the number of line changes added to the git log and that need to be reviewed by maintainers.

I'm going to try my best at a constructive comment with the assumption that the author is working to improve as an open source contributor.
This set of changes isn't adding much value to the test suite. The comment describing the commit itself doesn't make any sense. In most cases the docstrings don't add new information, although there is an argument the ones for test_start and test_no_placeholders offer improved readability, the others don't. The PR adds pytest as an import, which is used to let the file run as an executable, but it also adds an import that is otherwise unneeded. Personally, I do prefer the 4 space indentation, and I think a separate PR to normalize that over the entire repo would be a good idea, but it does mess with git blame and I don't want to start a religious war.
It seems to me that the author is mainly incentivized by having a commit rather than improving the library. There's nothing necessarily wrong with the former - I like having my name on repos too - but the latter needs to be the primary driver. I recommend thinking more about the amount of library-value added compared to the number of line changes added to the git log and that need to be reviewed by maintainers.

Thankyou so much for such a detailed description.I will necessary follow all the above instructions mentioned by you.

I'm sorry if I'm wrong, but I am getting strong LLM vibes here.

@Erotemic That's what I thought :) It's only the spelling mistakes that make me wonder.
Anyway, I just ran black over everything, so indentation fixed. No need for religious wars, we have enough of those in RL ;)

authors: Akshat111111 Erotemic erezsh


text:
您好，您的wiki里面的一些目录我没有找到

您好，您的wiki里面的一些目录我没有找到，以至于接下来没能继续跟着教程做下去，我是通过 加载库->管理库 安装的u8g2，您的教程能再详细一些吗，我想照着做一遍，打扰了，谢谢

@dtboy1995 描述具体一点，不清楚你问的什么。

@larryli 谢谢您的回答
我问的是您 WIKI中的CustomFont的这块教程
跟着您的教程做到bdfconv 这块就做不下去了，这块您写到需要修改一个c文件的源码，但是那个文件我没有找到，我是小白，希望您谅解，因为没有找到这个相关的东西，所以来请教一下您，我的u8g2是在那个库中搜索直接添加的。

https://github.com/olikraus/u8g2/tree/master/tools/font/bdfconv


text:
Update ciris to 2.1.0

Updates is.cir:ciris from 1.2.1 to 2.1.0.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "is.cir", artifactId = "ciris" } ]

labels: library-update, semver-major

According to the release notes, this is only a bunch of updated dependencies. It directly conflicts with doobie which relies on cats effect 2. This requires cats effect 3.
I suggest we freeze this until doobie is upgraded.

@gurghet yep, and doobie 1 series is on CE3, but it's still 1.0.0-M5 so we need to be patient...

Superseded by #474.

authors: gurghet scala-steward sirocchj

repo: laserdisc-io/tamer


text:
chore: add engines to root package.json

Specify node, pnpm, yarn versions in prep for pnpm migration

I think we have to update the node version in our actions to 18 too to make the CI pass

there are also a couple .nvmrc files in the repo, we should probably update ( or remove?) those too

authors: alvrs holic

repo: latticexyz/mud


text:
Transparent tuple struct not working within FromRow + Option

I'm using a FromRow from my main model structure:
#[derive(sqlx::FromRow)]
struct MyUser {
    email: Option<Email>,
}

With my Email being defined like shown, similar to the docs:
#[derive(sqlx::Type)]
#[sqlx(transparent)]
pub struct Email(String);

I run a sqlx::query_as!(MyUser, ..) database transaction:
sqlx::query_as!(MyUser, "SELECT * FROM my_user WHERE id=$1", id).await?;

But when I try to run this, I get presented with ^ expected struct Email, found struct std::string::String. For some reason, I don't think query_as knows how to convert from Option<String> to Option<Email> even though it's defined as a transparent type. I've tried implementing FromRow manually to bypass the derive and proc macro but I get the same error.

Hi @Owez , I have the same issue today. Have you found the solution for this?

Hi @Owez , I have the same issue today. Have you found the solution for this?

I think this was sorted for me when migrating to sqlx 0.6, but I'm not sure if I use it anymore. I think https://github.com/launchbadge/sqlx/pull/1959

authors: Owez oldtune

repo: launchbadge/sqlx


text:
[mssql] feature request: support for date/time

For chrono and time.

Hey there, just trying out sqlx for a mid sized project with mssql backend, and it seems this is still not supported?
When using the query macro, I get 'panic: not implemented: name: unsupported data type DateTimeN'.
Seems to be https://github.dev/launchbadge/sqlx/blob/main/sqlx-core/src/mssql/protocol/type_info.rs#L518
Any known workaround for this?

It's implemented in several forks - https://github.com/schneipp/sqlx/tree/mssql-datetypes or mine at https://github.com/milgner/sqlx/tree/feature/mssql-chrono-datetime2
Unfortunately these won't be merged anymore since apparently mssql support is being phased out of the OSS version of the library - see #2125.

Thank you, exactly what I was looking for.
I read about the phase-out on a few occasions already, but never anything conclusive - is there an official announcement or roadmap for the license change?

authors: Christoph-AK bbigras milgner


text:
Update/gunjanmimo/nsm

small changes

@Harshini-M will you review?

authors: gunjanmimo leecalcote


text:
Python bindings for sage-core library

Hi Michel,
Thank you for developing the sage-core library; it's a fantastic resource. I'm David Teschner, a Ph.D. candidate at the University of Mainz, working on data processing for the Bruker timsTOF platform. We're interested in extending sage-core's capabilities to Python, a favored language among researchers, to enhance data analysis and model integration.
I've developed a wrapper using pyO3 and maturin to connect sage-core with Python, making it more accessible for scientific coding and prototyping. If this aligns with your vision, we'd like to contribute this to your crates collection, ensuring maintainability and community access.
Appreciate your consideration.
Best,
David

Hi David,
This absolutely aligns with my vision - I developed a very basic pyO3 wrapper at some point, but it has fallen into disrepair and is very out of sync with the current version of Sage.
Two notes:

What's the best way to enable this? I see you have a fork of Sage with a glue module for pyO3. I'm happy to upstream any changes required, or this module could be moved into the pysage package directly, I believe (see how I structured my bindings). It should be possible to use maturin to build, distribute, and package python wheels using Github actions. I'm not sure which route is easier to maintain and develop in the long run (I suspect having both the rust code and bindings in the same crate, but I'm not sure? I can also publish Sage to crates.io...)
How would you like to contribute it to a collection of crates/packages? I can set up a new Github organization that hosts Sage and associated repositories, or I can link directly to pysage as it stands.

Thank you for the contribution!
Michael

Hi Michael,
Great to hear back from you! I’ve given some thought to the integration process and long-term maintenance for Sage and its Python bindings. My current thoughts:
Rust Glue Code Integration:
Ideally, the Rust part of pysage that contains the glue code would be integrated directly into the Sage crates. This would indeed simplify future maintenance and keep the bindings closely aligned with the core library. However, I'm aware this could introduce some overhead for you, as the binding code would need updates in tandem with core library changes. It's important to weigh if this extra burden is manageable alongside regular feature development. If you decide for this route, I could pull-request my current fork, we can go over the code and potential issues with it in the usual way.
Release Automation:
For releases, automating the build and publication of Python wheels via GitHub Actions seems the way to go. This would require a PyPI account linked to the project for seamless distribution. I can help set up and test this pipeline to ensure it works smoothly with new Sage releases, so far, I did not yet automate the publication to PyPI via GitHub but it should be definitely doable.
Python Package Maintenance:
As for the Python-specific parts, I'd be happy to contribute the pysage library to a SAGE organization. This would keep the Python bindings neatly organized and provide a clear structure as the project grows (which it seems to be doing quite fast at the moment :)).
My proposal would be to start by integrating the Rust glue code into Sage, provided the overhead is manageable. At the same time, we can set up the automation for PyPI distribution, ensuring that we have a consistent release process.
Looking forward to it!
Best,
David

Hi Michael,
Great to hear back from you. I also thought about the integration process and the future upkeep of Sage’s Python bindings:
Rust Glue Code Integration:
Merging the Rust 'glue' code from pysage-connector directly into the Sage crates seems ideal for ease of maintenance and to ensure alignment with the core library. However, I recognize this adds a maintenance layer to your workload, as any changes in Sage would necessitate updates to the bindings. If we deem this manageable, I'm ready to submit a pull request from my SAGE fork for review. Alternatively, we could keep pysage-connector separate and fetch the Sage core from the Rust crates. This modular approach is likely the most flexible.
Release Automation:
Automating Python wheel builds and publications through GitHub Actions would be nice for releases. We'd need a linked PyPI account and access token for distribution. I'm new to this part as well (shamefully doing my publications manually right now) but am willing to delve in and set up this process.
Python Package Maintenance:
Contributing the Python-centric pysage library to a new SAGE organization would be nice. This would not only help manage the project components as they expand but also ensure clarity in the project’s structure.
I suggest we start with the Rust glue code integration into Sage if you’re comfortable with the additional overhead, or moving this part into a separate project in a new SAGE organization otherwise. Concurrently, we can establish the PyPI distribution pipeline.
Eager to move forward with this :) !
Best regards,
David

What about putting pysage-connector & the pysage bindings in the same repo? I think that might make sense from a CI/automated release/maintenance perspective - and it also allows for pysage-connector to pin a different version of Sage (only needs to be updated on a full new release of Sage, and not every commit/PR). Changes to the bindings also only impact 1 repository then.
I don't have any experience with the PyPi release automation, but I know there are other software packages using maturin/pyO3 and doing this, so it should be possible to start by copying what their doing.
On the organization front, I am going to hold off for a minute on moving this repository at least... The Sage paper contains a link to this repository, and I don't want to move it and leave a 404. I can still make one for auxiliary repositories (documentation, pysage, etc) if you're interested.

I don't have any experience with the PyPi release automation, but I know there are other software packages using maturin/pyO3 and doing this, so it should be possible to start by copying what their doing.

I have some experience with this (maturin + pypi release automation) if you're looking for a contribution. It's straightforward but a little annoying to debug.

Hey guys,
I agree with you about the organization of things, here are poins to be adressed:
Combining Repositories
I am with you on merging pysage-connector and the bindings into one repo. It simplifies CI, releases, and overall maintenance. Plus, it’s more efficient with everything under one roof for python.
PyPI Release Automation
I’m also for adopting strategies from projects using maturin/pyO3 for our PyPI release automation. I’ll explore this and figure out how we can integrate it into a github workflow. Would of course also appreciate help from @radusuciu.
Name Change and PyPI Upload
Just a heads-up: 'pysage' was already claimed on PyPI, so I've switched to 'sagepy' and 'sagepy-connector'. They’re already up on PyPI, and you can install the current draft easily with 'pip install sagepy', which handles all the necessary dependencies. There will also be a new repository holding both sagepy and sagepy-connector, pysage will be deleted.
Sage Organization & Repo Moving
Housing everything in a Sage org makes sense I think :). I can move ownership of the sagepy repo once the org its there. It’ll keep the projects cohesive. And moving the sage repo might also not be a big problem – GitHub redirects will prevent any 404 issues. Still, I totally get why waiting to move the repo (if ever), considering the paper reference.
Pull Request to Sage-Core & Crates.io Release
I’m planning to submit a pull request with my changes to the sage-core. For the python bindings to be independent of my fork, these updates need to be in the main repository. Also, I think releasing the sage core library on crates.io could be a good idea. It would allow us to link against different versions more efficiently than pulling directly from a GitHub repo.
Looking forward to your feedback!
Best,
David

Sounds good - I will get an org set up. In the mean time, go ahead and submit a PR whenever you are ready!

Hey Michel,
I am almost finished with the initial version of the exposed library. Currently, it only supports raw scoring, which essentially means identification, without any FDR. For know, I will include how to perform FDR via mokkapot. Also, the quantification logic appears to be deeply integrated into the overall sage pipeline and also be available for LC-MS/MS only. Exposing it would be ideal, but this would require significantly more work and some discussion. I will add some example code to the sagepy repository as soon as possible and do my best to include some testing as well. 😉
As always, let me know what you think.
Best,
David

authors: lazear radusuciu theGreatHerrLebert

repo: lazear/sage


text:
Some improvements

Good job! I only did some minor thingies.
Things I changed:

fix tiny syntax error which prevented the engine from booting
change the styling setup so appuniversum isn't included twice if the host app also imports it
include ember-cli-moment-shim. This would otherwise thrown an error if the host app didn't have that installed.
Setup the dummy app for easier engine development

I tested it turning on lazy loading but the app crashed. I dont know if we really need it but I think its a nice extra for later

Interesting. What did the error say?

I tested it turning on lazy loading but the app crashed. I dont know if we really need it but I think its a nice extra for later

Interesting. What did the error say?

Had something to do with "monkey-patch-ember-computed" cant really find what that is or does online for some reason

It seems to be a similar issue as this: https://github.com/sir-dunxalot/ember-tooltips/pull/420

ember-macro-helpers also uses app.import to import that file, so that probably needs to be changed in a similar way to support lazy engines.

authors: Windvis aatauil

repo: lblod/ember-jobs-dashboard


text:
Remove modes from article structure + automatically support TOC in docContent

Overview

remove the idea of "modes" and just support both besluit and article structures together
move besluit and article structures to their own plugins (instead of a weird mix), where every plugin adds and shows everything that is needed for itself.
some updated documentation. Biggest improvement is specifying how to even activate article-structures, as they are not blocks, so will not work with the default docContent config.
a small fix that adds table_of_contents to the docContent of the TOC plugin is activated. This is mandatory to make the TOC plugin work, and this makes the configuration easier for consumers.

connected issues and PRs:
https://binnenland.atlassian.net/browse/GN-4514
How to test/reproduce

try to remove table_of_contents from the test.html file docContent configuration
try to use both besluit and article structure nodes together, try to remove one (or both) of them from the pluginsArray (in test.html) and see if stuff works like it should.

Challenges/uncertainties

currently for besluit nodes only an article can be inserted. Having the header "besluit" with just one button is a bit ugly, but at least it is clear :shrug:
the header "General" will show up even if no buttons are there (e.g. no activated plugins). However the same problem happens for the general insert button: it will also show up even if there are no plugins active. Might be something for another PR.

With it not being a block, it felt like it made sense, because it is kinda the only spot to put it (not really possible to put it under a title, except if it is a specific table of contents title).
But I agree it is too much magic when you still let docContent be configurable.
So either remove that, or make it so docContent is constructed via the plugins, with possible override in plugins.
I lean more towards keeping docContent configurable and just make it clear in the docs that you need to adjust it, like is done for article structures.

With it not being a block, it felt like it made sense, because it is kinda the only spot to put it (not really possible to put it under a title, except if it is a specific table of contents title).
But I agree it is too much magic when you still let docContent be configurable. So either remove that, or make it so docContent is constructed via the plugins, with possible override in plugins. I lean more towards keeping docContent configurable and just make it clear in the docs that you need to adjust it, like is done for article structures.

I agree with this approach :+1:

authors: elpoelma x-m-el

repo: lblod/frontend-embeddable-notule-editor


text:
pre-liquibase with spring boot DataJpaTest doesn't seem to work

How to re-produce ?

Create a simple spring boot starter with jpa project (v 2.5.2) (or you can also use the example project)
Write a simple jpa test annotated with @DataJpaTest and application.yaml with property

spring:
  datasource:
    driver-class-name: org.h2.Driver
    url: jdbc:h2:mem:testdb;
  jpa:
    generate-ddl: false
    hibernate:
      ddl-auto: none
    database-platform: org.hibernate.dialect.H2Dialect
    show-sql: false
    properties:
      hibernate:
        default_schema: EXAMPLE
        show_sql: false
        use_sql_comments: false
        format_sql: false
      org:
        hibernate:
          envers:
            default_schema: EXAMPLE_AUDIT
            store_data_at_delete: true
  liquibase:
    enabled: true
    liquibase-schema: LIQUIBASE
    default-schema: EXAMPLE

When you run a simple boot test, you would notice exception Schema "LIQUIBASE" not found; SQL statement:

Thanks for reporting.
Obviously this happens because @DataJpaTest doesn't fire the Pre-Liquibase auto-configuration. (it fires DataSource auto-config, Liquibase auto-config and Hibernate auto-config and what not).
As far as I understand @DataJpaTest only triggers the auto-configuration relevant for JPA testing, not any/all auto-configuration. I'm investigating how Spring Boot figures out what that list is, exactly, so that I can get Pre-Liquibase Auto-Configuration on that list.
In the mean time you can annotate your test with:
@DataJpaTest
@ImportAutoConfiguration(PreLiquibaseAutoConfiguration.class)

Yes this surely helps

Done!
Background: The magic that @DataJpaTest does (meaning which auto-config to execute) is in spring.factories in the core Spring Boot.
Fix: The Pre-Liquibase auto-configuration has now been added to that list so that you can now use @DataJpaTest without further ceremony.
Look for version 1.1.1 in Central Maven. It should be available shortly.

Fix for this issue:

If you are on Spring Boot < 2.5 then look for version 1.0.2 (or later) in Central Maven.
If you are on Spring Boot >= 2.5 then look for version 1.1.1 (or later) in Central Maven.

Thank you so much for your quick response and fix :zap:

repo: lbruun/Pre-Liquibase


text:
If I close LBRY app window, there is no way to get new window without relaunching the app

The Issue
If I click to close the LBRY browser window, there is no way to get a new window except for quitting the app and relaunching it.
Steps to Reproduce

close LBRY window
try every combination of key commands (command-N, etc) to spawn a new window
give up, quit the program, and relaunch LBRY desktop

Expected Behavior
If I close a window, I should be able to open a new one.

Spoke with Julie about this, she will edit the issue. She was hoping a keyboard command would re-open the app. It does minimize to tray and comes back up if relaunching/opening from menu/task tray.

authors: jsigwart tzarebczan

repo: lbryio/lbry-desktop


text:
enable YouTube transfers on web

with the wallet id model now live on lbry.tv, we can enable youtube transfers on web.

Added in #3105

authors: seanyesmunt tzarebczan


text:
add spinner to related content

LGTM!


text:
Update _scrollbar.scss

scroll bar width on windows is almost impossible to see especially in full screen, increased the width by 1px;
PR Checklist
Please check all that apply to this PR using "x":

[x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
[x ] I have checked that this PR does not introduce a breaking change
[ ] This PR introduces breaking changes and I have provided a detailed explanation below

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Breaking changes (bugfix or feature that introduces breaking changes)
[ ] Code style update (formatting)
[ ] Refactoring (no functional changes)
[ ] Documentation changes
[ ] Other - Please describe:

Fixes
Issue Number: N/A
What is the current behavior?
scroll bar is very hard to see
What is the new behavior?
increased scroll bar with by 1px
Other information
minimized screen:
https://gyazo.com/d747010b977101f4189c823252d75051
full screen:
https://gyazo.com/0fe1528a17fb204fcd581e69dc72c8e1

Thanks for the PR @ceoger! We'll take a look to see  how this looks on the redesign.

Thanks for the PR!

authors: ceoger seanyesmunt tzarebczan


text:
Allow multiple blob_dir

A user said he would love to host more, but it's not easy for him to move to other/external hd.
This would allow users to host more content.

user can add additional blob_dir folders, mark default (like steam)
support freely moving blobs between blob_dir locations
handle disconnection of a blob_dir folder (external HD?) - mark db entries temporarily missing?

Add support to S3 buckets mayby :)

first version:

specify new folder (first of the list in the conf file)
if we have permissions and everything is good, use it
otherwise, warn and fallback to next
fails startup if all items fail

for now, moving blobs: stop sdk, move, start (we check on startup already)
Handling disconnection of a blob directory might be another issue as it can already happen if the current directory is an external drive. Not sure what to do here yet

authors: jessopb kodxana shyba

repo: lbryio/lbry-sdk


text:
Encoding issues in TTL

http://localhost:8080/gsip/info/MineralOccurrence/BC_082ENE014?f=ttl
accented character messed up in french
<http://localhost:8080/gsip/id/MineralOccurrence/NRCan_mo30001384>
        rdf:type          rdfs:Resource , cgdn:MineralOccurrence ;
        rdfs:label        "CGDN Mineral Occurrence NRCan 30001384"@en , "RDGC Indice minÃ©ralisÃ© RNCan 30001384"@fr ;
        cgdn:partOf       <http://localhost:8080/gsip/id/MineralOccurrence/BC_082ENE014> ;
        schema:name       "CGDN Mineral Occurrence NRCan 30001384"@en , "RDGC Indice minÃ©ralisÃ© RNCan 30001384"@fr ;
        schema:subjectOf  [ rdfs:label  "Doe; Riverside ?" , "NRCan Mineral Occurrence 30001384"@en , "RNCan Indice minÃ©ralisÃ© 30001384"@fr ] ;
        schema:subjectOf  [ rdfs:label  "NRCan Mineral Occurrence 30001384"@en , "Doe; Riverside ?" , "RNCan Indice minÃ©ralisÃ© 30001384"@fr ] .

no issues in json (!)

fixed commit 415d34af08561454b453ee1dd203ddb598440ea5

repo: lcnp/GSIP


text:
🛑 Netdata is down

In 2764476, Netdata (https://netdata.thonk.xyz) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Netdata is back up in c2863f6 after 5 minutes.

repo: le-server/thonk-upptime


text:
Add Buddy Script

Adding a language
Add Buddy Script

[x] The code displays "Hello World"
[x] I have updated the readme to include the new language
[x] I have incremented the language count in the readme

Yeah

I deleted my fork I’ll make a new pr

see #984


text:
Enhance Route Tables reporting

Currently a route table is reported to be directly associated with a VPC but in practice, the relationship is much more complex, with the tables being associated with subnets. The tool should detect that relationship and report it properly.
There is also a concept of a default table, that should be reported.

The initial idea can be enhanced to detect route table associations to subnets to:

Be able to create a subnets groups: private and public
Trick diagrams library to aggregate multiple edges that that to all subnets within a cluster to have one connection to such private/public cluster

The outcome will be simpler diagrams

Blocked by https://github.com/mingrammer/diagrams/issues/17.
For the time being, we can aggregate the multiple subnets into one (perhaps represented with a bigger icon), in order to make the diagram cleaner.

repo: leandrodamascena/aws-network-discovery


text:
Fast forward rules

The current forward rule implementation is hilariously inefficient. We're currently working on something much better.

Exciting!

authors: JLimperg girving

repo: leanprover-community/aesop


text:
modified:   qt_interface.py

The use of curly brackets was previously entailing a KeyError, due to interference with the placeholder {}.

When we discussed this by email I didn't remember this was a two steps process with sorry being replaced by {} and then the string formatting step. You could also keep sorry instead of REPLACE_ME except if you really want to replace only the first sorry. But, in the context of this little demo, I don't see what multiple sorries would buy you.

Thanks!

authors: FredericLeRoux PatrickMassot

repo: leanprover-community/lean-client-python


text:
feat: port CategoryTheory.Over

[x] depends on: #2486

This PR/issue depends on:

leanprover-community/mathlib4#2486
By Dependent Issues (🤖). Happy coding!

This PR/issue depends on:

leanprover-community/mathlib4#2486
By Dependent Issues (🤖). Happy coding!

authors: mattrobball semorrison


text:
feat: port CategoryTheory.Limits.Shapes.Pullbacks

[ ] depends on: #2507

This PR/issue depends on:

leanprover-community/mathlib4#2507
By Dependent Issues (🤖). Happy coding!

This PR/issue depends on:

leanprover-community/mathlib4#2507
By Dependent Issues (🤖). Happy coding!


text:
feat: port Topology.MetricSpace.HausdorffDistance

bors merge


text:
feat: port Topology.Algebra.Module.LocallyConvex

todo:

[ ] (optional) in the docs, i couldn't find the lean 4 equivalent of seminorm.locally_convex_space normed_space.locally_convex_space
[ ] instance LocallyConvexSpace 𝕜 (E × F) reached heartbeat limit


text:
feat: port split_ifs tactic

This is intended to be as close as possible of a translation of the mathlib3 version: https://github.com/leanprover-community/mathlib/blob/12a7da107a39ef936c5d4a8cb873018ad05b07a6/src/tactic/split_ifs.lean

Do you know about src/Lean/Meta/Tactic/SplitIf.lean in core? Perhaps it doesn't have a user-facing interface.
If we're meant to be using it here, lets use it. Otherwise let's leave a comment explaining why not. (I don't know which at this point.)

I'd like to reuse the existing code if we can get away with it. However, doing so might mean that we can less faithfully match the behavior of mathlib3's split_ifs.
For example, as this PR is currently written, with a discharger that handles True.intro, we have
example (p : Prop) [Decidable p] : if if ¬p then p else True then p else ¬p :=
by split_ifs with h1 h2
   · assumption
   · assumption

where the subgoals are
Goals (2)
case inl
p : Prop
inst : Decidable p
h1 : p
⊢ p

case inr
p : Prop
inst : Decidable p
h1 : ¬p
⊢ ¬p

This closely matches how mathlib3 behaviors on them same example (when translated into Lean 3).
If we switch to using the existing SplitIf.getSimpContext and SplitIf.discharge?, then the subgoals become
Goals (3)
case inl.inl
p : Prop
inst : Decidable p
h1 : p
h2 : True
⊢ p

case inl.inr
p : Prop
inst : Decidable p
h1 : p
h2 : ¬True
⊢ ¬p

case inr
p : Prop
inst : Decidable p
h1 : ¬p
⊢ ¬p

Because if True else x y no longer simplifies.
Maybe we consider that a discrepancy that we can live with? I wouldn't be surprised if it never actually shows up in mathlib proofs.
Or maybe we could update the Lean 4 core SplitIf code to more closely match?
(One thing I still don't understand where is where in the mathlib3 code the True.intro is actually being handled. The discharger looks to me like it only handles assumption and not_not_intro.)

Pushed a change that uses SplitIf.getSimpContext so that we don't need to add a new simp attribute, but keeps the custom discharger for now, to match the mathlib3 behavior. Further code reuse is possible if we decide we don't want to match the mathlib3 behavior so closely, or if we find a way to modify the SplitIf stuff to make it match.

I notice that the usual continuous integration checks are not running on this PR. Is that because it's from a branch of https://github.com/dwrensha/mathlib4, rather than https://github.com/leanprover-community/mathlib4? If so, may I be granted permission to create/modify branches on the main repo, and should I resubmit this PR in that way?

It sets the simp set to the split_if_reduction simp set, which contains if_pos if_neg dif_pos dif_neg if_congr. Simp knows how to discharge True even if you don't say anything, because the way simp works is to simplify the goal to True and then apply trivial at the end.

Simp knows how to discharge True even if you don't say anything...

That seems to be true in Lean 3, but in Lean 4 when I use SplitIf.discharge?, the True does not get discharged, and instead gets split like any other if-the-else condition into a True and ¬True branch. See h2 below:
case inl.inl
p : Prop
inst : Decidable p
h1 : p
h2 : True
⊢ p

case inl.inr
p : Prop
inst : Decidable p
h1 : p
h2 : ¬True
⊢ ¬p

Closing in favor of #508, which uses a branch of the main repo, to get CI working.

authors: digama0 dwrensha semorrison


text:
feat: a minimalistic port of compute_degree_le

This PR is an alternative to #5882.  It gives a "minimalistic" port of the compute_degree_le tactic.
This very short tactic works on all tests.  The other PR is more structured and is probably further along the direction of a more complete implementation of a compute_degree tactic.
In the long run, I think that the definitions in the other tactic will likely make up the compute_degree tactic, but they are not needed for the easier compute_degree_le tactic.
PR #6221 implements the full compute_degree tactic with a method similar to the one in this PR.  I am tempted to close this PR, except for the fact that it might be a possible stepping stone to get to the full implementation.

I am closing this PR since #6221 ports more functionality.


text:
feat(Archive/Imo): formalize IMO 1961q3

[x] depends on: #9881
[x] depends on: #9878

Is this PR ready for review?

Some docs are missing and I have no time to write them.

It appears to me that this PR is in a reasonably good shape and it would be more desirable to have it in Archive as-is instead of waiting for more documentation (it's also not clear to me what documentation is supposedly missing). I suggest
maintainer merge

bors r+

authors: grunweg joneugster sgouezel urkud


text:
feat(data/finset): infinite property, infinite nat theorem

This is a kind of counterpart to fintype. Naming or location suggestions welcome. I put it in data/finset.lean for lack of a better place.

I moved everything to data/infinite.lean, made infinite a type class, and added theorem fintype.not_infinite [fintype α] : ¬ infinite α.

Also, the initial commit message is now incorrect, so I used a new one that would be better once all the commits are squashed.

Thinking about this more, I'm not yet convinced infinite should be type class. Is it not true that a type should ideally have a single instance per class? That makes inference work better, right? But there can be many different implementations of infinite a for a given type a. In fact, I'm working on several at the moment. So, for my purposes, I think it would be better if infinite was not a type class.

Yes, type classes need to be unique per type. But infinite is a Prop so its not a problem.

True. I plan to use it to say that “I have a fresh name generator; therefore, the type is infinite.” I'm not clear yet on how I would use the property of “being infinite”, however, so perhaps that is why I don't see what the type class will give me. @johoelzl Do you have any ideas?

If you want to use it is a fresh name generator it should be in Type and have a different name.
But a general infinite type class would live in Prop.
In mathematics it is interesting to talk about infinite sets, and hence also types. Sometimes it is enough that the naturals are embedable even if this embedding is not constructive.

If you want to use it is a fresh name generator it should be in Type and have a different name.
But a general infinite type class would live in Prop.

Of course. I mean to say that having a fresh name generator serves to prove infinite according to this definition because a fresh name generator can generate a new inhabitant of a type for any given finite set. That is, after all, how I arrived at this definition.

In mathematics it is interesting to talk about infinite sets, and hence also types. Sometimes it is enough that the naturals are embedable even if this embedding is not constructive.

I don't doubt that. I just don't have a feeling for what that looks like or how it relates to this concept of an infinite type.

My impression is that we are already well served for mathematical purposes with the existing infiniteness concepts. These are all different ways of saying that a set is infinite:
ℕ ↪ α
¬ set.finite univ
denumerable α
ω ≤ cardinal.mk α

I think that has_fresh should be a separate concept, which implies that the underlying type is infinite but this is a theorem not a definition.

@digama0 Thanks for that list. That overview is helpful.

I think that has_fresh should be a separate concept, which implies that the underlying type is infinite but this is a theorem not a definition.

I didn't follow this. Are you suggesting that (a) the currently named infinite type class or definition is not necessary but that, instead, (b) there should be a theorem that ties ∀ (s : finset α), ∃ (a : α), a ∉ s) to something like ℕ ↪ α?
That theorem would be useful, but I think a name for ∀ (s : finset α), ∃ (a : α), a ∉ s) would be also be useful since I foresee using it multiple times. That said, I don't have a strong opinion on the name.

Could you perhaps clarify whether your interest in this definition is of a particular one of the following rather different forms?

You want to actually do fresh name generation, e.g., inside a tactic or a program which is a compiler for another language.
You want to prove theorems in constructive mathematics inside Lean, and so the distinction between different notions of "infinite" is important to you.
You want to prove theorems in classical mathematics about logic, and there the property which you require of the (infinite) set of variable names is that given any finite collection of names (e.g., the names which appear in some formula) you can find a name not in that collection, but it doesn't really have to be constructive in any particular sense.

Then, my comment would vary depending on your answer.

You cannot do that with this definition, because it is a Prop. You need something with a Pi and a Sigma, or something equivalent.
Okay, but mathlib is not really set up for this; you will also need a rather large thesaurus to name all of the inequivalent notions of "infinite".
In this case, rather than making a proliferation of equivalent Props, I think you would be better served by a simple theorem infinite α \iff ∀ (s : finset α), ∃ (a : α), a ∉ s) which you can apply/cases whenever you need to produce a fresh name (or more precisely: whenever you need to know that it is possible to produce a fresh name).

@rwbarton Thanks for the questions!
First, I'm not doing any classical mathematics. My focus is in programming language theory and type systems and is all constructive.
Second, yes, I do want to do fresh name generation. Of course, I wouldn't expect to do it with this definition of infinite, but this definition is a property of a type for which I can write a fresh name generator. The usefulness of this definition of infinite is that it follows directly from the definition of a fresh name generator. That is, given my current definition:
structure fresh (α : Type*) :=
(gen : finset α → α)
(gen_not_mem : ∀ (s : finset α), gen s ∉ s)

it can easily be shown that fresh α → infinite α.
I thought a definition for ∀ (s : finset α), ∃ (a : α), a ∉ s might be useful more generally, which is why I proposed it. All that being said, I'm not sure how useful it is. I'm happy to go with what you all suggest.

@digama0 Maybe this should be closed? I'm not sure this is the right approach, and if it is useful for what Sean is doing, maybe it makes more sense to keep it local.

authors: digama0 johoelzl robertylewis rwbarton spl

repo: leanprover/mathlib


text:
fix: BRC-20 send - sign transactions, finalise then broadcast

Try out this version of Leather — Extension build, Test report

This PR adds a fix to BRC-20 send - sign transactions, finalise then broadcast
This was broken in by refactors of useGenerateUnsignedNativeSegwitSingleRecipientTx
See here for more info

Thanks @pete-watters. Any chance as part of this you can add the Ledger signing routes? It should just be a case of adding leatherBitcoinTxSigningRoutes to the existing route tree.

No problem. I'll do it now and push a new PR

repo: leather-wallet/extension


text:
provision_nat64.sh causes deployment process to fail

What happened?
While deploying the ipv6 cluster using ./vagrant-start, the Jool installation fails with this error.
    k86-nat64: + sudo chown -R vagrant:vagrant /home/vagrant/Jool
    k86-nat64: + cd /home/vagrant/Jool/usr
    k86-nat64: /tmp/vagrant-shell: line 33: cd: /home/vagrant/Jool/usr: No such file or directory
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

The problem was that the actual Jool directory is /home/vagrant/Jool. There is no usr directory, hence from provision_nat64.sh the usr needs to be removed. it should look like this.
sudo chown -R vagrant:vagrant /home/vagrant/Jool
( cd /home/vagrant/Jool && ./autogen.sh && ./configure )
make -C /home/vagrant/Jool
sudo make install -C /home/vagrant/Jool

license_source: bigquery


text:
bfmap.rst out of date

On master the bfmap.rst docs are out of date as it looks like the map interface has changed.
For example, if I follow the docs:
In [24]: bf.map("c = a + b", c=c, a=a, b=b)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-24-107ca22ae66a> in <module>()
----> 1 bf.map("c = a + b", c=c, a=a, b=b)

TypeError: map() got an unexpected keyword argument 'c'

Thanks for pointing this out @ewanbarr. The change was posted in #95 (but the docs weren't updated).
I'll update the docs straight away.

It should be fixed now: http://ledatelescope.github.io/bifrost/bfmap.html.
Let me know if you notice anything else not up-to-date.
Thanks again,
Miles

authors: MilesCranmer ewanbarr

repo: ledatelescope/bifrost


text:
Move to @lee-dohm

Hey @lee-dohm, can we move this app to your account?

Yep, let's go ahead and relocate this to my account. I'll take care of it.

Moved. Thanks! ✨

repo: lee-dohm/view-rendered

license: ISC


text:
iOS updatePushNotificationToken

Any reason why iOS doesn't support updatePushNotificationToken?
https://github.com/leegeunhyeok/react-native-zendesk-messaging/blob/master/src/index.ts
export function updatePushNotificationToken(token: string): void {
  if (Platform.OS !== 'android') return;
  return ZendeskMessaging.updatePushNotificationToken(token);
}

It is supported in the native code:
https://github.com/leegeunhyeok/react-native-zendesk-messaging/blob/master/ios/ZendeskNativeModule.swift
  @objc(updatePushNotificationToken:)
  static func updatePushNotificationToken(_ token: Data) -> Void {
    PushNotifications.updatePushNotificationToken(token)
  }

@deelo55 I don't really understand your question..on iOS you just need to add it on AppDelegate.m and it will work. // AppDelegate.m or AppDelegate.mm
#import <ZendeskNativeModule.h>

(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
[ZendeskNativeModule updatePushNotificationToken:deviceToken];
}

please tell me if it helped you


text:
Fix for Halloween update

This fixes hats from not working as well as a few other issues that were in the mod.

Preview video: https://www.youtube.com/watch?v=jl8esnwWxPw&ab_channel=dev'smainchannel.
UPDATE: The button bug has been fixed in the latest commit

Not sure if it was in the prior update, but your original cosmetic will still be equipped if you have a modded cosmetic when the game is open

You changed the method responsible for removing the original cosmetic

Forgot to mention turns out latest commit fixes a lot of custom colour errors by (for the most part) changing up one line lmao

fork fork where is it

repo: legoandmars/GorillaCosmetics


text:
persist measures after compute

also create empty folders if doesnt exist. did a hotfix for now.
update:
all the io functions need a refactor, it has now become ugly af.

measures.summary_measures.to_csv(
f"{CLOUD_STORAGE_BUCKET}/data/processed/measures/{MAX_RADIUS}/summary_measures.csv",
index=False,
)

measures.node_measures.to_csv(
f"{CLOUD_STORAGE_BUCKET}/data/processed/measures/{MAX_RADIUS}/node_measures.csv",
index=False,
)


text:
pkgs.dzgui is missing

Hi there, I am unable to activate dzgui using programs.dzgui.enable = true, and the only way it worked was by adding this flake as an overlay and then use the dzgui package itself.
I am on NixOS unstable.
If you need additional infos, don't hesitate to request them.

Hi, thanks for opening the issue.
Could you please commit the configuration where you are encountering this problem (to a separate branch in your configuration repo, probably), and share it here?
I'm trying to figure out what could be causing this problem, and made some changes that may or may not fix it for you. If you could check if the problem has been fixed, I'd be grateful. :smiley:

Hey man, thanks, your commit seemed to fix it!

authors: arminveres lelgenio

repo: lelgenio/dzgui-nix


text:
fix: comply with basedir spec

Comply with https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

To be pedantic, this only uses the defaults of the XDG Basedir spec, complying with the spec would require reading $XDG_DATA_HOME.

@AulonSal you're right, I still think its better than having a .tt dir in the homedir

Thanks. I clean it up a bit and added support for $XDG_DATA_HOME as a fallback.

authors: AulonSal k2on rvaiya

repo: lemnos/tt


text:
师傅，怎么生成可执行文件？

师傅，怎么生成可执行文件？

有go环境就行哦

有go环境就行哦

命令是啥？go 不会呀😭

自行百度 ，一大堆


text:
Method flush is missing in interface IOperation

Method 'flush' is implemented in class 'HiveOperation', but not in interface 'IOperation'. I need this method to read in a stream.

Hi @AKy3HELljOB ! Feel free to create a PR with the change you need and I release a new version. Otherwise, you'll need to wait until it's implemented

PR with https://github.com/lenchv/hive-driver/pull/62/files

deployed version 0.3.1

repo: lenchv/hive-driver


text:
Make dependencies from zlib and pnglib optional

As previously discussed in #131 this PR implements the possibility to build Lomse without explicit dependency from zlib and pnglib.
Note: Freetype may still require zlib but that's regulated outside of Lomse build process. In particular on Windows official builds of Freetype don't require separate zlib (Freetype.dll probably has zlib statically integrated).
By default zlib and pnglib are used in Lomse like before and all features are enabled. To build without pnglib and/or zlib there are two CMake options (both ON by default):

LOMSE_ENABLE_COMPRESSION;
LOMSE_ENABLE_PNG.

In the following example we run CMake providing these two options:
cmake -G "Unix Makefiles" -DLOMSE_ENABLE_PNG=OFF -DLOMSE_ENABLE_COMPRESSION=OFF  ../lomse

Note: Pnglib can be deactivated separately but deactivating of zlib also requires deactivating of pnglib because pnglib depends on zlib. Therefore LOMSE_ENABLE_COMPRESSION=OFF also requires LOMSE_ENABLE_PNG=OFF.
Status of the new options is printed during running CMake similar to other options:
-- Compatibility for LDP v1.5 = ON
-- Enable compressed formats = OFF
-- Enable png format = OFF

lomse_config.h contains two new preprocessor defines:
// Enable compressed formats (requires zlib)
#define LOMSE_ENABLE_COMPRESSION    @LOMSE_ENABLE_COMPRESSION@

// Enable png format (requires pnglib and zlib)
#define LOMSE_ENABLE_PNG    @LOMSE_ENABLE_PNG@

Code parts depending on zlib or pnglib are guarded using these defines, for example:
#if (LOMSE_ENABLE_PNG == 1)
// PngImageDecoder: knows how to read a PNG image
class PngImageDecoder : public ImageDecoder
...
};
#endif // LOMSE_ENABLE_PNG

Testing
Tested on Mac (Clang) with default options and with deactivated libraries. All compiles successfully, all tests pass.
My tests on Linux were limited to Travis build with default options (zlib and pnglib are both enabled).
Also tested on Windows, library compiles successfully. As mentioned in other PR testlib application still fails to link due to some misconfiguration. That's a separate issue not related to current PR. I don't know how to fix this yet, that needs a separate investigation.
Extras
I've found that library config file liblomse.pc.cmake was still referencing boost libraries. I've fixed this within this PR but in a separate commit. I thought it wasn't worth a separate PR.

This PR has option Allow edits from maintainers activated. Please feel free to commit any necessary modifications or tell me if you want me to change something.
Thanks for very quick reviewing and merging of my PRs!

Thank you!

authors: cecilios hugbug

repo: lenmus/lomse

license: mit


text:
feat: update client-common

#__
Checklist

[ ] I didn't over-scope my PR
[ ] My PR title matches the commit convention
[ ] I did not include breaking changes
[ ] I included unit tests that cover my changes
[ ] I added/updated the documentation about my changes
[ ] I made my own code-review before requesting one

Description of the changes

Technical highlight/advice

:tada: This PR is included in version 1.0.0-beta.86 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.0.0-alpha.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

authors: pichoemr shiipou


text:
[RFC] Plan Next Release

@fulibacsi We should discuss the next release, version support, etc. @taynaud has implemented some interesting stuff like to_scikit!
@taynaud welcome among the core contributors :)

There has not been a release for a long time. Is this project still alive?

authors: javadba kszucs

repo: lensacom/sparkit-learn


text:
There is no Metrics under Features in cluster settings page

Describe the bug
There is no Metrics under Features in cluster settings page
To Reproduce
Steps to reproduce the behavior:

Fresh install lens 4.1.4
Add a cluster just created by k3sup

Expected behavior
There should be metrics button in Features setting block.
Screenshots

Environment (please complete the following information):

Lens Version: 4.1.4
OS: OSX
brew install lens

Lens on Windows connected to the same cluster works fine

Can you provide logs?

I did reproduce this, and after reloading (Cmd-R) the Metrics Stack appeared. But can't seem to reproduce it again...

authors: jim-docker zzswang

repo: lensapp/lens


text:
Window cut on opening

Describe the bug
I am on Linux Pop!_OS 22.04 LTS (x11, with 2 external monitors).
When I open Lens, the window is outside the screen. I have to stretch the window on another screen to see the title bar.
This is the only application that behaves like this on my laptop.
To Reproduce
Steps to reproduce the behavior:

Open Lens

Expected behavior
The entire window is visible on the screen
Screenshots

Environment (please complete the following information):

Lens Version: 6.4.15
OS: Pop!_OS 22.04 LTS
Installation method (e.g. snap or AppImage in Linux): deb package

Does this happen every time or just the first time that you launched Lens?

Yes, every time.
By doing additional tests, it is related to the following context:
3 screens :

laptop
external screen
external screen (defined as main screen)

Lens opens all the time on my laptop screen, but the top of the window aligns with the top of the main screen, i.e. the 3.

if I line up screens 1 and 3 like this:

Lens opens correctly.

It should be aligned with the screen it opens on, right ?

yes it should thanks for the report.


text:
Jupyter notebook formatting stopped working

I have recently migrated to jupyterlab 3.6., jupyterlab_widgets 3.0. and black 23.3.*.
With these upgrades, on formatting trigger (like file save), all the cells of the notebook are getting merged and becoming a single markdown cells.
When I downgrade black to 22.8.0, jupyterlab to 3.2, formatting of notebook starts working again. I've not experimented if downgrading only black suffices or not.
I'm using PyCharm Professional 2022.2.2.

Apparently it is the same issue as #72

Yes, you can mark it as duplicate. Do you know of any timeline that this will be taken up?

authors: lensvol soumen-ghosh

repo: lensvol/intellij-blackconnect


text:
🛑 Demo website: hackathon is down

In c0546ec, Demo website: hackathon (hackathon.leoboyer.dev) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Demo website: hackathon is back up in 59a9a4b.

repo: leoboyerbx/upptime


text:
Feature request: 2022-01-05 blog comments

Description
[Description of the feature]

for test


text:
Example code downloading lephare data gives: TypeError: 'NoneType' object is not iterable

Hello, when running code similar to the example:
import os
os.environ['LEPHAREDIR']='/path/to/my/preferred/directory/'
# You must import lephare after setting the variables
import lephare as lp
# If you do not set a config input to the following function in gets everything.
lp.data_retrieval.get_auxiliary_data()

Gives:
Python 3.11.9 (main, Apr 19 2024, 16:48:06) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.environ['LEPHAREDIR']='/lustre/t1/cl/lsst/tmp/henrique.almeida/testlephare/data'
>>> # You must import lephare after setting the variables
>>> import lephare as lp
User defined LEPHAREDIR is set. Code runs depend on all required
                auxiliary data being present at /lustre/t1/cl/lsst/tmp/henrique.almeida/testlephare/data.
Default work cache at /lustre/t1/cl/lsst/tmp/henrique.almeida/slurm-home/var/cache/lephare/work
                    is already linked. This is linked to the run directory:
                    /lustre/t1/cl/lsst/tmp/henrique.almeida/slurm-home/var/cache/lephare/runs/20240813T173817
>>> # If you do not set a config input to the following function in gets everything.
>>> lp.data_retrieval.get_auxiliary_data()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/lustre/t1/cl/lsst/tmp/henrique.almeida/miniconda3/lib/python3.11/site-packages/lephare/data_retrieval.py", line 434, in get_auxiliary_data
    keymap = all_types_to_keymap(keymap)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lustre/t1/cl/lsst/tmp/henrique.almeida/miniconda3/lib/python3.11/site-packages/lephare/prepare.py", line 170, in all_types_to_keymap
    for k in input_config:
TypeError: 'NoneType' object is not iterable

Versions:

lephare 0.1.9 (from PyPI)

python 3.11.9 (from conda default channel)

[x] I have described the situation in which the bug arose, including what code was executed, information about my environment, and any applicable data others will need to reproduce the problem.

[x] I have included available evidence of the unexpected behavior (including error messages, screenshots, and/or plots) as well as a descriprion of what I expected instead.

[x] If I have a solution in mind, I have provided an explanation and/or pseudocode and/or task list.

can you specify which example you are starting with? It looks like we need to cut a more recent pypi release, this codebase is lagging behind. If you look at https://github.com/lephare-photoz/lephare/blob/9faf282467b8870a5522bff204623432adcda1e4/src/lephare/data_retrieval.py you can see that indeed the keymap is set to None by default, which will not work with https://github.com/lephare-photoz/lephare/blob/9faf282467b8870a5522bff204623432adcda1e4/src/lephare/prepare.py .
You can compare with main : https://github.com/lephare-photoz/lephare/blob/main/src/lephare/data_retrieval.py where the case keymap=None is treated.
So the root problem seems to be that doc is not reflecting pypi release codebase.

Again as a temporary solution while we fix the PyPI deployment you could run:
lp.data_retrieval.get_auxiliary_data(keymap=lp.default_cosmos_config)
Which will just download the default additional data sets.

Hello, everyone, tested with lephare 0.1.10 and it worked, thanks,

closed as resolved with v0.1.10

authors: hdante johannct raphaelshirley

repo: lephare-photoz/lephare