Times in --profile explanation?

This is not really a bug, but I didn't find anything on the docs, and don't know where to ask.
What Ruby, Rails and RSpec versions are you using?
Ruby version: 2.7.7
Rails version: <IP_ADDRESS>
RSpec version:

rspec-core 3.11.0
rspec-expectations 3.11.0
rspec-mocks 3.11.0
rspec-rails 5.1.1
rspec-support 3.11.0

Observed behaviour
I have a spec file with 13 examples, when running with the --profile 13 running my examples shows that the total time spent on them only accounts for 18.3% of the total time. I wonder where rspec is spending the rest of the time.
Top 13 slowest examples (0.14978 seconds, 18.3% of total time):
    0.04215 seconds
    0.02262 seconds
    0.01329 seconds
    0.01266 seconds
    0.01187 seconds
    0.01129 seconds
    0.01058 seconds
    0.00678 seconds
    0.0055 seconds
    0.00515 seconds
    0.00332 seconds
    0.00234 seconds
    0.00222 seconds

Finished in 0.81792 seconds (files took 2.86 seconds to load)
13 examples, 0 failures

Expected behaviour
Can you provide an example app?

Each example records it's own execution time, this doesn't take into account any time taken by RSpec itself to set the example up to run and specifically doesn't include any :suite or :context hooks you may have (as these times are shared across several specs), the load time is from the time taken to load rspec/core or the time from initialising the config to when the suite starts, so can be slightly inaccurate in odd load cases.

It might be a fun exercise for someone to capture timing of those hooks and include them into the meta data for examples so that the formatter can explain more / produce more accurate results

test-prof offers RSpecDissect that may be of some help.

@pirj thats sweet, i stumbled upon an article about the gem actually and optimizing tests, but it didn't mention anything about RSpecDissect. I'll take a look


Invalid format '# Coverage Report: Test coverage results'

Describe the bug
The job fails with the message:
Error: Unable to process file command 'output' successfully.
Error: Invalid format '# Coverage Report: Test coverage results'.
It used to work before but now it fails and not sure where the problem is.
To Reproduce
Steps to reproduce the behavior:

Go to https://github.com/AnswerConsulting/AnswerKing-Java/actions/runs/3446304463/jobs/5751041279
Re-run the job and see the error.
Scroll down to 'Publish test coverage results' step.

Expected behavior
I shouldn't fail with the output thing as it didn't complain about it before.
Screenshots

Desktop (please complete the following information):

OS: Ubuntu
Browser: Chrome
Version

Working on fixing it. got this reported by my team mates as well !

@oleksiiRybak  Fixed. Simply try rerunning and see if it works !

Fix working as per team members from my Org. I would prefer to close issue !

Hi Pavan,
thank you for your help and providing the fix, much appreciated. It works OK now.


Origin 'null' is therefore not allowed access.

I can download file from a website & it also runs via ng-audio. But when I run it with Web Audio it gives me
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
Server is not mine. So where is the difference & what is the solution?

Is this on a local machine ? Origin 'null' should be the local file system. Chrome has a setting/flag that will allow this (--allow-file-access-from-files). Else you will need some sort of dev server to host the file (can be localhost)

I am using nws as dev server. Everyone will not disable setting from chrome. I am building a clients side ionic application. just to give you an idea: http://quranmedia.herokuapp.com/#/ayatView

You will need to setup the correct CORS for the server serving the audio files (as with any XHR request).
See http://stackoverflow.com/questions/10143093/origin-is-not-allowed-by-access-control-allow-origin
or google CORS

Oh you don't own the server. The only way is for your server (that hosts your site) to fetch the audio files on the backend and serve them on the same domain. There might be legal and/or ethical reasons behind doing this, so it is best to contact the administrator of the other site before you do this approach.

Thank you for your help. I helped me a lot.


Before loading any of the API structs, look for version "1.3" and abort if found

The core team does not care about semver, and have decided to change all the API structs retroactively. This will break everything horribly. Luckily they left us a tiny window of sanity by adding a new "1.3` version. We will use this to tell if the host is Godot 4.0, and abort since we aren't supporting it yet.

FYI, your pleas seem to have been listened to:

https://github.com/GodotNativeTools/godot_headers/pull/75#issuecomment-637934269

https://github.com/godotengine/godot/pull/39183

https://github.com/godotengine/godot/pull/39064

However, you may also be interested in / impacted by these:

https://github.com/GodotNativeTools/godot_headers/issues/70

https://github.com/godotengine/godot/issues/35464


cleanup some duplicated code

Thanks IntelliJ for pointing these out.

Current coverage is 43.11%

Merging #784 into master will increase coverage by +0.14% as of 42e053f

@@            master    #784   diff @@
======================================
  Files          257     257
  Stmts        10756   10725    -31
  Branches      1507    1499     -8
  Methods          0       0
======================================
+ Hit           4622    4624     +2
+ Partial        413     411     -2
+ Missed        5721    5690    -31

Review entire Coverage Diff as of 42e053f

Powered by Codecov. Updated on successful CI builds.

@rohansingh @davidxia @gimaker

:+1:


slimit does not parse javascript "const" expression

Try to parse
«««
const theconst = 1;
»»»
Slimit fails with
SyntaxError: Unexpected token (CONST, u'const') at 1:1 between LexToken(LINE_TERMINATOR,u'\n',1,0) and LexToken(ID,u'theconst',1,7)
Is it bug or a feature?

Although the token was recognised by the lexer no grammar rules actually used it. I've made a patch that adds some, basically assuming that syntactically it works like var except the initialiser is mandatory and it can't be used for iteration.

Also const is an ES6 concept, which the parser really is only ES5 so a separate ES6 lexer/parser should be created and used instead.

It works in every browser back to IE11... https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const
I'm surprised this is not working, why not consider it as similar to a "var" statement?

Any update on const?

const preFormattedBlockNames = {
  'api-projects': 'API Projects',
  'basic-css': 'Basic CSS',
  'basic-html-and-html5': 'Basic HTML and HTML5',
  'css-flexbox': 'CSS Flexbox',
  'css-grid': 'CSS Grid',
  devops: 'DevOps',
  es6: 'ES6',
  'information-security-with-helmetjs': 'Information Security with HelmetJS',
  jquery: 'jQuery',
  'json-apis-and-ajax': 'JSON APIs and Ajax',
  'mongodb-and-mongoose': 'MongoDB and Mongoose',
  'the-dom': 'The DOM',
  'apis-and-microservices': 'APIs and Microservices',
  'apis-and-microservices-projects': 'APIs and Microservices Projects'
};

const noFormatting = ['and', 'for', 'of', 'the', 'up', 'with'];

exports.blockNameify = function blockNameify(phrase) {
  const preFormatted = preFormattedBlockNames[phrase] || '';
  if (preFormatted) {
    return preFormatted;
  }
  return phrase
    .split('-')
    .map(word => {
      if (noFormatting.indexOf(word) !== -1) {
        return word;
      }
      if (word === 'javascript') {
        return 'JavaScript';
      }
      return word.charAt(0).toUpperCase() + word.slice(1);
    })
    .join(' ');
};

Error:  Unexpected token (CONST, 'const') at 1:0 between None and LexToken(ID,'preFormattedBlockNames',1,6)


Check refmaps exist before adding them to mixin configs (#37)

Idea formatted automatically, that's why the diff is much larger than it actually is. I can try rolling that back if it's an issue
related: https://github.com/FabricMC/fabric-loom/pull/971

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


container_registry_url renamed but was not changed here

https://github.com/CDCgov/cfa_azure/blob/5cd48c57b19a18714d6550fdd6402afb62518ab5/cfa_azure/clients.py#L141
should probably be self.registry_url right?

you're right. I made the fix


0.17.1: documentation build fails

Describe the bug
context
Generating myst-nb sphinx docuemtation
expectation
It should be possible to generate documentation.
bug
+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v6.1.3

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 223, in __init__
    self.setup_extension(extension)
  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 398, in setup_extension
    self.registry.load_extension(self, extname)
  File "/usr/lib/python3.8/site-packages/sphinx/registry.py", line 456, in load_extension
    metadata = setup(app)
  File "/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.1/myst_nb/__init__.py", line 8, in setup
    from .sphinx_ext import sphinx_setup
  File "/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.1/myst_nb/sphinx_ext.py", line 23, in <module>
    from myst_nb.sphinx_ import (
  File "/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.1/myst_nb/sphinx_.py", line 16, in <module>
    from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)

Exception occurred:
  File "/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.1/myst_nb/sphinx_.py", line 16, in <module>
    from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
The full traceback has been saved in /tmp/sphinx-err-4e78y3dp.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!

$ jupyter-book build mybook
ERROR ...

problem
This is a problem for people doing ___ because ___.
 Can you confirm that you have a compatible version of myst-parser installed for myst-nb? :)

