Analyzer clean-ups

See commit messages

Current coverage is 81.00% (diff: 87.50%)

Merging #4203 into master will decrease coverage by 0.12%

@@             master      #4203   diff @@
==========================================
  Files          1299       1299
  Lines         44286      44283     -3
  Methods           0          0
  Messages          0          0
  Branches       7062       7061     -1
==========================================
- Hits          35929      35871    -58
- Misses         5711       5752    +41
- Partials       2646       2660    +14

Powered by Codecov. Last update 2396c99...b26f4e3

@matriv please review


tbody not rendering after thead in template

I have some HTML that looks like:

I'm binding it to the following data:
var data = {
	Days: [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ]
};

...via the following code:
$('#myTable').html(
	$('#tableTemplate').render(data)
);

The problem is that the tbody containing "Hello World!" doesn't get rendered at all. If I put the tbody before the thead in #tableTemplate, then it renders fine. This seems like a bug to me.
Update: Actually, if the tbody also contains an #each loop too, switching the order doesn't work.
Update 2: Created a jsFiddle demonstrating the issue: http://jsfiddle.net/eWWFd/

remove the hash in front of the each.  It works then.

BTW.  The way to realize that something was wrong with the jsTag (element or handlebar, not sure what you call it) was that it was rendering in the output.

Great, thanks! Out of curiosity, what's the difference between #each and each? I pulled the #each out of one of the demo files.


Same Page Name Issue

I think there is a bug with same naming and the page tree.
I have a structure to explain services

Service1

introduction
some stuff

Service2

introduction
something else

As you can see the first page for each service has the same name.
 FATAL unable to resolve page
└─ unexpected ancestry tree, did not find expected parent page in the tree
├─ expected parent: Service2
├─ list: Backend; Backend Services; Service1
└─ title: introduction

Please note how it is finding Service1 in the list. There is no mentioning of Service1 in the whole repository.
The config on the second service looks like this
<!-- Space: TECH -->
<!-- Parent: Backend -->
<!-- Parent: Backend Services -->
<!-- Parent: Service2 -->
<!-- Title: introduction -->

I don't understand why it's finding Service1s "introduction" instead of creating the "introduction" below Service2. It almost seems like it doesn't understand a tree structure. By the way if I rename the "introduction" to "introduction2" it works just fine.

This is true, mark expects pages' titles to be unique. So what it does is that it finds a page called "introduction" and checks if the tree is the same as expected before updating the contents. If it is not equal to what is expected, then it gets rejected.
It's possible to avoid this behavior if you rename your page to something like Introduction to Service2 and Introduction to Service1.
The other way is to submit a PR which would improve mark's behavior, I'd be glad to merge such a feature.

Understood. It would maybe be enough to just get a list of all pages with the same name and compare all the found trees if one of them fits. I am not proficient in Go just yet...

For what it's worth, I'm seeing similar behavior, +1 to seeing this improved.

Actually it's not supported officially by Confluence, when you're trying to create same name page in one space

I think @anig1scur is correct so I will close this issue from my side.


Give some examples of roles structures

Show how we can create roles in different ways:

Roles per application
Functional roles
In the context of the enterprise
In the context of a SaaS
Sub Roles

+1 would be really interesting ! thx


fix: trim minified script

Possibly resolves #266 #267 #228
see my comments in #266

This seems likely a bug in Nuxt security module but I don’t see a harm in this hotfix.

Would be better if this could be achieved in the minification build step itself.
I'll raise the issue with nuxt-security

They already had a fix ready (https://github.com/Baroshem/nuxt-security/pull/478).
You can dismiss this PR if you think it is not necessary

This PR is good (though the underlying bug in the regexp in nuxt-security does need to be fixed as well.)

A new version of nuxt-security has been released with the previously linked PR. It works now!


Some  elements can be removed

Here is flickr.svg icon for example:
Before:
<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
<rect fill="#ff0084" height="100%" rx="15%" width="100%"/>
<g fill="#fff">
<circle cx="150" cy="256" r="100"/>
<circle cx="365" cy="256" r="100"/>
</g>
</svg>

after:
<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" fill="#fff">
<rect fill="#ff0084" height="100%" rx="15%" width="100%"/>
<circle cx="150" cy="256" r="100"/>
<circle cx="365" cy="256" r="100"/>
</svg>

@ShaggyDude that's true - as it says in the README.  The goal of this is to create the Minimum Viable SVG.  The emphasis being on viable.
And, unless you're using the same icon multiple times, including the colour in the CSS doesn't save any space overall.

It adds some flexibility. Hovers, border radii. .. Splitting hairs though..

Outdated.


Build fixes

I had to make a few fixes in order to get Exempi 2.4.0 to build on OS X 10.11, and a few other fixes to get builds working on CentOS 6. These included:

Check for glibtool and glibtoolize in the full PATH, not just /usr/bin (because with Homebrew on mac these get installed in /usr/local)
Fix type mismatch in calls to XMPMeta::GetProperty()1
Only link against librt on unix environments (the calls to clock_gettime() are already inside #if UNIX_ENV directives) since it is unavailable on mac
On mac, add -stdlib=libc++ to CPPFLAGS and LDFLAGS, and -std=c++11 to CPPFLAGS so that std::unique_ptr works
Change #include <tr1/memory> to #include <memory> on mac (because the former does not work with -stdlib=libc++)
Emulate nullptr for GCC < 4.6.0
Fix a syntax error in ExpatAdapter.cpp when #if BanAllEntityUsage is true (as it is in the Fedora RPM spec file, because of #888765)

1 Although kXMP_NoOptions equals 0, and thus shouldn't make a difference whether it is a pointer or not, clang complains about the type mismatch with cannot initialize a parameter of type 'XMP_OptionBits *' (aka 'unsigned int *') with an rvalue of type 'XMP_OptionBits' (aka 'unsigned int'). I used 0 rather than nullptr for consistency with the way XMPMeta::GetProperty() is called elsewhere.

I picked the first 4 patches and the 5th one I just addressed the problem differently: removed nullptr instead.
Thanks a lot.
Let me know if you find more issues.


Using Maven Lombok and Aspect doesn't compile

When trying to run mvn package the project that include some Aspect (ex: powertool-logging) and also using lombok as dependency break the compilation.
I'm trying to use the powertool with lombok
Expected Behavior
Should not break the build, or have something in the documentation that explains how to make them work together
Possible Solution
Add documentation explaining how to fix it, or use another mechanism to compile de aspect.
Steps to Reproduce (for bugs)

Create a new project
Add lombok dependency
Add powertools-loggin dependency
Add powertools-loggin aspect plugin
Run mvn package

Environment

Powertools version used: Latest
Packaging format (Layers, Maven/Gradle): Maven
AWS Lambda function runtime: Java 11
Debugging logs
[WARNING] You aren't using a compiler supported by lombok, so lombok will not work and has been disabled.
Your processor is: org.aspectj.org.eclipse.jdt.internal.compiler.apt.dispatch.BatchProcessingEnvImpl
Lombok supports: OpenJDK javac, ECJ
:

How to enable debug mode**

# paste logs here

Hi, do you have a public project which reproduces the problem?

@msailes Just do a mvn clean package of this project:
https://github.com/mlefebvre-deblecx/powertools-lombok
If we do a mvn package just after it seems to fix the bug, but it comes back after a clean and for bigger project it does fix it.

@msailes We you looking into this issue? Any further insights what is happening ?

Hey @msailes, I quickly checked an issue that you've raported. Looks that it is not directly related to aws-lambda-powertools-java. The main issue there is related to using Aspectj with Lombok, as both of them needs to add some secret sause during the compilation. You can use technic that is called weaving.
I've tried code that you'd provided (thanks for that!) and after changing plugin config in pom.xml to:
<configuration>
                    <sources/>
                    <weaveDirectories>
                        <weaveDirectory>${project.build.directory}/classes</weaveDirectory>
                    </weaveDirectories>
                    <source>1.8</source>
                    <target>1.8</target>
                    <complianceLevel>1.8</complianceLevel>
                    <aspectLibraries>
                        <aspectLibrary>
                            <groupId>software.amazon.lambda</groupId>
                            <artifactId>powertools-logging</artifactId>
                        </aspectLibrary>
                    </aspectLibraries>
                </configuration>

it works.
Could you please verify with your orginal source code that it works as well?
Some details about this issue:
https://palesz.wordpress.com/2011/12/03/howto-maven-lombok-and-aspectj-together/
https://www.mojohaus.org/aspectj-maven-plugin/examples/weaveDirectories.html

@pankajagrawal16 I imagine this case will be fairly common, should we update the docs to include it?
I'm not sure where we'd put it.

@pankajagrawal16 @msailes  - Does it make any sense to add FAQ  / other new section to docs for that kind of issues?

@kozub I think so, would you be in a position to submit a PR?

Sure, I can do it. I will do my best to provide required changes tomorrow.

Its available here now https://awslabs.github.io/aws-lambda-powertools-java/FAQs/

@mlefebvre-deblecx Let us know if this helps and fixes the issue you were facing. thanks @kozub for contribution.


Fix flycheck not reporting any error with Eglot

Since joaotavora/eglot@da7ff4883d3108468265fdc16a217d8e6aff92f2,
the callback defined by eglot-flymake-backend is only called when
flymake-mode is active. To circumvent this limitation, we let-bind
flymake-mode around eglot-handle-notification. Not relevant, see later comment for the actual workaround
Relates to flycheck/flycheck#1592 discussion

This is not over, there are still situations just after a save where the diagnostics don't seem to bubble up correctly

Copy-pasting the commit:
Since joaotavora/eglot@da7ff48,
the callback defined by eglot-flymake-backend is only called when
flymake-mode is active. To circumvent this limitation, we tried to
let-bind flymake-mode around eglot-handle-notification.
That does not work because eglot-handle-notification uses
with-current-buffer macro in its implementation, and within that macro
the let binding is not used anymore.
It is also impossible to use setq-default in an :around advice, because
the value of flymake-mode in those buffers is not-default and set to
nil. Eglot starts flymake-mode on its entry-point, so
+lsp-prefer-flycheck-h has to set flymake-mode to nil in order to avoid
both implementations showing duplicate bindings.
So instead the code of the publishDiagnostics handler is copied and the
case for flycheck is manually added.
Used https://github.com/joaotavora/eglot/blob/4c85df2b04e467b8ed0eca68bd202fd0e7b671f4/eglot.el#L1586
as base to patch here.

And now I remembered that you cannot merge that because the code is GPLv3 and I did not write it. Moved status back to draft
@joaotavora do you think you'd accept a patch to add a way to trigger an arbitrary callback on publishDiagnostics, so that we could keep a "push" architecture (server sends notification to eglot and diagnostics are only updated at that point) with flycheck ?
I would like to avoid polling eglot--unreported-diagnostics value if possible, since there is no good single value for a delay.

So what's the status of this? I'm trying to figure out how to make doom emacs work with vue-mode.

So what's the status of this? I'm trying to figure out how to make doom emacs work with vue-mode.

I'm finally able to comment here after being mentioned (I wasn't for a while because of a non-contributor block).   I'll try to see what's up this coming week.  It seems like an API of sorts is being requested from Flymake or Eglot.  I don't understand fully why it is needed (I may have understood it in the past and forgotten it).  And I don't understand why doom emacs users can't just use Flymake, like regular Emacs users. It's ok to prefer something else, but is Flymake somehow blocked in Doom?

I'm finally able to comment here after being mentioned (I wasn't for a while because of a non-contributor block).   I'll try to see what's up this coming week.  It seems like an API of sorts is being requested from Flymake or Eglot.  I don't understand fully why it is needed (I may have understood it in the past and forgotten it).  And I don't understand why doom emacs users can't just use Flymake, like regular Emacs users. It's ok to prefer something else, but is Flymake somehow blocked in Doom?