I've reported issue against latest 0.17.1 and I just checked there is no any new version so .. yes it still the issue 😋
No I have no installed myst-mb because build log is from packaging `mysr-mb.
I'm usimg below patch
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,6 +1,8 @@
 # Configuration file for the Sphinx documentation builder.
 # https://www.sphinx-doc.org/en/master/usage/configuration.html
 import os
+import sys
+sys.path.insert(0, os.path.abspath(".."))

 # -- Project information -----------------------------------------------------

to allow sphinx find myst-mb modules.
That kind of conf.py alteration ios mentioned in sphinx example conf.py https://www.sphinx-doc.org/en/master/usage/configuration.html#example-of-configuration-file

In other words that patch guarantees that documentation is generated against in source tree mys-mb which is 0.17.1.

Ah, I'm following — and the docs don't build locally for me either, although due to a different error. With a fresh solve, I ran into #486

Ah, I'm following — and the docs don't build locally for me either, although due to a different error. With a fresh solve, I ran into #486 and also noted that the coconut dependency is pulling in a poorly maintained cpyparsing library. I'll make another PR in future to propose a different kernel instead of coconut.

Just tested that PR on top of the release and documentation build still fails.
+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v6.1.3

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 223, in __init__
    self.setup_extension(extension)
  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 398, in setup_extension
    self.registry.load_extension(self, extname)
  File "/usr/lib/python3.8/site-packages/sphinx/registry.py", line 456, in load_extension
    metadata = setup(app)
  File "/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.1/myst_nb/__init__.py", line 8, in setup
    from .sphinx_ext import sphinx_setup
  File "/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.1/myst_nb/sphinx_ext.py", line 23, in <module>
    from myst_nb.sphinx_ import (
  File "/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.1/myst_nb/sphinx_.py", line 16, in <module>
    from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)

Exception occurred:
  File "/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.1/myst_nb/sphinx_.py", line 16, in <module>
    from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)
The full traceback has been saved in /tmp/sphinx-err-kdukc65s.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!

[tkloczko@pers-jacek SPECS]$ cat /tmp/sphinx-err-kdukc65s.log
# Platform:         linux; (Linux-6.1.10-200.fc37.x86_64-x86_64-with-glibc2.34)
# Sphinx version:   6.1.3
# Python version:   3.8.16 (CPython)
# Docutils version: 0.19
# Jinja2 version:   3.1.2
# Pygments version: 2.14.0

# Last messages:

# Loaded extensions:

# Traceback:
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 223, in __init__
    self.setup_extension(extension)
  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 398, in setup_extension
    self.registry.load_extension(self, extname)
  File "/usr/lib/python3.8/site-packages/sphinx/registry.py", line 456, in load_extension
    metadata = setup(app)
  File "/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.1/myst_nb/__init__.py", line 8, in setup
    from .sphinx_ext import sphinx_setup
  File "/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.1/myst_nb/sphinx_ext.py", line 23, in <module>
    from myst_nb.sphinx_ import (
  File "/home/tkloczko/rpmbuild/BUILD/MyST-NB-0.17.1/myst_nb/sphinx_.py", line 16, in <module>
    from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer, create_warning
ImportError: cannot import name 'create_warning' from 'myst_parser.mdit_to_docutils.sphinx_' (/usr/lib/python3.8/site-packages/myst_parser/mdit_to_docutils/sphinx_.py)

Just in case I'm usimg myst-parser 1.0.0.
BTW is it possible to add that conf.,py patch to you git tee? (feel free to commit it or let me know if you want me to create PR)

BTW is it possible to add that conf.,py patch to you git tee? (feel free to commit it or let me know if you want me to create PR)

What's wrong with an editable install?

BTW is it possible to add that conf.,py patch to you git tee? (feel free to commit it or let me know if you want me to create PR)

myst-nb only declares support for the 0.18.* series, so 1.0.0 is not supported: https://github.com/executablebooks/MyST-NB/blob/385c4a7afb3a377486c1aa7a86b4c8a0e93484f5/pyproject.toml#L42

BTW is it possible to add that conf.,py patch to you git tee? (feel free to commit it or let me know if you want me to create PR)

What's wrong with an editable install?

As I wrote with such patch it is possible to build documentation without remeber to do any operations before (it can be done just after clone repo).

myst-nb only declares support for the 0.18.* series, so 1.0.0 is not supported:
https://github.com/executablebooks/MyST-NB/blob/385c4a7afb3a377486c1aa7a86b4c8a0e93484f5/pyproject.toml#L42

OK. Do you have any plans to support 1.0.0? 🤔 (just asking ..)

Will close this ticket as 1.0.0 has been released.
Documentation build still fails but will put fresh details in new ticket.


Add a Gitter chat badge to README.md

thoughtbot/hound now has a Chat Room on Gitter
@thorncp has just created a chat room. You can visit it here: https://gitter.im/thoughtbot/hound.
This pull-request adds this badge to your README.md:

If my aim is a little off, please let me know.
Happy chatting.
PS: Click here if you would prefer not to receive automatic pull-requests from Gitter in future.

This is really cool. CI services should do that.

We've decided to go with Slack. Join us! http://slack.houndci.com


CAD-3783 DoneAddingBlock event tracer for block delay metrics

Fixes #3382.
The commits are well-separated; likely best reviewed individually.
Issue 3382 (aka CAD-3783) is resolved by this PR by the addition of the new DoneAddingBlock event, specifically the UTCTimes it contains.
This PR introduces a few lightweight types that help preserve the separation of concerns within the code itself, despite needing to calculate those times. In particular, the correct input-output behavior of the code that emits this new event does not otherwise require any of the times necessary to construct the event. We accordingly use the OnlyForTracer newtype to limit what the the new monadic constraint and new ChainDB logic that compute these times can influence (ie only Tracers). Similarly, the ChainSel code that emits the event doesn't otherwise need access to the constraints that are required for the principal intended use of the event; hence the EventConstrainedData newtype in the tracer event itself.

@coot If the OnlyForTracer type is worthwhile, I think we should move it to the upstream iohk-monitoring-framework repo. But for now, for convenience, I put it in ouroboros-network. If that's a blocker for you, please Request Changes and I'll mark this as a  Draft PR.

@karknu Because of the lightweight types I added in this PR, we can use time in tracers while simultaneously preventing it from "polluting" the code that emits those tracers.
As a result, the event data constructor itself can have essentially the exact fields you originally wanted. If I understand/recall correctly. Thus: I'm specifically hoping you like what you see in the definition of the TraceDoneAddingBlockEvent record data type on this PR.

@coot @dnadales Thanks for your comments. I replied to them and Resolved the threads that were clear. I left a couple threads unresolved in case you wanted to reply to my reply. If my reply was sufficient, please Resolve those threads. Thanks!

FYI, after some chats on Slack, I opened https://github.com/avieth/contra-tracer/issues/3 upstream.

@karknu Because of the lightweight types I added in this PR, we can use time in tracers while simultaneously preventing it from "polluting" the code that emits those tracers.
As a result, the event data constructor itself can have essentially the exact fields you originally wanted. If I understand/recall correctly. Thus: I'm specifically hoping you like what you see in the definition of the TraceDoneAddingBlockEvent record data type on this PR.

I'm really happy with the new TraceDoneAddingBlockEvent, and the way you solved it.

@karknu Because of the lightweight types I added in this PR, we can use time in tracers while simultaneously preventing it from "polluting" the code that emits those tracers.
As a result, the event data constructor itself can have essentially the exact fields you originally wanted. If I understand/recall correctly. Thus: I'm specifically hoping you like what you see in the definition of the TraceDoneAddingBlockEvent record data type on this PR.

I'm really happy with the new TraceDoneAddingBlockEvent, and the way you solved it.

@karknu did you want the field of the new event to be strict?

In a call just now, we came up with a plan with @karknu .

Karl will integrate the tip of this PR into his cardano-node branch.

We'll create and advertise a commit off of the cardano-node master branch that integrates this PR in the simplest possible way 👍

Then we can merge this PR!

Closing as stale.


Fix new certificates

Fix the parsing of new certificates from TruU and OneSpan (found in https://mds.fidoalliance.org)
Fixes issue https://github.com/webauthn-open-source/fido2-lib/issues/144

Thanks a lot for the debugging and PR!
Can you remove the package-lock from commit and bump the version in package.json?

Codecov Report
Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (50ee8da) 92.85% compared to head (328e906) 92.82%.
 Consider uploading reports for the commit e66a5d9 to get more accurate results

Files
Patch %
Lines

lib/certUtils.js
85.71%
1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #151      +/-   ##
==========================================
- Coverage   92.85%   92.82%   -0.03%
==========================================
  Files          16       16
  Lines        6019     6023       +4
==========================================
+ Hits         5589     5591       +2
- Misses        430      432       +2

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Can you add a test case for the certificate that only works for your case? This would maintain the code coverage and make sure that future changes don't destroy it!
Then we are good to merge, thanks a lot for your help!


Skip vote count takes everyone into account

Description
Currently, the skip vote takes into account the number of people connected to any voice channel in the guild, and not the people connected to the voice channel the bot is in.
Expected vs. Observed

-
-

Expected
The bot only takes into account the number of people connected to the same voice channel as itself.

Observed
The bot takes is counting anyone currently in a voice channel.

Repro Steps

Join a voice channel when other voice channels also have members.
Have the bot play a video.
Vote to skip the currenlty playing video.
Observe that the number of required votes isn't half of the members in the same voice channel.

Environment

Key
Value

Operating System
Ubuntu 21.10 impish

Kernel
x86_64 Linux 5.13.0-28-generic

CPU
Intel Core i5-6500 @ 4x 3,6GHz

RAM
15893MiB

Screens

Well, knowing where the bug is is easy skip.rs#L35, I'll need to investigate how to fix it, but it should revolve around checking which ones are connected to the same channel.


Precompiled doesn't work on IE9

This issue was originally filed by<EMAIL_ADDRESS>
What steps will reproduce the problem?

Load the *.dart.precompiled.js file on a web page using IE9 (i think it will happen with any program)

What is the expected output? What do you see instead?
I get an error on the line "superConstructor = existingIsolateProperties[superclass];" because existingIsolateProperties is null or undefined.
What version of the product are you using? On what operating system?
Dev 33192
Please provide any additional information below.
No problem if I use the non-precompiled version.

dart2js does not support IE9


Bucket or Object not found

Describe the bug
when do a download of an object is reported 404, not found.
To Reproduce

run the docker container as a per readme example
create in the shared foder, cloudstorage, my-bucket/my-filename
use a snippet program to download it and it won't be found even something like:

import os

from google.cloud import exceptions, storage

HOST = "localhost"

PORT = 9023

BUCKET = "my-bucket"

os.environ["STORAGE_EMULATOR_HOST"] = f"http://{HOST}:{PORT}"

client = storage.Client()

#try:

#    bucket = client.create_bucket(BUCKET)

#except exceptions.Conflict:

#    bucket = client.bucket(BUCKET)

bucket = client.bucket(BUCKET)

blob = bucket.blob("my-filename")

#blob.upload_from_string("test1")

print(blob.download_as_bytes())

Expected behavior
A clear and concise description of what you expected to happen.
If the file is present in the docker folder /storage/my-bucket/my-filename it should be expected to be found and downloaded.
System (please complete the following information):

OS version:
Python version:
gcp-storage-emulator version:

Additional context
it looks like the file must be uploaded from calling the api, cannot be manually added in the cloud storage folder.
Anyway this is just a basic use case, having a file to be downloaded, it shouldn't require to be uploaded first.

If you just manually place a file, the metadata won't exists. That's why it can't be found.

If you just manually place a file, the metadata won't exists. That's why it can't be found.

wouldn't be possible to use libevent or similar to monitor the /storage folder and based on a file creation or deletion or whatever, auto generate the metadata?

If you just manually place a file, the metadata won't exists. That's why it can't be found.

wouldn't be possible to use libevent or similar to monitor the /storage folder and based on a file creation or deletion or whatever, auto generate the metadata?

anyway it could be achieved with a side utility too as a pre-step, instead of copy the file do an upload.

If you just manually place a file, the metadata won't exists. That's why it can't be found.

wouldn't be possible to use libevent or similar to monitor the /storage folder and based on a file creation or deletion or whatever, auto generate the metadata?

anyway it could be achieved with a side utility too as a pre-step, instead of copy the file do an upload.

the only concerns is when using a volume that has some predefined files for example and then starting the emulator would be pointless as there won't be any metadata on the content of the volume, so a scanning of the volumne to creates buckkets from folders and objects from file could be useful.


[Bug]: SnapLayout detection when setting never changes

Describe the bug
I noticed that Windows 11's Snap Layout doesn't work with MicaWPF.
Steps to reproduce the bug

Do a clean install of Windows 11.
Create an app that uses MicaWindow.
Set the mouse cursor on the Maximize button.
Snap Layout won't be displayed

Expected behavior
Snap layout should be displayed.
I found out why it happens though 😁
By default in Windows 11, Snap Layout is enabled. By default, it looks like the registry key does NOT exist. Therefore, a fix could be updating IsSnapLayoutEnabled to return true when registryValueObject == null.
Screenshots
No response
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
.Net Version
.NET 7.x
Additional context
No response

Pushing version 5.3.1 I will await 3 days or your confirmation to close the issue thank you! :)

I gave it a try and it works! :)

Thank you for your reply ! :)


Potential OOM for concurrent execution of upload

Current impl create buffer for upload chunk, that is maximum 150MB.
If a user run program on quad core machine, then that may require 600MB.

It look like there is no way to catch OOM in Golang.
Possible workarounds:

Create pool for uploading buffer on startup
Create child process for recipe, and watch it from parent process (restart on fail)

Idea: Big little buffer:
If concurrency is 8:

Prepare two big buffers (150MB = Max chunk size) and few little buffers (3~5MB)
Use one big buffer to fetch data from io.Reader
If the content less than little buffer size, use little buffer for uploading
Otherwise, use big buffer + mutex/semaphore

Idea 2: Do not use buffer.

use io.ReadSeeker


ref(rootfs/Dockerfile): upgrade to alpine 3.3, clean up the dockerfile

closes #154

@aledbf testing this now

closes #120

@aledbf I think we can remove the curl installation from the Dockerfile, no?

@aledbf a manual test of git push seemed to work fine (except that the resulting slugrunner failed to run, which I believe was solved in #161). LGTM


using const instead of var

Since your examples use const, you can also load all your modules and Revenant instances with const

LOL?


We couldn't connect to 'https://huggingface.co' to load this model, couldn't find it in the cached files and it looks like CompVis/stable-diffusion-safety-checker is not the path to a directory containing a config.json file. Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'

您好，关于这个模型我应该去哪里下载呢？您这个步骤里面没有说明。希望您看到能给我指点下，谢谢。

Hi, thank you for your interest in our work.
Could you please provide the necessary steps to reproduce the error?

您好，感谢您对我们工作的兴趣。
您能否提供重现该错误所需的步骤？

conda env create -f environment.yaml
conda activate ldm
git clone https://github.com/CompVis/stable-diffusion.git
cd stable-diffusion
download https://drive.google.com/file/d/19tT036LBvqYonzI7PfU9qVi3jVGApKrg/view?usp=sharing

Where can I download the line drawing model?
python ./scripts/txt2img.py
--ddim_eta 0.0
--n_samples 10
--n_iter 1
--scale 7.5
--ddim_steps 50
--plms
--skip_grid
--ckpt ./_model_pool/sd-v1-4-full-ema.ckpt
--from-file '/root/wellmed/wellmed-pt/AttackVLM-main/stable-diffusion/coco_captions.txt'
--outdir '/root/wellmed/wellmed-pt/AttackVLM-main/stable-diffusion/images'
The above are my steps. Without the model, this error occurs.

Hi,
Thank you for the information.
We use the pretrained ckpt provided by Stable-Diffusion-v1, the weights can be downloaded here: sd-v1-4-full-ema.ckpt.
We will update the repo soon for clarification. Thanks again for pointing out this :)

Hi,
Thank you for the information.
We use the pretrained ckpt provided by Stable-Diffusion-v1, the weights can be downloaded here: sd-v1-4-full-ema.ckpt.
We will update the repo soon for clarification. Thanks again for pointing out this :)

Hello, sorry to bother you again, I downloaded this ckpt, but there is no model, no json weight error, if it is convenient for you, could you update the detailed deployment process? Or if the deployment is successful, I can write a plan of the deployment process for you and subsequent workers to read. Thank you again for taking time to answer my questions.

Hi,
Based on my implementation, I found there is no issue of this official ckpt.
Nevertheless, I have adjusted the ReadME file and you can use the updated one for another test.
I remark that we follow the official stable-diffusion pipeline for generation, therefore it should be a standard process. Please let me know if you still encounter those errors, and I will do a test from scratch.
Thanks a lot for your interest and support.

Okay, thank you again for your answer. The email I sent you at 10:48 today contains my confusion. If you have time, you can help me answer it. Thank you again.
か
@.***

------------------ 原始邮件 ------------------
发件人:                                                                                "yunqing-me/AttackVLM"                                                                                @.>;
发送时间: 2023年7月2日(星期天) 下午5:21
@.>;
<EMAIL_ADDRESS>主题: Re: [yunqing-me/AttackVLM] We couldn't connect to 'https://huggingface.co' to load this model, couldn't find it in the cached files and it looks like CompVis/stable-diffusion-safety-checker is not the path to a directory containing a config.json file. Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode' (Issue #1)
Hi,
Based on my implementation, I found there is no issue of this official ckpt.
Nevertheless, I have adjusted the ReadME file and you can use the updated one for another test.
I remark that we follow the official stable-diffusion pipeline for generation, therefore it should be a standard process. Please let me know if you still encounter those errors, and I will do a test from scratch.
Thanks a lot for your interest and support.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>


Display issue of week-planner-card on iOS 15.8.3 (iPad Mini 4)

First of all, great card, by far the best looking calendar card for Home Assistant.
Unfortunately, on my wall mounted iPad Mini 4, the layout is kind of wrong. I attached two screenshots - one from my iPad Mini 4 and the other one from a modern iPad Pro (and other iOS and web browsers display it correctly). As the calendar would be one the key features of the wall-mount iPad, it would be great to know how I can fix it.
iPad Mini 4 (wrong)

iPad Pro (right)

Home Assistant
Core 2024.10.2
Supervisor 2024.10.2
Operating System 13.2
Frontend 20241002.3
Week Planner Card v.1.7.1

Same issue on my Android Tablet which is used as wall panel.

It looks like the browser might be too old and not know the CSS I'm using. I think it's @container that's not working properly, so the default is used, which is 7 columns. If you can update the OS/Browser to a version that does support @container in CSS that should fix the problem. If not, you can probably fix it with card_mod. This should do it:
card_mod:
  style: |
    .container .day {
      width: 100%;
    }


Adding the ACI Action Link in the Actions List

Adding the newly released ACI Deploy Action to the list of Actions in the README

@ds-ms  Who closes this PR?

Done.


Special pages?

Hi Denny - I'm wondering if you've had a chance to think about/look at what some of the Special pages should do? I'm particularly interested in:

WhatLinksHere - show the Zobjects that make use of this object in any way
Lists by type - list all functions with labels in a particular language, for example
Other search functionality maybe?
I've taken a peak at the Mediawiki extension documentation on this, but it will take a bit more time to figure out how best to do this I think, so if you have any advice I'd appreciate it!

Yes re WhatLinksHere.
Lists by type I would make not functions with labels in a particular language, but rather ZObjects according to their Z1K1. That already will get us quite far.
Other search functionality would be ZFunctions by return type and ZFunctions by types of input.
If we had that that would already be a huge help!

Ok, pull request #11 fixes WhatLinksHere!

Thanks for merging; so I'm working on the other Special pages by type. I have it basically working, but I'd like to put a label by each Z object id on the pages (if possible for WhatLinksHere too). The "Z36(zid)" method seems to produce very text for a label, but it's super-slow to run it as is done in AbstractTextContent.php (it would be nice to speed that up too!) So alternatives I've been considering for fixing this are:
(1) add a database table with zid, language, and the Z36(zid) value as text, for quick lookup (I've already added a table to handle the type info, so this isn't too crazy an idea - but maybe we don't want to cache these things so permanently?)
(2) set up eneyj to run as a server (i.e. respond continuously to any request), I think this would significantly cut the time for the Z36 run vs command-line script, as the vast majority of the time used seems to be start-up time; also this would allow other things like the API and tests to be run more quickly similarly, it might also fix security issues with running command-line scripts!
(3) Some sort of hybrid as (2) may still be a little slow, where there's a database cache but it expires?
Any strong feelings on any of this?

Actually I got a little distracted there with the alternatives - Z36 doesn't quite do what I'm looking for anyway. I'm going to try adding labels just using the getKeyLabel approach for now, and see how bad that is. But feedback on running eneyj as a server (and how that might be done) is still of interest to me!

to follow up - getLabel is quite speedy and works well, going with that for now

Yes, we'll probably need to run eneyj as a server anyway at some point. Also this would improve performance not just for the start up but also for the caching, which is quite considerable.
I haven't looked into that yet.
Thank you so much for making WhatLinksHere work! I am very much looking forward to the other special pages!

Ok, see pull request #14 !

I am trying out your pull request, but the DB table doesn't seem to be created, so the special pages fail. I started with a fresh docker, i.e. running
docker build --no-cache -t repo/wikilambda .

Uh-oh, I should have tried restarting the docker instance from scratch!
I'll have to dig into what I missed. To add the table you do need to run the db update maintenance script:
php maintenance/update.php

Hmm, maybe that just needs to be added to the docker startup. I'll try that.

Ok - see pull request #15 - I don't know if there's a better way to do that, but this works!

I am trying it again, but the Functions by Parameter and FUnctions by Return type don't seem to work?

The objects by type works beautifully and so fast!

I am trying it again, but the Functions by Parameter and FUnctions by Return type don't seem to work?

Are you going to http://localhost:8081/index.php/Special:FunctionsByReturnType and
http://localhost:8081/index.php/Special:FunctionsByArguments
(or whatever port you're using)
They should also be linked from the Special:SpecialPages page...

Yes, I see the special pages, but there is no list.
There's also nothing unusual in the logs.

Here's what I see right now for that page:

I'll try rebuilding from scratch with Docker again though and see if there's something missing.

By the way, adding ?uselang=de works pretty nicely (though these functions need name translations!):

Ok, I did the docker rebuild and I'm seeing the same issue - digging in!
By the way, my "eneyj server" draft makes the docker build much much faster!! Still needs a bit of work on robustifying it though.

@arthurpsmith Are you using buildkit ? https://docs.docker.com/develop/develop-images/build_enhancements/

@vrandezo see pull request #17 - that should fix the issue when building from scratch with docker. An alternate workaround is to log into the docker container and run the refreshLinks.php maintenance script, which will reprocess everything and does work this time because the types have already been imported! But with #17 everything should work from scratch.
@thadguidry as far as I know the Dockerfile here will work with or without buildkit - I'm not too familiar with that though, what are the advantages?

@arthurpsmith try it out, its very simple to use, just add the environment variable as described in docs.  The advantages are:

By integrating BuildKit, users should see an improvement on performance, storage management, feature functionality, and security.

It makes repeated builds much faster, since it introduces "smarts" around caching (cache this layer, skip it, or build from scratch again) to know about changes.  Akin, to other build caching in MAVEN, Buildr, etc.

@thadguidry thanks, I'll have to try it. However, the slowness in import is almost entirely due to the text rendering running 2 eneyj scripts via shell calls, so that means it's starting up node 1000+ times; otherwise the standard docker build caching is plenty fast!

@arthurpsmith Sure.  This info might be useful for you later as well, if ever needed. https://www.docker.com/blog/advanced-dockerfiles-faster-builds-and-smaller-images-using-buildkit-and-multistage-builds/

@thadguidry Ah I see - the main advantage I think is where you need parts of an image, but want to throw away the rest of it to keep the final image small. I don't think that's something that is an issue here, but it might be if we diverge more from the Mediawiki base image. For now I think everything we're adding in the builds (extensions, npm modules, mediawiki updates etc.) is stuff we need to keep around.

@arthurpsmith Exactly my thinking and why I mentioned it.... for your future. :-)

Thank you so much @arthurpsmith !
The special pages are really great, they make navigating the wiki so much easier!
I have tested them and think we can close this issue now. Thank you!

Great! Closing!


[docs] Allow to follow system/OS preferences for dark mode

The dark mode toggle on the docs website should have an option to follow system preferences which is selected by default. Dark/light modes are a first class feature on major desktop OS's now and many users do not permanently use one or the other, toggling between light or dark based on environment.

@benknight By default, the documentation follows the system/OS preference. However, once the value is changed, developers can no longer go back to this behavior without clearing their cookies.
YouTube likely do it better

than Facebook

How about we add a menu with 3 options and a 3rd icon?

Or preferably a settings panel.

Or preferably a settings panel.

A few examples:

https://primefaces.org/primereact/showcase/#/slider

https://vuetifyjs.com/en/getting-started/installation/

OT: This was great!

OT: @benknight this was great!

The least level of effort here would be providing no option at all and just following the prefers-color-scheme media query which is widely supported.

@benknight I don't think that it would be
good enough, we need to demonstrate dark mode is supported without forcing developers to change their whole OS settings.

@johnleider of Vuetify, any suggestions?

Hey guys it's great that you added this but it's been 3 months now and still not pushed to the main docs site (only next.material-ui.com) so still a bit of an inconvenience.

@benknight Time to migrate to v5 then ;).


Add Custom endpoint

Hi, can you add an input field in the frontend to change the custom endpoint just like https://bettergpt.chat ??

Sounds like a great feature! But sadly I do have a bit on my plate right now and would take a while for me to get to adding this, if you can add this feature yourself, PRs are welcome!


[BUG] Issues in the UI above 200 destinations #195

Description
Resolves the issue of loading more than 200 destinations in the Destinations list and Actions page with Destinations combo-box
Issues Resolved
#195
Check List

[ ] All tests pass
[ ] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@jovancacvetkovic Could you rebase the recent changes made to the 1.3 branch? That should allow the unit and cypress tests to run for this PR.


Microsoft.Extensions.Configuration.AzureAppConfiguration for Core 3.1?

Any similar package with samefunctionality as Microsoft.Extensions.Configuration.AzureAppConfiguration available for Core 3.1 ?

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

ID: ec838379-f1fa-0cab-ff31-3bb1b30a7ccc
Version Independent ID: e2571455-af0a-19f6-799c-ea09ae602680
Content: Quickstart for Azure App Configuration with Azure Functions
Content Source: articles/azure-app-configuration/quickstart-azure-functions-csharp.md
Service: azure-app-configuration
GitHub Login: @lisaguthrie
Microsoft Alias: lcozzens

@mchudinov  Thank you for reaching out. We will investigate and update the thread further.

@mchudinov Thanks for the question! Indeed, the same package Microsoft.Extensions.Configuration.AzureAppConfiguration can be used with a .Net Core 3.1 application as well. What you see in the quickstart with the package name (3.0.0-preview-xxx) is the version number of the prerelease package.
Please feel free to go ahead and try the .Net Core quickstart given in the documentation targeting .Net Core 3.1!

@mchudinov  Looks like the main question is now answered. If you need further assistance, please let us know. I'll close out the thread for now, assuming the last response was the right amount of detail. Thanks! Jason
#please-close

pretty sure you guy missed the fact that this example doesn't work in 3.1.  No one cares if the assembly is compiled to work.  We need to know how to use it.

Hi @mwwhited - I ran through the Functions quickstart with a v2 Function targeting .NET Core 2.1, and a v3 Function targeting .NET Core 3.1. Both worked exactly as written. Are you having a problem or seeing an error with .NET Core 3.1?

That just mean's you guys didn't look at the issue.  We dont want or need this static constructor.  We need it working with the IOC container and startup.cs on the Azure Functions.


Demo files not working as expected.

Hi @scholzj,
I really need your help to re-run this demo. I am planning to run this demo with strimzi-operator 0.34.0.
Till deployments of 01-kafka.yaml, 02-kafka-connect.yaml, 03-telegram-source.yaml, 04-telegram-sink.yaml with slight updates in apiVersion worked fine.
I have rebuilt connect docker image with the below dockerfile and the deployments working fine.
FROM quay.io/strimzi/kafka:0.34.0-kafka-3.4.0
USER root:root
RUN mkdir -P /opt/kafka/plugins/camel
COPY ./camel-telegram-kafka-connector-0.11.5-package.tar.gz /opt/kafka/plugins/camel/
RUN tar -zxvf /opt/kafka/plugins/camel/camel-telegram-kafka-connector-0.11.5-package.tar.gz --directory /opt/kafka/plugins/camel/
RUN rm /opt/kafka/plugins/camel/camel-telegram-kafka-connector-0.11.5-package.tar.gz
USER 1001

I am facing an issue with these deployments, where it is failing, and deployments went into crashLoopBackOff state.
05-telegram-transformer.yaml   This file deployment is failing with the below error -
ERROR KafkaStreams: 443 - stream-client [ telegram-transformer-*] all stream threads have died. the instance will be in
error state and should be closed.

Exception in thread "telegram-transformer-*" org.apache.kafka.streams.errors.StreamsException: Exception caught in
process. taskID=0_0, processor=KSTREAM_SOURCE-0000000000, topic=telegram-inbox, partition=0, offset=0,
stacktrace=java.lang.NullPointerException

    at cz.scholz.demo.telegram.transformer.TelegramTransformer.lambda$main$0(TelegramTransformer.java:43)

06-sentiment-analysis.yaml,  This deployment is failing with error -
java: symbol lookup error: /tmp/.djl.ai/pytorch/.pytorch/cache/1.6.0-2020828cpu-linux-x86_64/0.7.0-SNAPSHOT- 20200903cpulibdjl_torch.so:undefinedsymbol:_ZN5torch3jit4loadERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3c108optionalINS9_6DeviceEEERSt13unordered_mapIS6_S6_St4hashIS6_ESt8equal_toIS6_ESaISt4pairIS7_S6_EEE

07-object-detection.yaml, This deployment is failing with error -
ERROR KafkaStreams: 443 - stream-client [ object-detection-*] all stream threads have died. the instance will be in
error state and should be closed.

Could you please check and help with this? Thanks for your time!!

I used this demo with Strimzi 0.20 (which was roughly 3 years ago). Feel free to use it as inspiration, but I cannot guarantee if or how will it work 3 years later. Sorry.


Dotp line graph points should be clickable for changing the active replicate.

Fix for the issue https://skyline.ms/issues/home/issues/details.view?issueId=885.

The fix for double painting was a separate PR and it was not merged into this PR yet at the time when you checked it out. The problem should go away after current master is merged into this branch.

Can you do the merge? It says it requires manual attention.

It is merged now.


watchlog: init at 1.152.0

Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[x] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 177543 run on x86_64-linux 1

1 package built:

watchlog

Sllightly related, seems like there is some perf issues around vendoring dependencies.
Been trying to build for a while.

Probably unrelated to this program specifically. But the crates index can be very slow to pull.
Maybe we should consider sharing the index. For example all buildRustPackage derivations could use the same index fetch. It would just need to be updated when a package wants to use a version that isn't yet in the shared index. It is one more hash to update but it should be manageable. Or maybe we can use that new dynamic derivation support to have it update mostly on its own.

Took about 1.5 hrs to build succesfully, most was during the cargo vendoring process.
Not a rust dev so not sure what could help.

Maybe network issues on my end, anyways good to know it went smothly on hydra. :3


Bug: ComboBox width is not equal to popup width.

This is test code:
public class ComboBoxTest extends Application {

    @Override
    public void start(Stage primaryStage) {
        //Application.setUserAgentStylesheet(new Dracula().getUserAgentStylesheet()); //Line X
        var data = List.of(
                "foo",
                "foo loooooooooooooooooooooooooooong",
                "foo very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong"
        );
        var comboBox1 = new ComboBox<>(FXCollections.observableArrayList(data));
        VBox root = new VBox(comboBox1);
        var scene = new Scene(root, 800, 200);
        primaryStage.setScene(scene);
        primaryStage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}

If you run this code as it is (without atlantafx) you will get this result:

As you see when pure JavaFX is used then ComboBox width is equal to popup width. Now uncomment Line X to add atlantafx. You will get this result:
. As you see this time ComboBox is less than popup width. So, if you click the longest item then ComboBox width will change making it "dancing" on the screen.
Could anyone say if there is a workaround for this problem (of course without setting the width of ComboBox manually)?

I don't see why they should be the same width. Add more letters and the popup will exceed the combobox width in Modena as well. Anyway, the calculation of the popup width is up to skin, not CSS.


docs: add port to the start server command

I might be wrong, but without this parameter - the service is hosted on http://localhost:undefined

It doesn't for me (starts at localhost:3002 when running npm start), and it seems to ignore that port when passing it in.
Merging this for the typo anyway ;)


Handling a JS function that returns a Promise

Hello, thanks again for TeaVM.
From past few hours, I'm trying to figure out a situation where my Java program immediately expects a value (from the JS).
I learnt that TeaVM dosent support sleep() function. I did what I can after looking into the docs, such as:
@Async
public static native String stdInput();

private static void stdInput(AsyncCallback<String> callback) {
  stdInputAsync(callback::complete);
}
...
@SuppressWarnings("unused")
@JSFunctor
interface ICallback extends JSObject {
  void complete(String result);
}

My JS side code:
function stdInput(callback: (result: string) => void): void {
  callback("meow");
}

But it results in this error:

If I simply try to return a promise in stdInput(), I get an empty String at the Java side.
Please help.

I learnt that TeaVM dosent support sleep() function

What function do you mean? There aren't functions in Java, there are methods only

But it results in this error:

I don't have enough information about your code base and can't judge, but perhaps you are trying to run async code from within JavaScript event handler, which is prohibited. One possible workaround is start a new Thread from within JS event handler.

What function do you mean? There aren't functions in Java, there are methods only

Yes, I mean the Thread.sleep().

I don't have enough information about your code base and can't judge, but perhaps you are trying to run async code from within JavaScript event handler, which is prohibited. One possible workaround is start a new Thread from within JS event handler.

Hmm. All I'm trying to do is someway be able to give Java, a value, from JavaScript, immediately.
Could you please guide me on how to approach this issue?
Thanks

Yes, I mean the Thread.sleep()

It's supported in TeaVM: https://teavm.org/jcl-report/recent/classes/java.lang.Thread.html

Hmm. All I'm trying to do is someway be able to give Java, a value, from JavaScript, immediately. Could you please guide me on how to approach this issue?

There's no way to do something "immediately" with a promise. Promise only resolves eventually, and you can't influence that.
Anyway, I'll try to clarify. Your @Async code LGTM, at least parts that you provided. And I suppose I understand you intention: you want to create a terminal emulator. But from stack trace you provided I can't see everything. I can only assume that somewhere below there's call from native browser event handler, right? In this case you should wrap this event handler with a new Thread. For example, if there was code like:
button.onClick(e -> {
   doSomething();
});

you need following:
button.onClick(e -> {
   var thread = new Thread(() -> doSomething());
   thread.start();
});


APM Integration for PHP

Add Integration with APM for PHP
Examples:
https://github.com/patrickallaert/php-apm
https://github.com/patrickallaert/php-apm-web
https://tideways.com/profiler/xhprof-for-php7

Closing as outdated. Feel free to reopen if still relevant.


Where does self in layout.worker.ts come from?

[x] I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link
https://github.com/antvis/G6/blob/master/src/layout/worker/layout.worker.ts
Steps to reproduce
I am wondering where is the definition of the self object;
in line 80 of layout.worker.ts
const ctx: Worker = self as any;

Environment
Info

g6
4.0.1

System
-

Browser
-

Refer to https://stackoverflow.com/questions/50210416/webpack-worker-loader-fails-to-compile-typescript-worker


Change default animation duration

Would it be possible to add a way to change the default duration? It seems all the animate-* classes are hard coded with 1s duration and require an additional class to change.
It could be done with a css variable, and animate-duration-* would overwrite that variable

FYI, with v1.1.0 this plugin uses custom properties for almost all utilities. That enables you to do something like:

Both animations will have a duration of 200ms.


Native C++ cross-compilation for Android platform

Due to various issues during C++ cross-compilation towards Android platform, these commits aim to remove some problems. The intervention comprises a refactoring of the general makefile by adding a specific section for Android target. Moreover, some hard-coded directory addresses were improved using settable flags (i.e., plugin_prefix) to maintain backward compatibility and also for future platform extensions.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

I signed the CLA

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure.

Thank you for your pull request. Before we can look at your contribution, we need to ensure all contributors are covered by a Contributor License Agreement.
After the following items are addressed, please respond with a new comment here, and the automated system will re-verify.

User @Fixfire isn't covered by a CLA. They will need to complete the form at https://identity.linuxfoundation.org/projects/cncf

Regards,
CLA GitHub bot

Thanks for the PR! Please resolve conflicts with the code base.


pre-compile regexp2 with regexp2cg

I noticed that https://github.com/dlclark/regexp2cg was available which can pre-compile the regular expressions used in this library. Based on the benchmarks (Macbook Pro M2) it seems to give around 2x improvement.
The tooling regexp2cg has some quirks in case the library gets more encoding in the future, but maybe this causes more interest and the project to be be picked up more.
I reorganized the tests so I could re-use the data for the benchmarks.
goos: darwin
goarch: arm64
pkg: github.com/tiktoken-go/tokenizer
                                                                            │ bench_orig.txt │          bench_regexpc.txt          │
                                                                            │     sec/op     │   sec/op     vs base                │
Tokenizer/o200k_base:_hello_world-12                                            1343.5n ± 2%   626.8n ± 5%  -53.35% (p=0.000 n=10)
Tokenizer/o200k_base:_hello__world-12                                            2.438µ ± 1%   1.106µ ± 3%  -54.63% (p=0.000 n=10)
Tokenizer/o200k_base:_hello___world-12                                           2.478µ ± 1%   1.111µ ± 3%  -55.19% (p=0.000 n=10)
Tokenizer/o200k_base:_supercalifragilistic-12                                    1.898µ ± 0%   1.350µ ± 2%  -28.87% (p=0.000 n=10)
Tokenizer/o200k_base:_We_know_what_we_are,_but_know_not_what_we_may_be.-12       8.220µ ± 1%   4.419µ ± 4%  -46.25% (p=0.000 n=10)
Tokenizer/cl100k_base:_hello_world-12                                           1065.5n ± 2%   601.5n ± 5%  -43.54% (p=0.000 n=10)
Tokenizer/cl100k_base:_hello__world-12                                          1720.5n ± 0%   901.2n ± 2%  -47.62% (p=0.000 n=10)
Tokenizer/cl100k_base:_hello___world-12                                         1762.0n ± 1%   934.8n ± 2%  -46.95% (p=0.000 n=10)
Tokenizer/cl100k_base:_supercalifragilistic-12                                   1.766µ ± 1%   1.368µ ± 2%  -22.51% (p=0.000 n=10)
Tokenizer/cl100k_base:_We_know_what_we_are,_but_know_not_what_we_may_be.-12      5.819µ ± 1%   3.934µ ± 3%  -32.39% (p=0.000 n=10)
Tokenizer/r50k_base:_hello_world-12                                              955.0n ± 1%   558.1n ± 3%  -41.55% (p=0.000 n=10)
Tokenizer/r50k_base:_hello__world-12                                            1485.5n ± 1%   838.1n ± 4%  -43.58% (p=0.000 n=10)
Tokenizer/r50k_base:_hello___world-12                                           1602.5n ± 0%   954.5n ± 4%  -40.44% (p=0.000 n=10)
Tokenizer/r50k_base:_supercalifragilistic-12                                     1.756µ ± 0%   1.319µ ± 4%  -24.89% (p=0.000 n=10)
Tokenizer/r50k_base:_We_know_what_we_are,_but_know_not_what_we_may_be.-12        5.294µ ± 1%   3.385µ ± 6%  -36.07% (p=0.000 n=10)
Tokenizer/p50k_base:_hello_world-12                                              956.8n ± 0%   527.1n ± 1%  -44.92% (p=0.000 n=10)
Tokenizer/p50k_base:_hello__world-12                                            1489.0n ± 0%   797.4n ± 0%  -46.45% (p=0.000 n=10)
Tokenizer/p50k_base:_hello___world-12                                           1502.5n ± 0%   802.4n ± 1%  -46.60% (p=0.000 n=10)
Tokenizer/p50k_base:_supercalifragilistic-12                                     1.754µ ± 1%   1.304µ ± 0%  -25.66% (p=0.000 n=10)
Tokenizer/p50k_base:_We_know_what_we_are,_but_know_not_what_we_may_be.-12        5.290µ ± 1%   3.373µ ± 1%  -36.23% (p=0.000 n=10)
Tokenizer/p50k_edit:_hello_world-12                                             1015.5n ± 3%   539.1n ± 5%  -46.91% (p=0.000 n=10)
Tokenizer/p50k_edit:_hello__world-12                                            1480.5n ± 1%   797.4n ± 1%  -46.14% (p=0.000 n=10)
Tokenizer/p50k_edit:_hello___world-12                                           1551.0n ± 5%   810.0n ± 1%  -47.78% (p=0.000 n=10)
Tokenizer/p50k_edit:_supercalifragilistic-12                                     1.750µ ± 1%   1.309µ ± 1%  -25.20% (p=0.000 n=10)
Tokenizer/p50k_edit:_We_know_what_we_are,_but_know_not_what_we_may_be.-12        5.393µ ± 2%   3.373µ ± 1%  -37.45% (p=0.000 n=10)
geomean                                                                          2.012µ        1.175µ       -41.57%

I was looking for something like this a while ago. Will test and give you feedback. Thanks!

Hey,
I can't get the regeneration to work, can you tell me what command did you execute to regenerate the code?
Ideally would like to make a comment in some file //go:generate regexp2gc ...
$ regexp2cg -path codec -package codec  -o codec/regexp.gen.go
2024/12/05 09:21:02 Create regexp for path ./tokenizer/codec, include tests=false
2024/12/05 09:21:02 file ./tokenizer/codec/r50k_base.go imports regexp2
2024/12/05 09:21:02 unknown ast node type for options: *ast.SelectorExpr &{X:regexp2 Sel:None}
2024/12/05 09:21:02 file./tokenizer/codec/cl100k_base.go imports regexp2
2024/12/05 09:21:02 unknown ast node type for options: *ast.SelectorExpr &{X:regexp2 Sel:None}
2024/12/05 09:21:02 file ./tokenizer/codec/codec.go imports regexp2
2024/12/05 09:21:02 file ./tokenizer/codec/regexp.gen.go imports regexp2
2024/12/05 09:21:02 file ./tokenizer/codec/o200k_base.go imports regexp2
2024/12/05 09:21:02 unknown ast node type for options: *ast.SelectorExpr &{X:regexp2 Sel:None}
2024/12/05 09:21:02 file ./tokenizer/codec/p50k_base.go imports regexp2
2024/12/05 09:21:02 unknown ast node type for options: *ast.SelectorExpr &{X:regexp2 Sel:None}
2024/12/05 09:21:02 file ./tokenizer/codec/p50k_edit.go imports regexp2
2024/12/05 09:21:02 unknown ast node type for options: *ast.SelectorExpr &{X:regexp2 Sel:None}

Please check my PR on the tools repo and you have to use my modifications on this repo to get it to work.
It doesn't work with MustCompile being inside a struct declaration.

I checked out this pr so the regexps are on a separate variable.
what's your PR on the tools repo?

https://github.com/dlclark/regexp2cg/pull/2
I just ran it inside codec after doing a go build from my tools PR, without any parameters.

Ahh, got it! I'd like your PR on regexp2cg to be merged first before approving this PR.
Before switching the Regexp Engine I'd like to make sure this library will be maintained.
That said, I'll try to nudge your PR to dlclrak/regexp2.
Thanks for your patience.

Understandable! No rush, just nice to see performance improvements like this are possible.


System.Security.Cryptography.* Not Supported on Browser

System.Security.Cryptography.* Not Supported on Browser
Because we are not able to ship OpenSSL and we also cannot use the browser's SubtleCrypto, we will not have support for any of the System.Security.Cryptography api's.
Version introduced
.NET 5.0
Old behavior
Worked as expected
New behavior
We will throw a PlatformNotSupportedException for all impacted types.
Reason for change
We are unable to ship OpenSSL as a dependency in the Browser configuration.  We attempted to work around this by trying to integrate w/ the browser's SubtleCrypto API.  Unfortunately, we found it would require significant API changes and thus, deemed it not possible for 5.0.
Recommended action
There are no good workarounds to suggest at this time.
Category
Cryptography
Affected APIs
System.Security.Cryptography Namespace

Issue metadata

Issue type: breaking-change

cc @gewarren

Sorry, I didn't know at what level to describe this.  I basically mean Blazor or anything else targeting WebAssembly (Browser).

@steveisok Does this breaking change ONLY affect ASP.NET Core apps?

@steveisok I think you need to call out somewhere that this is applicable on Mono Runtime. Perhaps where you say "we" you can specify that on Mono runtime....

@lewing Would it be better to say Blazor WebAssembly?  I definitely need guidance on the wording.

Blazor WebAssembly is the term we used for this configuration most often

Related to #20283.

I actually think this issue is a subset of https://github.com/dotnet/docs/issues/20283, the breaking change for the CA1416 (platform compatibility analyzer). Can I close it in favor of that?

@gewarren I do agree the issue is a subset and we can probably close this one.

@steveisok Actually I just reread it and now I think it is a separate breaking change. I thought this was just about adding the UnsupportedOSPlatformAttribute to these APIs, but now I see that the PNSE exceptions are new too. So I think this is separate. Even if you have code analysis or the platform compatibility analyzer suppressed, there is still a breaking change in that now you get a PNSE. Is that correct?

Correct.  I was assuming that would be spelled out in your issue, but I guess that doesn't make any sense.


Add next & previous buttons

Toggled with showPrevNext prop
Class names controlled with prevClassName and nextClassName props
Next doesn't display on last page, Previous doesn't display on first page

Nice! Thanks. There's a new version (0.6.4) with the change out.
Do you want that I add you as a collaborator to the project? We probably should still go through PRs or at least discuss through issues if you have bigger changes in mind. Small changes can go directly to master.

That was quick. Thanks!

Up to you — I'm fine with submitting PRs.

Up to you — I'm fine with submitting PRs.

Added.
The site is a little cruddy atm etc. but keep on doing what you think is the best and fits your needs. I'll try to provide feedback and help as best I can. :+1:


Update README.md, publishable key

Add an example to show how a stripe publishable key may be supplied in nuxt.config.js modules config. See #2

Hello and thanks a lot for your contribution! I will close the issue now.


Set jdk8 arm publishName

Set jdk8 arm publishName
Remove over overridePublishName from release pipeline job

Fix #700
Signed-off-by: Sophia Guo<EMAIL_ADDRESS>

@AdamBrousseau Does or will openj9 use release_pipeline_job_template.groovy to generate pipeline jobs? Suppose right now pipeline_job_template.groovy is used?

Semeru does not use the release job template yet. No plans to as of now.


Add --diff-git-checkouts to diff public API conveniently across versions

To e.g. diff public API between v0.2.0 and v0.3.0 of this repo, one would simply do
cargo public-items --diff-between-git-commits v0.2.0 v0.3.0

which would

checkout v0.2.0,
list public items and save the result
checkout v0.3.0
run the tool and save the the result
Print the diff between 2 and 4

Available in v0.5.2


New solution: Top K Frequent Words

Pl review and merge!

Thanks. Your explanation is very well written.


Metric name has already been registered

The prometheus out node works fine after I click deploy the first time with a new metric name, and the metric shows up on the /metrics page.
But if I click on deploy a second time it will give me two errors in the debug panel:

"Error: A metric with the name metric_name has already been registered."
"Missing metric configuration"

And the nodered /metrics page becomes blank.

Hi @joeldz , thank you very much for your feedback. I will have a look at it today.

@joeldz Bug fixed. Please update your node from the palette manager or by updating the npm. Thank you again for your feedback.


[13.0.x] ISPN-13777 NullPointerException in JGroupsTransport when metrics are …

…not available
https://issues.redhat.com/browse/ISPN-13777

Merged, thanks


Include missing core object in glossary

Description

This is the first part of resolving the issue regarding core objects in the Kubernetes glossary.
In this PR, I have included necessary API kinds that are built into Kubernetes as core objects, such as Node, PodTemplate, and NetworkPolicy.

Issue
Closes #45972

/assign

@sftim I've added the changes as you suggested!

I'm going to edit the issue description to remove

Closes https://github.com/kubernetes/website/issues/45972

as this PR is not a complete fix.

/lgtm

@dipesh-rawat can you please approve the PR.


fix: reduce memory footprint when loading TLDs

This significantly slows down TLD lookup. Opening a file and scanning it for every email validation is very inefficient. Is the memory footprint that much of a concern?
Would you be open to changing it back to something like this, which is 10 times faster?
_iana_tld_set = None

def _iana_tld():
    global _iana_tld_set
    if _iana_tld_set:
        return _iana_tld_set

    with Path(__file__).parent.joinpath("_tld.txt").open() as tld_f:
        _ = next(tld_f)
        _iana_tld_set = {line.strip() for line in tld_f}
    return _iana_tld_set


Update README.md

Fixing a couple of 404s since directory structure has evolved

The docs are now available at docs.datacommons.org/custom_dc so closing this one.


Registration

@JuliaRegistrator register

Initial version

Registration pull request created: JuliaRegistries/General/44986
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.0 -m "<description of version>" 0f1d45d669f7958cacd16714bfffc419f6918676
git push origin v0.1.0

@JuliaRegistrator register

Registration pull request created: JuliaRegistries/General/48068
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.1 -m "<description of version>" abefc4c278c7f056284474b7768c3d9b52af2131
git push origin v0.1.1

Registration pull request created: JuliaRegistries/General/55795
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.2 -m "<description of version>" 05d934e12ca7c1d8797d8db38e7d140f279cbf5a
git push origin v0.1.2

@JuliaRegistrator register

Drop Julia 1.5 support
Add support for Flux 0.13

Registration pull request created: JuliaRegistries/General/66477
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.3 -m "<description of version>" b6ed768ca459f13c2dd0efb54a95898698a78594
git push origin v0.1.3

Registration pull request updated: JuliaRegistries/General/66477
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.3 -m "<description of version>" a32cc0bd3cafa1082479b83db92a9fcfda2fc5e5
git push origin v0.1.3

@JuliaRegistrator register
Release notes:
Support for new OutlierDetectionInterface

Registration pull request created: JuliaRegistries/General/97777
Tagging
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.4 -m "<description of version>" ed9de7776527f84f44c5864eb9adc1abd221cd1e
git push origin v0.1.4


ISSUE: fresh install not working due to package file not being mergable

Describe the bug
I have just set up keymaster on 2023.3.5 from HACS.
Added one of my Yale locks, and able to set/delete codes from the developer tools but the generated config appears malformed
The PIN status stays Disconnected, and Desired PIN State as Off. If I enable a code via the zwavejs console it immediately puts it back to available instead of enabled, and it doesn't read or set the pin from the lovelace interface, while the Enabled box is set to on.
Environment (please complete the following information):

OS: docker container on k8s
Type of system that HA is running on: k8s on baremetal with remote zwavejs
Home Assistant version: 2023.3.5
Hassio/Docker/Core? Docker
Component version: v0.0.85
Z-Wave integration name:  zwave_js
Lock make and model: Yale YRD226

Logs
The logs just repeat this:
2023-03-21 23:04:46.051 ERROR (MainThread) [homeassistant.config] Package frontdoor_keymaster_common setup failed. Integration script cannot be merged. Dict expected in main config. (See /config/packages/keymaster/frontdoor/frontdoor_keymaster_common.yaml:9).
Screenshots
I already had the packages folder importing

Config is invalid

Please verify the file is created and not blank.

The file exists and has the contents I think I'm supposed to have (same for the numbered ones):

My hunch is that maybe packages don't handle inclusions properly for nested imports?
I already import a file for binary_sensors etc:

But with those imports I have to format them to be compliant with the json parsing (note the indentation and '-'):

At a glance it looks fine here's mine:
homeassistant:
  customize: !include customize.yaml
  packages: !include_dir_named packages
  auth_providers:
    - type: homeassistant

Mine is the same.
I'e tested removing my script imports by commenting out the include in cofiguration.yaml, then it parses properly, so my hunch was correct.
This means if anyone has input_boolean, script, automation, timer or input_text yamls already, this integration can't work


Watch doesn't work for negative glob matches

Describe the bug
Saving a file doesn't re-generate the outputs when the glob includes a negative matcher
To Reproduce
Set the documents or schema config to include something like: src/!(generated)/**/!(schema).graphql
Expected behavior
It should re-generate the outputs
Environment:

OS: 10.13.6
Codegen: 1.0.1
Node: 10

In this case, I think it might also be related to this (because you are trying to avoid watching the generated files?): https://github.com/dotansimha/graphql-code-generator/issues/1537. @ardatan is working on a fix for it.
Regarding the glob expression, we are using chokidar for watching the file-system, and I think it has a known issue: https://github.com/paulmillr/chokidar/issues/740

Ya. I'm trying to do two things. 1. Ignore generated GraphQL files. 2. Make the document config section not include schema files, and visa versa. My ideal was going to ultimately be all files with a -schema.graqhql postfix or in a schema/ directory would be schema, and all other files with a .graphql extension would be considered documents.
The main two issues I've run into with this so far:

I can't negatively match for the document case
I can't be proactive and add the rule including documents nested under schema/ until my project contains at least one such case. Not a big issue, but definitely prevents me from porting my config between projects. (although, just commenting for now is sufficient ;D )

@NickClark I am working on ignoring generated files #1558 and codegen already ignores schema definition files as I know, doesn't it? @dotansimha
https://github.com/ardatan/graphql-toolkit/blob/f0f6fd00fabe1ffc867b2a649aca8761fbe96527/tests/loaders/documents/documents-from-glob.spec.ts#L76

@NickClark, I recently merged @ardatan's fix for ignoring the generated files.
Also, the codegen knows to detect each document and skip if if it's not relevant, so no need to worry about separating those files.
Alternatively, you can use .graphqls for schema files and .graphql for operations.

Fixed in 1.0.4. @NickClark feel free to re-open if you think it's not resolved.

Ok. So everything seems to work now, even when using a looser config like:
documents:
  - src/client/**/*.graphql
schema:
  - src/client/**/*.graphql

But this generates alot of
`File "[PATH_OF_PARTICULAR_FILE]-schema.graphql" was filtered because it contains an invalid GraphQL document definition! types of errors.
Is this intended? Seems quite noisy for intended behavior.
Thanks again for your guys work! It been so nice seeing you fixing these issues so well and quickly! Kudos! 🎆