I'm finally able to comment here after being mentioned (I wasn't for a while because of a non-contributor block)

@joaotavora Sorry for the bother! Just a big reorganization effort happening behind the scenes.

And I don't understand why doom emacs users can't just use Flymake, like regular Emacs users. It's ok to prefer something else, but is Flymake somehow blocked in Doom?

It isn't blocked. Flycheck integration in Doom is simply more polished and I'd like to avoid locking users out of the larger selection of checkers flycheck et plugins offer at the moment.

I'm finally able to comment here after being mentioned (I wasn't for a while because of a non-contributor block)

@joaotavora Sorry for the bother! Just a big reorganization effort happening behind the scenes.

And I don't understand why doom emacs users can't just use Flymake, like regular Emacs users. It's ok to prefer something else, but is Flymake somehow blocked in Doom?

It isn't blocked. Flycheck integration in Doom is simply more polished and I'd like to avoid locking users out of the larger selection of checkers flycheck et plugins offer at the moment.

I would like to avoid polling eglot--unreported-diagnostics value if possible, since there is no good single value for a delay.

@gagbo Would this work, instead of redefining eglot-handle-notification's primary method?
(cl-defmethod eglot-handle-notification
  :after
  (server (_method (eql textDocument/publishDiagnostics)) &key uri diagnostics
          &allow-other-keys)
  (when (and eglot--unreported-diagnostics
             flycheck-mode)
    (flycheck-buffer)))

I would like to avoid polling eglot--unreported-diagnostics value if possible, since there is no good single value for a delay.

@gagbo Would this work, instead of redefining eglot-handle-notification's primary method?
(cl-defmethod eglot-handle-notification
  :after
  (server (_method (eql textDocument/publishDiagnostics)) &key uri diagnostics
          &allow-other-keys)
  (when (and eglot--unreported-diagnostics
             flycheck-mode)
    (flycheck-buffer)))

It isn't blocked. Flycheck integration in Doom is simply more polished and I'd like to avoid locking users out of the larger selection of checkers flycheck et plugins offer at the moment. I do have better flymake integration planned, but it'll be some time until I get there.

Makes sense.  BtW, completely unrelated to this, the Flymake mode line is now "properly" customizable it should be easier to fit its indicators in a fancy mode-line.  I remember you requesting this in the past.

@gagbo Would something like this work, instead of redefining eglot-handle-notification's primary method?

@hlissner  it's a nice idea.  It's not 100% safe in itself, because Eglot itself could want to put something there, and there's only one "slot" for doing so, but it's relatively safe and much better than redefining the whole method.  Unfortunately, the larger problem is that you're still using internal variables of the Eglot project.  It's not the first time I see this in Doom, and it's a hazard that has brought problems in the past (once at least in Eglot/Doom specifically, probably millions of times in software dev in general).
Anyway, @gagbo ,I don't see what's the problem of having the Flycheck checker just call eglot-flymake-backend which is an external function, and has a well-behaved protocol.  Its first argument is called with the list of diagnostics objects, which also have a well-defined external API.  So why can't you use that?  It seems a better idea than:

locking flycheck-buffer to the to the diagnostic publication (aren't there other checkers be invoked there possible that would find this odd?)
using internal variables

You may probably still need the :after though, which is to clean all Eglot diagnostics when the textDocument/publishDiagnostics comes in.  EDIT: never mind, you don't, Eglot will do it for you.  You just have to be careful
to support all the cases of the REPORT-FN function as described in C-h v flymake-diagnostic-functions RET.
Let me know what you think.

It isn't blocked. Flycheck integration in Doom is simply more polished and I'd like to avoid locking users out of the larger selection of checkers flycheck et plugins offer at the moment. I do have better flymake integration planned, but it'll be some time until I get there.

Makes sense.  BtW, completely unrelated to this, the Flymake mode line is now "properly" customizable it should be easier to fit its indicators in a fancy mode-line.  I remember you requesting this in the past.

@gagbo Would something like this work, instead of redefining eglot-handle-notification's primary method?

@hlissner  it's a nice idea.  It's not 100% safe in itself, because Eglot itself could want to put something there, and there's only one "slot" for doing so, but it's relatively safe and much better than redefining the whole method.  Unfortunately, the larger problem is that you're still using internal variables of the Eglot project.  It's not the first time I see this in Doom, and it's a hazard that has brought problems in the past (once at least in Eglot/Doom specifically, probably millions of times in software dev in general).
Anyway, @gagbo ,I don't see what's the problem of having the Flycheck checker just call eglot-flymake-backend which is an external function, and has a well-behaved protocol.  Its first argument is called with the list of diagnostics objects, which also have a well-defined external API.  So why can't you use that?  It seems a better idea than:

locking flycheck-buffer to the to the diagnostic publication (aren't there other checkers be invoked there possible that would find this odd?)
using internal variables

You may probably still need the :after though, which is to clean all Eglot diagnostics when the textDocument/publishDiagnostics comes in.  EDIT: never mind, you don't, Eglot will do it for you.  You just have to be careful
to support all the cases of the REPORT-FN function as described in C-h v flymake-diagnostic-functions RET.
Let me know what you think.

Anyway, @gagbo ,I don't see what's the problem of having the Flycheck checker just call eglot-flymake-backend which is an external function, and has a well-behaved protocol. Its first argument is called with the list of diagnostics objects, which also have a well-defined external API. So why can't you use that?

The main issue with this is that I wish diagnostics updates to have a "push" architecture instead of a "polling" one.
Polling
Having the flycheck checker call eglot-flymake-backend, and have the hacky flymake->flycheck conversion, is fine and would work. But when should flycheck call that ? The diagnostics are updated asynchronously by an external process pushing diagnostics to eglot eventually. So either:
Running on a timer
You run the flycheck-checker on a timer, to poll eglot if it received diagnostics for a flycheck diagnostics updates. I don’t like this because it introduces "lag" between diagnostics and display, and because tweaking the delay value will be the source of a lot of gh issues. (There has been this problem with changing company-idle-delay in the past)
Flycheck API to trigger
You use a flycheck trigger to trigger the update. The issue there is that there’s no trigger at all that can detect the reception of an LSP notification (only on save, idle after a change, idle after a buffer switch, on a new line, or when flycheck is active ).
Quick example: when you open a file in a big Rust project, the LSP server might need 1, 10, or 30 seconds to send the first diagnostics notification; there’s no trigger that can handle that arbitrary delay on file opening (without modifying the buffer) :

on save doesn’t because you only opened the file
idle after change doesn’t because you only opened the file
idle after buffer switch means you’d have to know the exact delay for each project, each file on each computer depending on the current load as well (and use the max of the values, or use a dir-locals to customize that delay)
new line doesn’t work because you only opened the file
on flycheck activation doesn’t work because the diagnostics are never ready when flycheck is activated

So we would have to use a weird combination of existing ones, and explain users how to bend Emacs to trigger an update.
Variable watcher on eglot internal
It doesn’t work because variable watcher would need to also clean up the list of diagnostics, and (for good reasons), a variable watcher cannot change the variable that’s being changed (I tried a when-let with operation equal to set but it didn’t really work)
Pushing
That’s mostly why I’d prefer to keep the same behaviour as before. i.e. when eglot receives the relevant publishDiagnostics notification, it automatically called eglot-flymake-report-fn and that’s where we used to place the flycheck "force-update" code that would change diagnostics for the user. Now that it’s gated by flymake-mode variable, I just added a flycheck specific case, and it felt "cleaner" at that point to just call flycheck-buffer in that case.
The after method for generics seems cool, I didn’t know that at all. It would solve my issue I think.

Anyway, @gagbo ,I don't see what's the problem of having the Flycheck checker just call eglot-flymake-backend which is an external function, and has a well-behaved protocol. Its first argument is called with the list of diagnostics objects, which also have a well-defined external API. So why can't you use that?

The main issue with this is that I wish diagnostics updates to have a "push" architecture instead of a "polling" one.
Polling
Having the flycheck checker call eglot-flymake-backend, and have the hacky flymake->flycheck conversion, is fine and would work. But when should flycheck call that ? The diagnostics are updated asynchronously by an external process pushing diagnostics to eglot eventually. So either:
Running on a timer
You run the flycheck-checker on a timer, to poll eglot if it received diagnostics for a flycheck diagnostics updates. I don’t like this because it introduces "lag" between diagnostics and display, and because tweaking the delay value will be the source of a lot of gh issues. (There has been this problem with changing company-idle-delay in the past)
Flycheck API to trigger
You use a flycheck trigger to trigger the update. The issue there is that there’s no trigger at all that can detect the reception of an LSP notification (only on save, idle after a change, idle after a buffer switch, on a new line, or when flycheck is active ).
Quick example: when you open a file in a big Rust project, the LSP server might need 1, 10, or 30 seconds to send the first diagnostics notification; there’s no trigger that can handle that arbitrary delay on file opening (without modifying the buffer) :

on save doesn’t because you only opened the file
idle after change doesn’t because you only opened the file
idle after buffer switch means you’d have to know the exact delay for each project, each file on each computer depending on the current load as well (and use the max of the values, or use a dir-locals to customize that delay)
new line doesn’t work because you only opened the file
on flycheck activation doesn’t work because the diagnostics are never ready when flycheck is activated

So we would have to use a weird combination of existing ones, and explain users how to bend Emacs to trigger an update.
Variable watcher on eglot internal
It doesn’t work because variable watcher would need to also clean up the list of diagnostics, and (for good reasons), a variable watcher cannot change the variable that’s being changed (I tried a when-let with operation equal to set but it didn’t really work)
Pushing
That’s mostly why I’d prefer to keep the same behaviour as before. i.e. when eglot receives the relevant publishDiagnostics notification, it automatically called eglot-flymake-report-fn and that’s where we used to place the flycheck "force-update" code that would change diagnostics for the user. Now that it’s gated by flymake-mode variable, I just added a flycheck specific case, and it felt "cleaner" at that point to just call flycheck-buffer in that case.
The after method for generics seems cool, I didn’t know that at all. It would solve my issue I think.

Right, @gabgo, you are reaching the same discussion I had with myself when first doing this.  I came to the conclusion that polling was better becasue: i

it's cleaner (less code).  And yes, Eglot was running on a "push" architecture for a while in the beginning.
it works well with multiple Flymake backends, some of which don't have this external  unpredictable asynchronous thing telling them when to publish.
There's really no significant effort wasted when you poll and find out there wasn't anything to report
Some Flymake (or Flycheck, I guess) users might want to only check "on demand".  This is "manual polling".  We shouldn't, in principle, break that for them.

I didn’t know that at all. It would solve my issue I think.

  I guess I could make a eglot-unreported-diagnostics accessor function, if you really do think it would be cleaner with this push architecture.  You can make a PR for that in the Eglot repo if you think this is the way to go.

Right, @gabgo, you are reaching the same discussion I had with myself when first doing this.  I came to the conclusion that polling was better becasue: i

it's cleaner (less code).  And yes, Eglot was running on a "push" architecture for a while in the beginning.
it works well with multiple Flymake backends, some of which don't have this external  unpredictable asynchronous thing telling them when to publish.
There's really no significant effort wasted when you poll and find out there wasn't anything to report
Some Flymake (or Flycheck, I guess) users might want to only check "on demand".  This is "manual polling".  We shouldn't, in principle, break that for them.

I didn’t know that at all. It would solve my issue I think.

  I guess I could make a eglot-unreported-diagnostics accessor function, if you really do think it would be cleaner with this push architecture.  You can make a PR for that in the Eglot repo if you think this is the way to go.

Pushing allows to reduce latency the most, and most "complaints" regarding Doom and Emacs and general are around perceived responsiveness, so I do think it's a good thing to keep this ability.
With that being said, we aren't forced to forcefully call (flycheck-buffer) (or any other contender that might come in the future) each time we receive diagnostics. We could support both on eglot by having

a eglot-diagnostics-callback variable that is a callable that must take at least one argument. If non-nil, Eglot calls this callback with eglot--unreported-diagnostics list as first argument, and resets the diagnostics list after that call
an accessor/resetter to the eglot--unreported-diagnostics list

This way anyone can write their own callback, if they want to keep eglot pushing and reduce perceived latency; or you can leave the callback to nil and handle the diagnostics list manually by polling the list and resetting it when you're done with it.
(If a "pusher" wants to keep the "unreported-diagnostics" state for whatever reason, they're free to use a local variable to store this in the callback, but I think that eglot resetting the list after having called the callback is cleaner)

Pushing allows to reduce latency the most, and most "complaints" regarding Doom and Emacs and general are around perceived responsiveness, so I do think it's a good thing to keep this ability.
With that being said, we aren't forced to forcefully call (flycheck-buffer) (or any other contender that might come in the future) each time we receive diagnostics. We could support both on eglot by having

a eglot-diagnostics-callback variable that is a callable that must take at least one argument. If non-nil, Eglot calls this callback with eglot--unreported-diagnostics list as first argument, and resets the diagnostics list after that call
an accessor/resetter to the eglot--unreported-diagnostics list

This way anyone can write their own callback, if they want to keep eglot pushing and reduce perceived latency; or you can leave the callback to nil and handle the diagnostics list manually by polling the list and resetting it when you're done with it.
(If a "pusher" wants to keep the "unreported-diagnostics" state for whatever reason, they're free to use a local variable to store this in the callback, but I think that eglot resetting the list after having called the callback is cleaner)

Pushing allows to reduce latency the most, and most "complaints" regarding Doom and Emacs and general are around perceived responsiveness, so I do think it's a good thing to keep this ability.

Note that latency will always be a function of eglot-send-changes-idle-time anyway.  So your strategy is only potentially useful to deduce the difference between that value and flymake-no-changes-timeout, which, by default, is... 0!  (they are both 0.5 seconds).  And they are both configurable.
This means that as soon as the changes are published Eglot --> Server, flymake also kicks in and puts the correct callback in place, ready to get called as soon as possible.  When the diagnostics come in, it is called.
So unless there's a bug in the current eglot.el (always possible), I don't see how your push scheme can gain any responsiveness.

a eglot-diagnostics-callback variable that is a callable that must take at least one argument. If non-nil, Eglot calls this callback
with eglot--unreported-diagnostics list as first argument, and resets the diagnostics list after that call
an accessor/resetter to the eglot--unreported-diagnostics list

If you really insist in your implementation, I'm OK with the first bullet, but not with the second.  You should devise the protocol better so that the callback tells Eglot what to do with eglot--unreported-diagnostics. It can do this via the return value, for example. That's better than exposing an accessor to an implementation detail.

Pushing allows to reduce latency the most, and most "complaints" regarding Doom and Emacs and general are around perceived responsiveness, so I do think it's a good thing to keep this ability.

Note that latency will always be a function of eglot-send-changes-idle-time anyway.  So your strategy is only potentially useful to deduce the difference between that value and flymake-no-changes-timeout, which, by default, is... 0!  (they are both 0.5 seconds).  And they are both configurable.
This means that as soon as the changes are published Eglot --> Server, flymake also kicks in and puts the correct callback in place, ready to get called as soon as possible.  When the diagnostics come in, it is called.
So unless there's a bug in the current eglot.el (always possible), I don't see how your push scheme can gain any responsiveness.

a eglot-diagnostics-callback variable that is a callable that must take at least one argument. If non-nil, Eglot calls this callback
with eglot--unreported-diagnostics list as first argument, and resets the diagnostics list after that call
an accessor/resetter to the eglot--unreported-diagnostics list

If you really insist in your implementation, I'm OK with the first bullet, but not with the second.  You should devise the protocol better so that the callback tells Eglot what to do with eglot--unreported-diagnostics. It can do this via the return value, for example. That's better than exposing an accessor to an implementation detail.

This means that as soon as the changes are published Eglot --> Server, flymake also kicks in and puts the correct callback in place, ready to get called as soon as possible. When the diagnostics come in, it is called.

Oh I didn't know that, good to know :) Also, does this happen on file opening as well ? I guess so because I assume Eglot has to send a message to the server when it starts working on a file, but I don't know LSP well so I'm not sure.

Even if the latency becomes a non-issue with flymake implementation, there is still the issue that flycheck cannot plug easily onto this because the report-fn call is gated by flymake-mode and there's no other way to use a reporting function in the current API. Being able to use a report function with flycheck is the sole objective of the PR, even if the discussion got messy (sorry for that)

If you really insist in your implementation, I'm OK with the first bullet, but not with the second. You should devise the protocol better so that the callback tells Eglot what to do with eglot--unreported-diagnostics. It can do this via the return value, for example. That's better than exposing an accessor to an implementation detail.

Sure, I was thinking that the second part would probably rarely be used; but without that, and without a more generic report-fn, there's no way to use flycheck with eglot.
An example use case would be to use pyright as LSP, and flycheck-pylint or flycheck-flakes simultaneously to get ""type errors"" from pyright and style error from Flakes/Pylint; if there's already a flycheck checker for a lint specific tool (that doesn't exist for flymake) and you want to use LSP for other diagnostics, you kind of have to use flycheck for both. At least, I never managed to have both flymake and flycheck at the same time without a lot of "small things" to fix

This means that as soon as the changes are published Eglot --> Server, flymake also kicks in and puts the correct callback in place, ready to get called as soon as possible. When the diagnostics come in, it is called.

Oh I didn't know that, good to know :) Also, does this happen on file opening as well ? I guess so because I assume Eglot has to send a message to the server when it starts working on a file, but I don't know LSP well so I'm not sure.

Even if the latency becomes a non-issue with flymake implementation, there is still the issue that flycheck cannot plug easily onto this because the report-fn call is gated by flymake-mode and there's no other way to use a reporting function in the current API. Being able to use a report function with flycheck is the sole objective of the PR, even if the discussion got messy (sorry for that)

If you really insist in your implementation, I'm OK with the first bullet, but not with the second. You should devise the protocol better so that the callback tells Eglot what to do with eglot--unreported-diagnostics. It can do this via the return value, for example. That's better than exposing an accessor to an implementation detail.

Sure, I was thinking that the second part would probably rarely be used; but without that, and without a more generic report-fn, there's no way to use flycheck with eglot.
An example use case would be to use pyright as LSP, and flycheck-pylint or flycheck-flakes simultaneously to get ""type errors"" from pyright and style error from Flakes/Pylint; if there's already a flycheck checker for a lint specific tool (that doesn't exist for flymake) and you want to use LSP for other diagnostics, you kind of have to use flycheck for both. At least, I never managed to have both flymake and flycheck at the same time without a lot of "small things" to fix

Being able to use a report function with flycheck is the sole objective of the PR

Then I'm confused again. That's what I'm suggesting! Don't turn on flymake-mode. Just pass a "Flycheckish" report-fn to eglot-flymake-backend (or to any Flymake backend, as far as I know)  and it will presumably behave well and do the right thing.

Being able to use a report function with flycheck is the sole objective of the PR

Then I'm confused again. That's what I'm suggesting! Don't turn on flymake-mode. Just pass a "Flycheckish" report-fn to eglot-flymake-backend (or to any Flymake backend, as far as I know)  and it will presumably behave well and do the right thing.

It's never called because if we use flycheck, then flymake-mode is nil and the cond branch is skipped in the publishDiagnostics method handler.
So I guess the only solution is to poll it, calling eglot-flymake-backend on a timer, fair enough.

It's never called because if we use flycheck, then flymake-mode is nil and the cond branch is skipped in the publishDiagnostics method handler.
So I guess the only solution is to poll it, calling eglot-flymake-backend on a timer, fair enough.

flymake-mode is nil cond branch is skipped in the publishDiagnostics method handler.

That's a bug, yes.  I can change that.  Assume the flymake-mode check isn't there and work out a solution from there.

flymake-mode is nil cond branch is skipped in the publishDiagnostics method handler.

That's a bug, yes.  I can change that.  Assume the flymake-mode check isn't there and work out a solution from there.

I created this PR because I assumed the flymake-mode check was here to stay.
Without the flymake-mode check in eglot, the code in this PR is not necessary at all. The way it works currently (ignoring the PR) :

eglot starts and the user asked for flycheck completion (by changing a switch in their Doom config)
Doom disables flymake
Doom enables flycheck
Doom calls eglot-flymake-backend, which has the side effect of setting the report-fn internal variable
Eglot receives a publishDiagnostics, and as the internal report-fn is not nil, it's called and flycheck sets the error properly.

I'll edit this PR to make the above flow clearer (in comments), and I guess we can create an issue on eglot repo just to track when flymake-mode check is removed. Would this be ok ?

I created this PR because I assumed the flymake-mode check was here to stay.
Without the flymake-mode check in eglot, the code in this PR is not necessary at all. The way it works currently (ignoring the PR) :

eglot starts and the user asked for flycheck completion (by changing a switch in their Doom config)
Doom disables flymake
Doom enables flycheck
Doom calls eglot-flymake-backend, which has the side effect of setting the report-fn internal variable
Eglot receives a publishDiagnostics, and as the internal report-fn is not nil, it's called and flycheck sets the error properly.

I'll edit this PR to make the above flow clearer (in comments), and I guess we can create an issue on eglot repo just to track when flymake-mode check is removed. Would this be ok ?

Would this be ok ?

Yes it would.
Just a nit, it's not "Setting the report-fn internal variable", I think you mean eglot--current-flymake-report-fn

Would this be ok ?

Yes it would.
Just a nit, it's not "Setting the report-fn internal variable", I think you mean eglot--current-flymake-report-fn

Sorry for the late response. I'll keep an eye on https://github.com/joaotavora/eglot/issues/596. Thanks you both for your help and input!

And I'm sorry for being late on that issue.  It's just about taking out a single sexp, but it causes some minor bugs that I haven't yet had the time to debug.


Debug EmbeddingNet performance

More than 10x slower than random

The EmbeddingNet includes the assignment/marriage problem to pair male and female couples. This is facilitated by the scipy function scipy.optimize.linear_sum_assignment which uses the Hungarian algorithm with a time complexity of O(n^3). This is why the EmbeddingNet takes an extremely long time with large distance matrix inputs to the scipy.optimize.linear_sum_assignment  when the number of agents exceeds 10,000.
Other algorithms and techniques like Jonker-Volgenant algorithm  or the Simplex method have time complexity of O(n^2). However, the use of the scipy.optimize.linear_sum_assignment function is essential to minimizing stochastic noise.
File: network.py, class EmbeddingNet(), Function add_pairs()
dist_mat = spsp.distance_matrix(loc_m[:, np.newaxis], loc_f[:, np.newaxis])

ind_m, ind_f = spo.linear_sum_assignment(dist_mat)

A potential solution (rather than using a less efficient algorithm) is to partition the distance matrix to more efficient sizes to enhance performance.

In diagnosing performance issue, I noticed that on simulation initialization, the EmbeddingNet generates a distance matrix that is 50x the size of subsequent sim runs. This line of code also hits the scipy.optimize.linear_sum_assignment() function.
`dist_mat = spsp.distance_matrix(loc_m[:, np.newaxis], loc_f[:, np.newaxis])
ind_m, ind_f = spo.linear_sum_assignment(dist_mat)
`
Starsim 0.2.10 (2024-03-18) — © 2023-2024 by IDM
Initializing sim with 1000 agents
Distance Matrix Shape =(358, 404)
  Running 2000.0 ( 0/50) (0.54 s)  ———————————————————— 2%
Distance Matrix Shape =(8, 58)
Distance Matrix Shape =(9, 54)
Distance Matrix Shape =(9, 50)
Distance Matrix Shape =(18, 52)
Distance Matrix Shape =(10, 42)
Distance Matrix Shape =(5, 39)
Distance Matrix Shape =(7, 45)
Distance Matrix Shape =(10, 42)
Distance Matrix Shape =(9, 50)

Additional run data with different n_agents values.
Starsim 0.2.10 (2024-03-18) — © 2023-2024 by IDM
Initializing sim with 5000 agents
1874 1879
  Running 2000.0 ( 0/50) (1.67 s)  ———————————————————— 2%
55 46
56 47
48 55
54 59
59 42
73 46
75 48
81 52
67 51

Starsim 0.2.10 (2024-03-18) — © 2023-2024 by IDM
Initializing sim with 2000 agents
744 763
  Running 2000.0 ( 0/50) (0.41 s)  ———————————————————— 2%
18 38
19 42
13 41
20 61
26 61
22 60
18 58
15 59
20 59


Feature/add s3 write

Hi, we wanted to do something like ./run_synthea -p 100000000 and skip local file storage so we added an s3 writer. the code is now extensible and can add other writers such as an HTTPWriter which could post direct to a FHIR server. The PR was getting pretty big  so we stopped just short of doing that.

I did not run ./gradlew check I'll make sure to do that going forward

Recently a PR was rejected as an "external systems integration" and this note was added to the wiki:  https://github.com/synthetichealth/synthea/wiki/Contributing#contributions-to-avoid
Would it be possible to make this PR a little more generic so that it's easier to plug in different cloud providers, or a FHIR server as mentioned? (note that SyntheticMass is now hosted on Google Cloud)
In terms of the specific S3 integration, I have no strong feelings one way or the other but I think the philosophy of avoiding specific external integrations makes sense. If we merge one then we are on the hook for maintaining it. But if a generic API is in place then people can easily add their own.

@BrianKolowitz or @JeffreyTaylor -- any thoughts on @dehall questions?

Thank you for the pull request, but it is being closed due to conflicts and inactivity.


Errors in documentation build

I'm getting a ton of complaints like these:
 . . . . .
  [javadoc] Loading source files for package org.bouncycastle.tsp.cms...
  [javadoc] Loading source files for package org.bouncycastle.tsp.test...
  [javadoc] Constructing Javadoc information...
  [javadoc] Standard Doclet version 1.8.0_181
  [javadoc] Building tree for all the packages and classes...
  [javadoc] /Users/ur20980/src/bc-java/build/artifacts/jdk1.5/bcpkix-jdk15on-160/src/org/bouncycastle/cert/package.html: error - Body tag missing from HTML file
  [javadoc] /Users/ur20980/src/bc-java/build/artifacts/jdk1.5/bcpkix-jdk15on-160/src/org/bouncycastle/cert/cmp/package.html: error - Body tag missing from HTML file
  [javadoc] /Users/ur20980/src/bc-java/build/artifacts/jdk1.5/bcpkix-jdk15on-160/src/org/bouncycastle/cert/crmf/package.html: error - Body tag missing from HTML file
  [javadoc] /Users/ur20980/src/bc-java/build/artifacts/jdk1.5/bcpkix-jdk15on-160/src/org/bouncycastle/cert/jcajce/package.html: error - Body tag missing from HTML file
  [javadoc] /Users/ur20980/src/bc-java/build/artifacts/jdk1.5/bcpkix-jdk15on-160/src/org/bouncycastle/cert/ocsp/package.html: error - Body tag missing from HTML file
  [javadoc] /Users/ur20980/src/bc-java/build/artifacts/jdk1.5/bcpkix-jdk15on-160/src/org/bouncycastle/cms/package.html: error - Body tag missing from HTML file
. . . . .

odd... okay, looks like a runaway ide... these have been fixed, should show up shortly.

Fix confirmed, thanks.


Webhook Issue

Describe the Bug
When making the API call to the application to setup webhooks, (in my case via localhost) the application never sends the webhook requests. NOR does it allow an ip such as: "http://<IP_ADDRESS>:8090" for local applications. I am recieving a 201 code, ensuring the data is json safe, checking the webhook via the URL request. I am not seeing any webhooks being sent out by the mobile application.
To Reproduce
Steps to reproduce the behavior:

Setup the app as normal via localhost
Make the API call to setup a webhook (requests.post(url="http://<IP_ADDRESS>:8080/webhooks", auth=auth, headers={"Content-Type": "application/json"}, data=json.dumps({"id": "1", "url": "https://webhook.site/UUID I USED", "event": "sms:received"})))
Receive a 201 code and verify the webhook's existence at http://<IP_ADDRESS>:8080/webhooks
Send text to the device running the application
See no resulting webhook

(I've also tried this on other webhook capturing sites.)
Expected vs Actual Behavior

Expected: Webhook to be received
Actual: No data received

Environment

App Version: 1.18.0
Mode: Private
Operation: Sending Webhook for incoming text
Network Type: Wifi/Local

Smartphone

Device: Galaxy A25
OS: Android 14
SIM Card Count: 1

Additional Context
Using LAN, no external servers.
EDIT: Got this working after getting rid of the default messaging app, as it seems to interfere with how the application here gets the recieving text event.

First of all, check the logs as described at https://sms.capcom.me/features/logging/.
In the UI, you can find basic information. For detailed information, please use the API.
Additionally, there may be issues with Android 14 due to recent changes in battery optimization. Please find any OS settings regarding battery optimization and disable it for the app.

I forgot to add, no logs are being listed on the application. When I press the button for logs on the app, it shows empty, same as the API get request. I even tried an earlier version of the application and the issue still persists. Everything else seems functional. Texts are going through and the APK, as well as all other functions seem to be doing well. Very nice project, however, webhooks seem to not work at least for this version.

Actually seems only the recieving event isn't working. It is only sending sent events

It seems like the Android OS does not notify the app when a message is received for some reason. Please verify that you have granted the "Receive SMS" permission to the app.
Unfortunately, I don't have a physical Android 14 device near me to test it right now. I will try to test it next week.

Oh, you've already found the solution. Thanks for your feedback!


GA

The site is still listed as Beta, but Url list has been out for ages and being used by lots of people - surely it can be GA by now?

@marcusturewicz it's been a year. I wouldn't say ages 😊. GA aka RTM aka v1.0 is coming!


JOE: new package at 4.6

Description of package
JOE's Own Text Editor, is a dead simple editor styled around Wordstar, EMACs and other editors of yesteryear. It features a simplistic text based interface multiple modes to emulate popular editors. A configuration system and many other features.
[x] I agree to maintain this package.
[x] I agree to notify @dylanaraps if I can no longer maintain this package.**

Updated Depends and build to better match the KISS style guide.

I don't think you pushed your changes?


Feature Request: Get output of JWT payload

In my application, we need the payload from the validated JWT, however the util currently just returns true if it's been validated. This is a feature request to either:

Allow it to return the payload (this might be breaking though?)
Put it in the context, using c.set() with a key that the user defines as one of the options

This would allow people to use the JWT module more effectively 🙂

Hi @Skye-31 !
If we will do it, I would use c.set(). We will consider supporting it. Thanks!

Awesome, let me know if there's anything I can do to help 😄

Hi @Skye-31 !
Since "v3.1.5", we can get the payload with c.get('jwtPayload'):
import { Hono } from 'hono'
import { jwt } from 'hono/jwt'

const app = new Hono()

app.post(
  '/auth/abc',
  jwt({
    secret: 'a-secret',
  }),
  (c) => {
    const payload = c.get('jwtPayload')
    // ...
  }
)

Try it!

Awesome, thanks!


Exposed the lastChanged to fetch option, might be useful is cloning …

…large repositories
This is based on https://github.com/git-tfs/git-tfs/pull/706. Re-based and split it to only one feature
@pmiossec  let me know if someone can review it,
I have update the docs as well.

Seems good to me.
I have tested it and it works. Good job!

@pmiossec done, apologies for late response :)

@codemerlin oups, misunderstanding, that was the tmp variable that I would like to be renamed :(

oh ok I will take care of that :)

@pmiossec  done

Thanks a lot!


Open the dialog box directly from the icon

Hi,
Thanks a lot for this extension. This makes much more sense. This is a feature request.
However, the current workflow is to click the power-off icon-> a drop down list-> choose any of them-> dialog box is appearing.
Is it possible to bypass the drop down altogether and just click the power icon will open the dialog box?

You can use Ctrl+Alt+Del to directly show the end session dialog, or try this extension.


Add Modern Chinese Parser

Adding the Modern Chinese Parser using hanlp (The English version document seems not good. 😞) which I think the parsed result is very nice.
It requires Pytorch, Tensorflow, so by default the is_supported() return False, until user installed the hanlp by pip.
It needs to download model, and the path is configurable . About model path configuration: https://hanlp.hankcs.com/docs/configure.html
If hanlp is not installed, using pkuseg  as default Chinese Parser instead.

Hey @fanyingfx - this looks nice, and it looks like everything is there with tests, the check for support, etc.  Great work, thank you!
I only hesitate to merge this because of the extra requirements and the need for some kind of imported model, which requires documentation and a way to test this with and without the packages.
This is a different way of augmenting Lute than what I had originally had in mind architecturally -- really, I haven't come up with a good way to manage this kind of thing -- but perhaps your idea here (of pip installing extra packages) is in fact the right way to move forward.
Are you able to do record a video showing this working on your system, including any supporting files you might have installed?
Thanks again for this PR, it looks interesting!

I'm keen to know if this generalises for Cantonese as well.
I believe I've seen a python library, for Cantonese, that didn't rely on an AIML solution, i.e. pytorch, tensorflow - i.e. used traditional techniques.
Notwithstanding that this PR might be a great solution, I intend to investigate separately, perhaps there's another solution.

I believe I've seen a python library, for Cantonese, that didn't rely on an AIML solution, i.e. pytorch, tensorflow - i.e. used traditional techniques.
Hi, @jonathonmh, thanks for you advice, I find the jieba  is eaysier to install (it has no other dependencies).So I replace the default  text segmentation from pkuseg to the jieba. If user wants a up-to-date parser(also with up-to-date dictionary) can install the hanlp by pip, then lute will use hanlp to parse Cantonese.

Hi @jzohrab , I know your hesitation. The extra requirements like the model is a  annoying thing. I just change a bit of  my code, that using jieba as default parser(which hasno other dependencies).
Yeah, I can record a video. It is a good idea that the results or issues? will be more clearly demonstrated.

When I recording a video about Chinese parser, I came across a problem. I found when set term text, the text will be parsed again.
  @text.setter
    def text(self, textstring):
        ...
        tokens = lang.get_parsed_tokens(t)
        ...

And when set multiple term using hanlp as parser(Jieba encounters this kind of issue infrequently, but it frequently parsed multiple words term as single word term), the parsed_tokens() result may differ from  it in sentence. It will lead to some multiple words terms can not matched.
For example:

in the sentence "竹条编" can be parsed to "竹条" and "编", when only parse "竹条编" , the result is "竹条编".

When try to solve the multiple terms words for Chinese parser, I have an idea: maybe the zero-width-space for multiple words term is not very suitable for Chinnese ?

Hi @fanyingfx
Looking at the jieba github is a little intimidating! Does this work for only Mandarin?
The Cantonese library I had seen is pycantonese, which also performs segmentation, and conversion to jyupting (i.e. pinyin).
(the conversion to jyutping could be used to prepopulate the ruby field as discussed https://github.com/jzohrab/lute-v3/issues/71)
There may need to be separate solutions for Manadarin vs Cantonese here.

Hi @jonathonmh , after some searching, it seems jieba does not support  Cantonese well  neither support the jyupting.
I think separate soulutions for Manadarin and Cantonese is needed.

Hi @jzohrab , I recorded a lute video about this PR. It only using jieba as parser ,for the hanlp , I find it's hard to make the multi-words term works, so it was removed.
https://github.com/jzohrab/lute-v3/assets/57335844/379e7cb8-f1ac-418e-bce1-35173db5d9b9

Hey sorry haven't answered the various questions :-) -- it's getting busy!

I found when set term text, the text will be parsed again.

Yes, that ensures that the term text has the zero-width token separators in the right locations.

maybe the zero-width-space for multiple words term is not very suitable for Chinese ?

Maybe, but that's a big change to the parsing and text matching model.  The zero-width-space token separator vastly simplifies all pattern matching, which is important.

Yeah, I can record a video. It is a good idea that the results or issues? will be more clearly demonstrated.

I don't understand what you're trying to say :-)

in the sentence "竹条编" can be parsed to "竹条" and "编", when only parse "竹条编" , the result is "竹条编".

Right, this can happen in any language, where a multi-word term covers other terms.  :-P  I think the right solution here (well, as right as I can come up with) is to show the "word components" as well for any multi-word terms in the popup, because sometimes that's useful or important.

The extra requirements like the model is a annoying thing.

Maybe, but it could also be an elegant solution to a difficult problem!  Having a "plug-in" architecture that's extensible for certain needs is a nice way to solve things, and it avoids the mess of a single massive thing trying to handle every possible case.  As long as the management is clear, and the code can handle the component getting added and removed simply and cleanly, it could work great.  But honestly I'm not sure how to keep the management clear.  Using pip means that the environment gets "polluted" with extra things -- hopefully that's not a problem, but I just don't know. :-)
Nice video, thank you!  It certainly looks like the right way to go.

Hey sorry haven't answered the various questions :-) -- it's getting busy!

No problem, I know you are so busy,  just in the Discord I can see you in the everythere XD.

Maybe, but that's a big change to the parsing and text matching model. The zero-width-space token separator vastly simplifies all pattern matching, which is important.

When I try to replace the zero-width-space method, things became more complicate :(.

I don't understand what you're trying to say :-)

Don't mind. It's just  just talking to myself XD.

Right, this can happen in any language, where a multi-word term covers other terms. :-P I think the right solution here (well, as right as I can come up with) is to show the "word components" as well for any multi-word terms in the popup, because sometimes that's useful or important.

If my undestanding is correct, about solution: the multi-word terms can also match the seperate "words componets" as a whole term?
Another thing, just for the Chinese parser what I'm using, it support the user defined dictionary,  can make user defined terms has high priority for the parser, and easy to load. If add all multi-word terms to the user dicitionary, then parsed result can be deterministic. As far as I know, the Mecab support similar thing. Then there is another problem about the dictionary load/update/delete.

Having a "plug-in" architecture that's extensible for certain needs is a nice way to solve things, and it avoids the mess of a single massive thing trying to handle every possible case.

Yeah, a "plug-in" architechture is good, if we can define a clear and general process about how extra things download/load/delete ...etc, things will be easy and clean. I agree there is a soultion for this thing, but I don't know neither XD. Need time to think and try.

Hey there, any update on this?

Hi @krzysztof-wilczynski ,
After some tests, I have found that some additional code modifications are needed for  Chinese when using Lute. If you are interested, you can try my Mandarin fork https://github.com/fanyingfx/lute-v3

Hi @krzysztof-wilczynski , After some tests, I have found that some additional code modifications are needed for Chinese when using Lute. If you are interested, you can try my Mandarin fork https://github.com/fanyingfx/lute-v3

Your fork works perfectly, thanks.

Closing in favor of #408.  The source branch has also changed to chinese_new in the Mandarin fork.  I've chatted briefly about the chinese_new branch with @fanyingfx , and hope to pull some of that work into Lute, so that Mandarin is part of this main release.  Thanks!


MNT: Re-render the feedstock [ci skip]

Hi! This is the friendly conda-forge-admin automated user.
I've re-rendered this feedstock with the latest version of conda-smithy (2.2.2) and noticed some changes.
If the changes look good, then please go ahead and merge this PR.
If you have any questions about the changes though, please feel free to ping the 'conda-forge/core' team (using the @ notation in a comment).
Remember, for any changes to the recipe you would normally need to increment the version or the build number of the package.
Since this is an infrastructural change, we don't actually need/want a new version to be uploaded to anaconda.org/conda-forge, so the version and build/number are left unchanged and the CI has been skipped.
Thanks!

Clearly directed at a branch that was only used for a one off PR so closing.


Limit Size of Summary by the Number of Chars

Adding a command line argument to limit the size of the summary, so if the summary was "meeting with costumer" and you set the limit to 7, using -l 7, the summary displayed turns to "meeting...". This brings a more organized i3bar with i3-agenda.

Solves #50


Accessibility issue with terminal on PWD site

PWD would be a great possibility to play with Docker container images, etc. but I am unable to use it via terminal on the PWD site, as it is not accessible using with a screen-reader software. Since I'm blind I use a screen-reader. The problem is that I'm unable to type or paste text (e.g. Docker commands) into the terminal. Screen-reader cannot read anything, if I hadn't written anithing in it. I tested this issue with following screen-readers: JAWS 2021, NVDA, Narrator.
I tried to use ssh using access information to my instance from site but I got an "Permission denied (publickey).") error. Should I access PWD with ssh?
Thanks in advanc!e!