@NickClark it's intended because we would to let you know that the codegen loads file that it shouldn't.
I recommend to use .graphqls for schema files if they are in the same directory. It's supported by all IDEs and tools,


Can @ingredients be augmented to accept module files?/ @ingredients does not play nice with module files

Hi there
So I like to write out/develop and keep my functions in Pluto notebooks
e.g. I have notebook1.jl
function MyFunc(a,b,c)
 a+b-c
end

and notebook2.jl
function MyFunc2(a)
 a
end

(the functions don't exactly matter)
Because Pluto notebooks are just plain julia files(which I love), I then compose my notebooks together in module files (that are not notebooks, though I guess they could be)
i.e. I have a file named functionsmodule.jl
module functionsmodule

include("notebook1.jl")
include("notebook1.jl")

end

I then use those modules in other notebooks. It is easier for me to import a group of functions together instead of having to call ingredients on each separate notebook - it also helps seperate and group similar/related code together)

As shown above this works but the module is wrapped in another module which here i have labeled x so in order to get to my functions I have to go x.functionsmodule.MyFunc().
I have found a work around:
If I comment out the module and end key words in functionsmodule.jl
#module functionsmodule

include("notebook1.jl")
include("notebook1.jl")

#end

then I can name the variable functionsmodule instead of x and get the desired result