Hey @kolldani thank for opening this issue! Since PWD uses https://xtermjs.org/ as a terminar, AFAIK there's an option to enable screenReader mode into the terminal. Regarding copy / paste, you should be able to use ctrl + insert and shift + insert respectively as a copy/paste option.
I'll make a fix with the screen reader mode on and come back here to see if that works better for you.
Marcos.

hey @kolldani! just released a new version of https://labs.play-with-docker.com with accessibility features enabled in the terminal. Since I don't have a screen reader I'd really like your input on how to improve these aspects on the website. Please let me know if it's better now and how we could be improving on this aspect.


CI and Makefile updates

Run rustfmt in make validate and CI validation
Makefile: allow modification of PREFIX, DATADIR and MANDIR
.cirrus.yml uses make targets instead of cargo commands
Use mandown for manpage generation instead of go-md2man

Needs rustfmt(-nightly) and mandown crates installed in CI image.
Signed-off-by: Lokesh Mandvekar<EMAIL_ADDRESS>@flouthoc @baude @mheon @Luap99 @ashcrow PTAL
We'll need rustfmt crate in quay.io/libpod/netavark-devel to get this working.
Also, once this is merged, I expect a few things to go kaboom.

SGTM, as long as the output is valid

ack, generates a netavark.1 just fine on my machine.

Suggestion (maybe for another PR) setup and use https://pre-commit.ci/ instead of DCO to perform the basic validations.  Reason: It's highly extensible and scaleable.  Plus the same set of validation plugins is available to be used locally with the git pre-commit hook (available in Fedora).

Suggestion (maybe for another PR) setup and use https://pre-commit.ci/ instead of DCO to perform the basic validations. Reason: It's highly extensible and scaleable. Plus the same set of validation plugins is available to be used locally with the git pre-commit hook (available in Fedora).

@cevich thanks, looking at .pre-commit-config.yaml in podman, I do see a bunch of ids but nothing that gets rid of DCO. Is that yet to be done over there or am I not reading it right?

Again, I'm totally cool with leaving a more full-feature validation job up to another PR.

kinda sorta conflicts with https://github.com/containers/netavark/pull/36


[super_context_menu] can't run on real device and can't archive

super_context_menu: ^0.6.0
flutter: 3.10.6
Project uses Isar(I think also use rust) and I'm on m1 mac if it's relevant. Output of which rustup:
which rustup
/Users/mirkan/.cargo/bin/rustup

I can run it on iOS emulator but archiving stucks for a very long time. I tried to run on real device, error is below:
Could not build the precompiled application for the device.
Error output from Xcode build:
↳
    2023-08-09 14:01:23.959 xcodebuild[9655:53746] Requested but did not find extension point with identifier Xcode.IDEFoundation.IDEResultKitSerializationConverter
    xcodebuild: error: Existing file at -resultBundlePath "/var/folders/xl/ymt9dc6n2dgdkz8gyw9nwd9m0000gn/T/flutter_tools.p4JZNr/flutter_ios_build_temp_dirs0FfDJ/temporary_xcresult_bundle.xcresult"