but then I don't "really" have a module in the functionsmodule.jl file which I would ideally want.
It would be really nice if I didn't have to comment out the module and end keywords (that way I could make nice packages if need be) and if ingredients was able to handle module files/files with module at the top

I am thinking we could do something before the module was returned, not sure if you can force the returned module to have a specific name linked to the filename input (I do not think it would be that bad if I still had to name the variable it would then function similar to import XYZ as xyz)
function ingredients(path::String)
# this is from the Julia source code (evalfile in base/loading.jl)
# but with the modification that it returns the module instead of the last object
name = Symbol(basename(path))

m = Module(name)

#Do something here like comment out/strip module from module files or something like that to allow them to work as described

Core.eval(m,
Expr(:toplevel,
:(eval(x) = $(Expr(:core, :eval))($name, x)),
:(include(x) = $(Expr(:top, :include))($name, x)),
:(include(mapexpr::Function, x) = $(Expr(:top, :include))(mapexpr, $name, x)),
:(include($path))
)
)
m

end

or do something before it gets to the function?
macro ingredients(filename)
	quote
		let
			filename = $(esc(filename))

#Do something here like comment out/strip module from module files or something like that to allow them to work as described

			update_time = @use_file_change(filename)
			@use_memo([update_time]) do
				ingredients(filename)
			end
		end
	end