Error launching application on iPhone.

The error doesn't seem to be related to super_context_menu. Can youu post here verbose logs?

Sorry for late response, I was able to run and build once. Applied some stuff from here, not sure what it was that solved the issue.
Unrelated but I'd glad if you have any insight on it. Archiving time is super slow, like it's a brand new app that I was able to build ipa in 1-2 minutes. Not it takes lot 20-30 minutes. Do you have any suggestions? Can it be related to the rust optimization, or can I install something to speed it up rust side?

It's unlikely that the delay is caused by rust. Also I can't really provide any insight without seeing verbose log.

This happened on my M1 when I attempted to build apk or archive.
I was able to resolve it by running
rustup toolchain uninstall nightly-aarch64-apple-darwin
rustup toolchain install nightly-aarch64-apple-darwin
rustup component add rust-src --toolchain nightly-aarch64-apple-darwin

build slow


ENH: control PeakStats in spec API via gs / gs.SUB_FACTORIES refactor

Closes https://github.com/NSLS-II/Bug-Reports/issues/123
attn @ambarb
You can control this via gs.PS_CONFIG['edge_count'] = n, 0 turns it off.

[Current coverage][cc-pull] is 82.94%

Merging [#511][cc-pull] into [master][cc-base-branch] will increase coverage by <.01%

@@             master       #511   diff @@
==========================================
  Files            19         19
  Lines          3951       3952     +1
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits           3277       3278     +1
  Misses          674        674
  Partials          0          0

Powered by Codecov. Last updated by [991af95...6155872][cc-compare]
[cc-base-branch]: https://codecov.io/gh/NSLS-II/bluesky/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/NSLS-II/bluesky/compare/991af9594978b33cb256b225b80d121554a833de...61558729f766959294a2daad5cef04be205e7f70
[cc-pull]: https://codecov.io/gh/NSLS-II/bluesky/pull/511?src=pr

I really like this refactor of the SPEC subscriptions. See some minor notes and add content to docs.

I do not think the docstrings need notes on if they internals are used as they are conforming to a specified API.

👍  on the functionality.
Any thoughts on changing the setup_* signature to required kwargs instead of positional args?

:+1: to required kwargs!  Lets see how far we can push that before it gets too annoying :smiling_imp:

these commits are squashed and moved into #516


Addon syncs my list even though Keep My List and Kodi Library in sync is switched off

Bug report
Your Environment

Netflix add-on version: 15.9 (you send me yesterday)
Operating system version/name: LE 9.1.501
Device model:  Rpi4
Settings addon: https://paste.kodi.tv/ayarutepic

Used Operating system:

[ ] Android
[ ] iOS
[ ] Linux
[ ] OSX
[x] Raspberry-Pi
[ ] Windows

Describe the bug
I exported one show (Peaky Blinders) to my local library, when I switch on scheduled automated updates, my list gets synchronized instead of only the single show.
Expected behavior
Only the show I exported (Peaky Blinders) is synchronized with my local library
Actual behavior
All the shows in my list are synchronized.
Steps to reproduce the behavior

Purge library
Export 1 show (Peaky Blinders)
Wait until scheduler updates

Debug log
The debug log can be found from this link:
https://paste.kodi.tv/ezayilelux.kodi
I don't have debug log at this moment but the info log shows a bunch errors as well.

If necessary I can make a debug log but then I have to figure out first how to not show the text on the display.

make a screenshot of your addon library settings thanks

I can make a screenshot in an hour or something, for now I posted the addon settings here: https://paste.kodi.tv/ayarutepic

These are my settings:

Install this and let me know
plugin.video.netflix_0.15.10_20191119_fix.zip

I just tried again by forcing an update with check updates now and that seems to be working as expected.
I also set a timer a few minutes in the future and at least no unexpected episodes show up but I also don't know if it updated then because I didn't get a notification.
Settings:

Debug log: https://paste.kodi.tv/pexudafaco.kodi
I expected an update at 16:15 and performed a manual update at 16:18

if the auto-update has already been performed once, it will not be performed again even if you change the time.
It is based on the date, you have to wait for the next day

aah okay I see! Then I'll set it back to 12 o'clock and let you know tomorrow what happened, thank you for your help already!

Please if you can let me know by today,
this is an important fix
i should release it as soon as possible

Hi, I'm not home right now but I'll be home within 3 hours, I'll let you know directly then!

I don't see any extra shows so that's good, but at the same point I also don't see any evidence of a scheduled update that ran. This should've happened at 00:00h.
Debug log:
kodi.log
00:00h is at line 27569

i think you have miss to enable debug verbose in nf addon
Go to add-on settings, in Expert page and change "Debug logging level" to "Verbose"
and reboot

I changed it but now I can only give you a new log tomorrow because I have to wait again right?

yes, but also i think that the auto-update should already have been executed
so later if you want put new log to confirm all

I see that there are no unexpected shows.
Upon inspection of the log I think I also see the netflix update, maybe you can check as well to verify. The netflix update starts around 00:00:45
kodi.log

again no netflix debug info in log....
i think that yesterday you forgot again to change addon settings:
in Expert page and change "Debug logging level" to "Verbose"

Strange, I'm pretty sure I did enable that and rebooted but I will check tonight.

kodi.log
Here you go, I hope it's fine this time, I checked the settings and it wasn't on verbose last time, not it should be.

yes this time there is, libbrary auto update is started and ended without errors

Okay perfect, there were also no unexpected imports so I think this can be closed.

thank you


AttributeError: '_TfDeviceCaptureOp' object has no attribute '_set_device_from_string'

Tensorflow Version: 1.14.0
python3.6
Num of GPU's : 3
--- Sample keras code to reproduce this error ---
import tensorflow as tf
from keras.applications import Xception
from keras.utils import multi_gpu_model
import numpy as np

num_samples = 1000
height = 224
width = 224
num_classes = 1000

model = Xception(weights=None,
                     input_shape=(height, width, 3),
                     classes=num_classes)

gpus = tf.config.experimental.list_physical_devices('GPU')
print(gpus)
parallel_model = multi_gpu_model(model, gpus=2)

Error Message:

device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
device_string:  /device:GPU:0
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/keras/utils/multi_gpu_utils.py", line 227, in multi_gpu_model
    outputs = model(inputs)
  File "/usr/local/lib/python3.6/dist-packages/keras/engine/base_layer.py", line 457, in __call__
    output = self.call(inputs, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/keras/engine/network.py", line 564, in call
    output_tensors, _, _ = self.run_internal_graph(inputs, masks)
  File "/usr/local/lib/python3.6/dist-packages/keras/engine/network.py", line 721, in run_internal_graph
    layer.call(computed_tensor, **kwargs))
  File "/usr/local/lib/python3.6/dist-packages/keras/layers/normalization.py", line 185, in call
    epsilon=self.epsilon)
  File "/usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py", line 1858, in normalize_batch_in_training
    if not _has_nchw_support() and list(reduction_axes) == [0, 2, 3]:
  File "/usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py", line 291, in _has_nchw_support
    explicitly_on_cpu = _is_current_explicit_device('CPU')
  File "/usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py", line 266, in _is_current_explicit_device
    device = _get_current_tf_device()
  File "/usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py", line 247, in _get_current_tf_device
    g._apply_device_functions(op)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/ops.py", line 4581, in _apply_device_functions
    op._set_device_from_string(device_string)
AttributeError: '_TfDeviceCaptureOp' object has no attribute '_set_device_from_string'
(arg: 2)

Solved, It's a bug in tensorflow 1.14.0
When I downgraded to 1.13.1, it's back to normal :-/

Same Problem Here

Can not downgrade to tensorflow-gpu 1.13.1 - please give me the exact version that works
sudo -H python3 -m pip install tensorflu-gpu==1.3.1 Collecting tensorflu-gpu==1.3.1   Could not find a version that satisfies the requirement tensorflu-gpu==1.3.1 (from versions: ) No matching distribution found for tensorflu-gpu==1.3.1
I tried a lot of TF versions - nothing works
Thank you
Dorin

Any news regarding that problem?

Hi @robieta, seems you recently made changes to _TfDeviceCaptureOp, would you mind to take a look?
Thanks.

If it helps, I got the same error message with another traceback.
AttributeErrorTraceback (most recent call last)
 in ()
----> 1 model = multi_gpu_model(model,gpus=2)
/usr/local/lib/python2.7/dist-packages/keras/utils/training_utils.pyc in multi_gpu_model(model, gpus)
173                 # Apply model on slice
174                 # (creating a model replica on the target device).
--> 175                 outputs = model(inputs)
176                 if not isinstance(outputs, list):
177                     outputs = [outputs]
/usr/local/lib/python2.7/dist-packages/keras/engine/base_layer.pyc in call(self, inputs, **kwargs)
455             # Actually call the layer,
456             # collecting output(s), mask(s), and shape(s).
--> 457             output = self.call(inputs, **kwargs)
458             output_mask = self.compute_mask(inputs, previous_mask)
459
/usr/local/lib/python2.7/dist-packages/keras/engine/network.pyc in call(self, inputs, mask)
562             return self._output_tensor_cache[cache_key]
563         else:
--> 564             output_tensors, _, _ = self.run_internal_graph(inputs, masks)
565             return output_tensors
566
/usr/local/lib/python2.7/dist-packages/keras/engine/network.pyc in run_internal_graph(self, inputs, masks)
719                                     kwargs['mask'] = computed_mask
720                             output_tensors = to_list(
--> 721                                 layer.call(computed_tensor, **kwargs))
722                             output_masks = layer.compute_mask(computed_tensor,
723                                                               computed_mask)
/usr/local/lib/python2.7/dist-packages/keras/layers/normalization.pyc in call(self, inputs, training)
183         normed_training, mean, variance = K.normalize_batch_in_training(
184             inputs, self.gamma, self.beta, reduction_axes,
--> 185             epsilon=self.epsilon)
186
187         if K.backend() != 'cntk':
/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.pyc in normalize_batch_in_training(x, gamma, beta, reduction_axes, epsilon)
1856     """
1857     if ndim(x) == 4 and list(reduction_axes) in [[0, 1, 2], [0, 2, 3]]:
-> 1858         if not _has_nchw_support() and list(reduction_axes) == [0, 2, 3]:
1859             return _broadcast_normalize_batch_in_training(x, gamma, beta,
1860                                                           reduction_axes,
/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.pyc in _has_nchw_support()
289         bool: if the current scope device placement would support nchw
290     """
--> 291     explicitly_on_cpu = _is_current_explicit_device('CPU')
292     gpus_available = len(_get_available_gpus()) > 0
293     return (not explicitly_on_cpu and gpus_available)
/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.pyc in _is_current_explicit_device(device_type)
264     if device_type not in ['CPU', 'GPU']:
265         raise ValueError('device_type should be either "CPU" or "GPU".')
--> 266     device = _get_current_tf_device()
267     return (device is not None and device.device_type == device_type.upper())
268
/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.pyc in _get_current_tf_device()
245     g = tf.get_default_graph()
246     op = _TfDeviceCaptureOp()
--> 247     g._apply_device_functions(op)
248     return op.device
249
/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.pyc in _apply_device_functions(self, op)
4579       # strings, since identity checks are faster than equality checks.
4580       if device_string is not prior_device_string:
-> 4581         op._set_device_from_string(device_string)
4582         prior_device_string = device_string
4583     op._device_code_locations = self._snapshot_device_function_stack_metadata()
AttributeError: '_TfDeviceCaptureOp' object has no attribute '_set_device_from_string'

As a workaround, can you try tf.distribute.MirroredStrategy()? This is the recommended way going forward for multi-gpu training

Any update on this issues. I am still facing the issue when using multi gpu..

Any updates on this issue? This bug is preventing me from upgrading to tf1.14.

I'm having the same issue, downgrading to 1.13.1 solved it for me, please fix.

The same

Make sure when you downgrade, you downgrade other tensorflow packages that you have installed:
if python 2:
pip install tensorflow==1.13.1
pip install tensorflow-gpu==1.13.1

If python 3:
pip3 install tensorflow==1.13.1
pip3 install tensorflow-gpu==1.13.1

Even shorter code to reproduce the issue:
from tensorflow import device
    with device('/gpu:0' if use_GPU else '/cpu:0'): [any Keras code that compiles a model]

@tuanzhangCS I installed keras from the master branch that has the PR you linked but I still get this error:
Traceback (most recent call last):
  File "run_cropmask.py", line 287, in <module>
    mode="training", config=config, model_dir=args.logs
  File "/data/anaconda/envs/cropmask/lib/python3.7/site-packages/cropmask/mrcnn/model.py", line 2025, in __init__
    self.keras_model = self.build(mode=mode, config=config)
  File "/data/anaconda/envs/cropmask/lib/python3.7/site-packages/cropmask/mrcnn/model.py", line 2345, in build
    model = ParallelModel(model, config.GPU_COUNT)
  File "/data/home/ryan/work/CropMask_RCNN/cropmask/mrcnn/parallel_model.py", line 33, in __init__
    merged_outputs = self.make_parallel(keras_model, gpu_count)
  File "/data/home/ryan/work/CropMask_RCNN/cropmask/mrcnn/parallel_model.py", line 79, in make_parallel
    outputs = inner_model(inputs)
  File "/data/anaconda/envs/cropmask/lib/python3.7/site-packages/keras/engine/base_layer.py", line 457, in __call__
    output = self.call(inputs, **kwargs)
  File "/data/anaconda/envs/cropmask/lib/python3.7/site-packages/keras/engine/network.py", line 564, in call
    output_tensors, _, _ = self.run_internal_graph(inputs, masks)
  File "/data/anaconda/envs/cropmask/lib/python3.7/site-packages/keras/engine/network.py", line 721, in run_internal_graph
    layer.call(computed_tensor, **kwargs))
  File "/data/anaconda/envs/cropmask/lib/python3.7/site-packages/cropmask/mrcnn/model.py", line 71, in call
    return super(self.__class__, self).call(inputs, training=training)
  File "/data/anaconda/envs/cropmask/lib/python3.7/site-packages/keras/layers/normalization.py", line 185, in call
    epsilon=self.epsilon)
  File "/data/anaconda/envs/cropmask/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py", line 1858, in normalize_batch_in_training
    if not _has_nchw_support() and list(reduction_axes) == [0, 2, 3]:
  File "/data/anaconda/envs/cropmask/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py", line 291, in _has_nchw_support
    explicitly_on_cpu = _is_current_explicit_device('CPU')
  File "/data/anaconda/envs/cropmask/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py", line 266, in _is_current_explicit_device
    device = _get_current_tf_device()
  File "/data/anaconda/envs/cropmask/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py", line 247, in _get_current_tf_device
    g._apply_device_functions(op)
  File "/data/anaconda/envs/cropmask/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 4581, in _apply_device_functions
    op._set_device_from_string(device_string)
AttributeError: '_TfDeviceCaptureOp' object has no attribute '_set_device_from_string'

@rbavery You can open the file "/data/anaconda/envs/cropmask/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py" and check if there is the fix there. The reason for this error is that "class  _TfDeviceCaptureOp" which declared in "keras/backend/tensorflow_backend.py" has no func '_set_device_from_string', so we can just add it.
So I think you package of keras doesn't have the change of this fix PR. My way is merge the code by myself, only need to add three lines code all. It runs well.
why your keras doesn't have this fix, I guess you install keras by pip?