end

I tried fiddling around with these functions but I am a novice when it comes to meta programming - so I didn't really get anywhere
I'd be happy to create/contribute to a PR if I got some guidance
Many thanks in advance

Thanks for the detailed explanation of your problem!
In your case, you should be able to do:
myfunctions = @ingredients("path_to_file.jl").myfunctions
# or if julia>=1.8
(; myfunctions) = @ingredients("path_to_file.jl")

and then you should be able to call
myfunctions.MyFunc()

Having a different behavior when the file is a module feels a bit weird to me because it is less consistent.

Oh of course, I can reference the module at the site of invoking/calling @ingredients. That was silly of me to forget. Thanks so much.

Having a different behavior when the file is a module feels a bit weird to me because it is less consistent.

That's fair. Yeah my whole current process is sort of a work around, I am waiting for the notebook-in-notebooks features that have sometimes been spoken about. But I know that the dependency problem/managing the dependencies is tricky there.
I will close this as resolved as it works for my use case
Thanks for your help again.


runtime error when using IAM certificate

I'm creating an API using an IAM server certificate and the lambda function is throwing the following runtime error (from CloudWatch):
2016-03-30T21:27:20.511Z	2f0f9e85-f6be-11e5-a5ea-ef9a61e1e76a	TypeError: Cannot call method 'replace' of undefined at Object.pub.parseCertificate (/var/task/lib/service/util/certificateParser.js:21:10) at Response. (/var/task/lib/service/ApiDomainName/ApiDomainNameService.js:37:61) at Request. (/var/task/node_modules/aws-sdk/lib/request.js:354:18) at Request.callListeners (/var/task/node_modules/aws-sdk/lib/sequential_executor.js:105:20) at Request.emit (/var/task/node_modules/aws-sdk/lib/sequential_executor.js:77:10) at Request.emit (/var/task/node_modules/aws-sdk/lib/request.js:596:14) at Request.transition (/var/task/node_modules/aws-sdk/lib/request.js:21:10) at AcceptorStateMachine.runTo (/var/task/node_modules/aws-sdk/lib/state_machine.js:14:12) at /var/task/node_modules/aws-sdk/lib/state_machine.js:26:10 at Request. (/var/task/node_modules/aws-sdk/lib/request.js:37:9)
I'm guessing it's having trouble finding the cert, but here's what I have going into that:
    "ApiDomainName" : {
        "Type" : "Custom::ApiDomainName",
        "Properties" : {
            "ServiceToken": { "Ref": "ServiceFunctionARN"},
            "domainName": { "Fn::Join": ["", [ { "Ref": "EnvName"},"-api.example.com" ] ] },
            "certificateName": "wildcardNamecheap",
            "iamServerCertificateName": "wildcardNamecheap",
            "certificatePrivateKey" : { "Ref": "sslCertPrivateKey" }
        }
    },