Indeed. The fix is in for keras-team/keras, but conda/pip installs won't pick it up until the next keras release. @fchollet Do you think it's worth making a 2.2.6? (I'm not sure how far out 2.3.0 is, and if this is breaking enough to warrant an intermediate release.)

Does it get fixed on TF 2.0?

With the release of keras-team/keras, this should be fixed in both keras and tf.keras.

@rbavery You can open the file "/data/anaconda/envs/cropmask/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py" and check if there is the fix there.
The reason for this error is that _"class TfDeviceCaptureOp" which declared in "keras/backend/tensorflow_backend.py" has no function _'set_device_from_string', so we can just add it.
So I think your package of keras doesn't have the change of this fix PR. My way is merge the code by myself, only need to add three lines code all. It runs well.
why your keras doesn't have this fix, I guess you install keras by pip?

name "tfdev" is not defined? where is the tfdev?

@sunanlin13174 Have you added from tensorflow.python.framework import device as tfdev ? Make sure you added every line in robieta's commit. By the way, the last version of keras still doesn't work?

@sunanlin13174 Have you added from tensorflow.python.framework import device as tfdev ? Make sure you added every line in robieta's commit. By the way, the last version of keras still doesn't work?

thanks very much,i upgraded keras to 2.3.0,and the issue solved. but i meet a new issue: "no model name control_flow_ops",so i modified keras.backend.init.py,add a code "from .load_backend import control_flow_ops" , but error:"cannot import name 'control_flow_ops' from 'keras.backend.load_backend' , tesorflow-gpu==1.14.0 , do you have a solution? thanks for reply!

@sunanlin13174 Have you added from tensorflow.python.framework import device as tfdev ? Make sure you added every line in robieta's commit. By the way, the last version of keras still doesn't work?

thanks very much,i upgraded keras to 2.3.0,and the issue solved. but i meet a new issue: "no model name control_flow_ops",so i modified keras.backend.init.py,add a code "from .load_backend import control_flow_ops" , but error:"cannot import name 'control_flow_ops' from 'keras.backend.load_backend' , tesorflow-gpu==1.14.0 , do you have a solution? thanks for reply!

Keras doesn't support control_flow_ops now. So, you need use it from tensorflow directly.

yes,i got it ,thanks
------------------ 原始邮件 ------------------
发件人<EMAIL_ADDRESS>发送时间: 2019年10月28日(星期一) 晚上8:36
收件人<EMAIL_ADDRESS>抄送<EMAIL_ADDRESS><EMAIL_ADDRESS>主题: Re: [tensorflow/tensorflow] AttributeError: '_TfDeviceCaptureOp' object has no attribute '_set_device_from_string' (#30728)
@sunanlin13174 Have you added from tensorflow.python.framework import device as tfdev ? Make sure you added every line in robieta's commit. By the way, the last version of keras still doesn't work?
thanks very much,i upgraded keras to 2.3.0,and the issue solved. but i meet a new issue: "no model name control_flow_ops",so i modified keras.backend.init.py,add a code "from .load_backend import control_flow_ops" , but error:"cannot import name 'control_flow_ops' from 'keras.backend.load_backend' , tesorflow-gpu==1.14.0 , do you have a solution? thanks for reply!
Keras doesn't support control_flow_ops now. So, you need use it from tensorflow directly.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.


Run configurations for JS

Three minor problems with JS Run configurations:

They always appear greyed out.
If node.js is not installed on the machine, and I try to run a JS run configuration, instead of an error, it will silently run on Java instead.
The little window icon that appears in the ruler next to the runnable function does not give me the option to run on JS in a cross-platform project.

I reworked the run configurations a little:

I disabled the icon in the left gutter, it generates too much icons because any shared toplevel class/function that has an empty parameter list could be a runnable, whereas in practice most of them are not meant to be run directly.
To determine on which backend a declaration can be run, I now check both the checkboxes in the settings and the native() annotations on the module.

When no run configuration exists and both backends are available, IntelliJ will show a submenu with two configurations, but as soon as you run one of them it will only show the last configuration that was run (like on the above screenshot). This means that when both JS and JVM are available, you'll probably have to use the menu Run > Run... to create a second configuration for the other backend. Don't ask why, that's just how IntelliJ works.
As for the absence of Node.js, I see an error message when I try to run a JS configuration (ceylon run-js: Could not find 'node' executable. Please install node.js). Maybe you ran the JVM configuration instead?

Oh, and configurations are greyed out when they are not saved (meaning they might disappear if you create a certain number of other configurations).

@bjansen is it expected that the gutter icon is gone?

Yes, just read my comment.

I disabled the icon in the left gutter, it generates too much icons because any shared toplevel class/function that has an empty parameter list could be a runnable, whereas in practice most of them are not meant to be run directly.

Hrm. Perhaps we could show them only for functions?


Expand translation instructions

There are additional options for translations that are only mentioned inside trs scripts:

// AGS TRANSLATION SOURCE FILE
// Format is alternating lines with original game text and replacement
// text. If you don't want to translate a line, just leave the following
// line blank. Lines starting with '//' are comments - DO NOT translate
// them. Special characters such as [ and %%s symbolise things within the
// game, so should be left in an appropriate place in the message.
//
// ** Translation settings are below
// ** Leave them as "DEFAULT" to use the game settings
// The normal font to use - DEFAULT or font number
//#NormalFont=DEFAULT
// The speech font to use - DEFAULT or font number
//#SpeechFont=DEFAULT
// Text direction - DEFAULT, LEFT or RIGHT
//#TextDirection=DEFAULT
//
// ** REMEMBER, WRITE YOUR TRANSLATION IN THE EMPTY LINES, DO
// ** NOT CHANGE THE EXISTING TEXT.

Notably:

Using comments
Setting up font replacement
Dealing with formatted strings

This info should be useful for both game developers and translators (who are not necessarily experts in  AGS)

Updated topic.


Include thick mode for OracleDB integrations

Is your feature request related to a problem? Please describe.
Yes, current Oracle DB connection does not work in thin mode (for my desired destination on a remote server) and requires init_oracle_client().
Describe the solution you'd like
A parameter, or something of the sort, to enable the data integration / loading into an OracleDB that requires Thick mode. I think two templates is overkill. Having a param included in config would be great! Not sure what is the best solution, but something to allow the default Thin mode and something to enable the thick mode which uses init_oracle_client() that requires the oracle client lib be available in the system lib search path before the py process starts. Please see https://python-oracledb.readthedocs.io/en/latest/user_guide/installation.html#installing-python-oracledb-on-linux and https://python-oracledb.readthedocs.io/en/latest/user_guide/initialization.html#enabling-python-oracledb-thick-mode for info.
Describe alternatives you've considered
Briefly attempted to modify image to include the above mentioned solutions so the library is available but to avail... Would be awesome if you guys could take this on! :)
Additional context
Having this feature would be a huge win for us here.

I can see the PR has been released. Thanks so much @wangxiaoyou1993 && @matrixstone! 🥳


gradlew run fail

ERROR [2019-04-15 03:21:18,867] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down
! java.net.BindException: Address already in use: bind
! at java.base/sun.nio.ch.Net.bind0(Native Method)
I sucessfully installed but when I tried to run this occured.
Also I received the following errors when I debugged the install:
23:26:30.330 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
23:26:30.331 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
23:26:30.331 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
23:26:30.331 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
23:26:30.332 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Task 'clean' not found in root project 'grobid-installation'.
23:26:30.332 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
23:26:30.332 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
23:26:30.332 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace.  Run with --scan to get full insights.
23:26:30.333 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
23:26:30.333 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help athttps://help.gradle.org
23:26:30.333 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
23:26:30.333 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 40s

Hello @alimirzazadeh !

! java.net.BindException: Address already in use: bind

It looks like you already have something running using the 8070 or 8071 port?

Is there any way to change the port destination number? I have the following two programs running on 8070 that I am having trouble removing?

Sure, there is a server config file, it's documented here:
https://grobid.readthedocs.io/en/latest/Grobid-service/#configure-the-server

I see. I removed completely, reinstalled with new port numbers, but I still get this error in the installation process:

Which JVM version are you using?
(to make things easier, it's better to join the error trace as text and not image, thanks!)

java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)

Ok! current GROBID is based on JVM 8
For recent JVM, see these fixes:
https://grobid.readthedocs.io/en/latest/Troubleshooting/#wrong-java-version

I've just pushed da0a8f1d44b01f61b90ac4aa144bb4c520fecefb an update of the dependencies and gradle version to support JVM 10.


Fix incorrect PBR lighting on instanced 3D models

This fixes https://github.com/AnalyticalGraphicsInc/cesium/issues/7655. The problem is that instanced 3D models set up the model and modelView matrices differently, see https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/ModelInstanceCollection.js#L277-L305. So instead of instead of using czm_modelView in the PBR shader, you'd want to set up and use czm_instanced_modelView (does that sound right @lilleyse ?)
The ModelInstanceCollection class handles this substitution in the vertex shader but doesn't make any changes to the fragment shader. One way to fix this issue would require setting up similar substitutions for the fragment shader of instanced models.
Sean noticed that a simpler change would be to just not rely on the model matrix in the PBR shader, which solves this issue.
Before:

After:

I can also write up an issue to figure out a long term solution to this. Since this now involves having to remember not to use any of the model matrices in these shaders since they are different from instanced vs non instanced models.
Sean has already looked at this code, @bagnell can you review this (and post any thoughts here too)?

Thanks for the pull request @OmarShehata!

:heavy_check_mark: Signed CLA found.
:grey_question: Unit tests were not updated.

Make sure you've updated tests to reflect your changes, added tests for any new code, and ran the code coverage tool.

Reviewers, don't forget to make sure that:

[ ] Cesium Viewer works.
[ ] Works in 2D/CV.
[ ] Works (or fails gracefully) in IE11.

I'm not sure there is a good way to unit test this. Maybe we should have tests that compare the rendering of models and instance models with the same options?
This looks good to me. Thanks @OmarShehata.

Yeah I couldn't think of an easy reliable unit test. Although a simple color test could have potentially caught this (if the camera was in the right spot..)
I'm more concerned about the underlying issue here, that if any developer uses a model matrix in a fragment shader for 3d models, it will break for instanced models. I don't know how big of a refactor it would be or if there's a cleaner approach to handling these uniforms for instanced models.


Limit batch deletes to 100

This fixes #365 by sending separate batch requests if deletes are more than 100.

Looks good. One comment about the javadoc and the visibility of this chunking and another style suggestion.

Fixed in place


Crash

crash on newest 1.19.2

Crash logs? Steps to reproduce?

Resolved after another report with crash logs
Also note to self: redirect the source button on the page to the actual repository, the fact this was on the fabric repository threw me off, but it's more on me that it is.