and the lambda event:
{
    "RequestType": "Create",
    "ServiceToken": "arn:aws:lambda:us-west-2:512730486721:function:APIGatewaySupport-LambdaFunction-1C915UXOQUBJ",
    "ResponseURL": "https://cloudformation-custom-resource-response-uswest2.s3-us-west-2.amazonaws.com/arn%3Aaws%3Acloudformation%3Aus-west-2%XXX%3Astack/app-12/2c500910-f6be-11e5-80fa-503f2a2cee4a%7CApiDomainName%7C05f07a27-3bbd-4737-bb78-1cf1379233e2?AWSAccessKeyId=XXX&Expires=1459380439&Signature=prp3TeQ0S%2F5EM4MCJ3fnr3nmVm4%3D",
    "StackId": "arn:aws:cloudformation:us-west-2:XXX:stack/app-12/2c500910-f6be-11e5-80fa-503f2a2cee4a",
    "RequestId": "05f07a27-3bbd-4737-bb78-1cf1379233e2",
    "LogicalResourceId": "ApiDomainName",
    "ResourceType": "Custom::ApiDomainName",
    "ResourceProperties": {
        "ServiceToken": "arn:aws:lambda:us-west-2:XXX:function:APIGatewaySupport-LambdaFunction-1C915UXOQUBJ",
        "certificatePrivateKey": "***masked***",
        "certificateName": "wildcardNamecheap",
        "domainName": "app-12-api.example.com",
        "iamServerCertificateName": "wildcardNamecheap"
    }
}

The end result is the stack create just hangs..

Hi,
Can you provide more logs from the Lambda or was that it?
From the looks of it it doesn't get the certificate chain which is strange.
Can you try running the follow cli command and paste the response (mask any sensitive details).
aws iam get-server-certificate --server-certificate-name wildcardNamecheap

I see that the chain is actually optional when uploading a server certificate to IAM.
It is however required when uploading it to API Gateway so in this case, if the chain is not available, creation should fail.

If you upgrade to version 1.4.2 and re-run the lambda event manually your stack creation should fail gracefully. My best guess is that your certificate does not have a Certificate Chain and this is required when uploading to API Gateway so I have added a check that ensures that body the body and the chain are set and fails if they're not.
Try it out and let me know how it works.

It does appear you are correct.  I created a new IAM cert with the chain, and it it works with 1.4.1.  I tried my old cert (without the chain) with 1.4.2 and it did fail as expected

Great! Thanks for confirming and for testing both cases :)