Build failure: "Unable to import custom transformer module(graphql-ttl-transformer)"

Hi and thanks for this transformer,
I have followed your npm install instruction and also added a transformers field with graphql-ttl-transformer to transform.conf.json like this:
{
    "Version": 5,
    "ElasticsearchWarning": true,
    "transformers": [
        "graphql-ttl-transformer"
    ]
}

I can successfully deploy the backend with amplify push but when I try to deploy the frontend, the build fails with the following warning: Unable to import custom transformer module(graphql-ttl-transformer).
Here is the relevant part of the build log.
2021-01-19T12:01:24.851Z [INFO]: Unable to import custom transformer module(graphql-ttl-transformer).
2021-01-19T12:01:24.852Z [INFO]: You may fix this error by editing transformers at /codebuild/output/src127667145/src/janky-app/amplify/backend/api/janky/transform.conf.json
2021-01-19T12:01:24.852Z [WARNING]: ✖ An error occurred when pushing the resources to the cloud
2021-01-19T12:01:24.852Z [WARNING]: ✖ There was an error initializing your environment.
2021-01-19T12:01:24.854Z [INFO]: init failed
2021-01-19T12:01:24.855Z [INFO]: /root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/node_modules/import-global/index.js:1
                                 Error: Cannot find module '/root/.nvm/versions/node/v12.19.0/lib/node_modules/graphql-ttl-transformer'
                                 Require stack:
                                 -<EMAIL_ADDRESS>                                 -<EMAIL_ADDRESS>                                 -<EMAIL_ADDRESS>                                 -<EMAIL_ADDRESS>                                 -<EMAIL_ADDRESS>                                 -<EMAIL_ADDRESS>                                 -<EMAIL_ADDRESS>                                 -<EMAIL_ADDRESS>                                 -<EMAIL_ADDRESS>                                 - /root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/bin/amplify
                                     at Object.module.exports [as default] (/root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/node_modules/import-global/index.js:9:10)
                                     at /root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/src/transform-graphql-schema.ts:111:44
                                     at Array.map (<anonymous>)
                                     at Object.transformersFactory (/root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/src/transform-graphql-schema.ts:80:8) {
                                   code: 'MODULE_NOT_FOUND',
                                   requireStack: [
                                     '/root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/node_modules/import-global/index.js',
                                     '/root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/lib/transform-graphql-schema.js',
                                     '/root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/lib/push-resources.js',
                                     '/root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/lib/amplify-service-migrate.js',
                                     '/root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/lib/initializer.js',
                                     '/root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-provider-awscloudformation/lib/index.js',
                                     '/root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/lib/init-steps/s2-initProviders.js',
                                     '/root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/lib/commands/init.js',
                                     '/root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/lib/index.js',
                                     '/root/.nvm/versions/node/v12.19.0/lib/node_modules/@aws-amplify/cli/bin/amplify'
                                   ]
                                 }
2021-01-19T12:01:24.871Z [ERROR]: !!! Build failed
2021-01-19T12:01:24.872Z [ERROR]: !!! Non-Zero Exit Code detected
2021-01-19T12:01:24.872Z [INFO]: # Starting environment caching...
2021-01-19T12:01:24.872Z [INFO]: # Environment caching completed
Terminating logging...

Any help much appreciated! Thanks

Hi @jeremyburton
Thanks for the error report.
I haven't seen this before why I just went over to the Amplify CLI codebase and searched for the Unable to import custom transformer module error, which seems to be thrown here. It looks like it first tries to import the dependency from local node_modules and only if that's not successful from global packages. As your error message stack contains an import-global line, I think it failed at importing it from local node_modules.
Have you successfully installed it using npm install --save graphql-ttl-transformer or could it be that there were some errors when doing so?

Thanks in advance.

Hi @jeremyburton
Thanks for the error report.
I haven't seen this before why I just went over to the Amplify CLI codebase and searched for the Unable to import custom transformer module error, which seems to be thrown here. It looks like it first tries to import the dependency from local node_modules and only if that's not successful from global packages. As your error message stack contains an import-global line, I think it failed at importing it from local node_modules.
Have you successfully installed it using npm install --save graphql-ttl-transformer or could it be that there were some errors when doing so?

Thanks in advance.

Hi @flogy

Yes, I can see the graphql-ttl-transformer directory in my local project's node_modules.
It installed successfully as far as I can tell.

Hi @flogy

Yes, I can see the graphql-ttl-transformer directory in my local project's node_modules.
It installed successfully as far as I can tell.

Hm, okay. Is it possible to share your repository so I could have a look?

Hm, okay. Is it possible to share your repository so I could have a look?

I should probably have said that this was a remote build on AWS Amplify (CI/CD), not a local build. I don't commit my node_modules directory to my repository, so I guess AWS installs modules as per package.json.

I should probably have said that this was a remote build on AWS Amplify (CI/CD), not a local build. I don't commit my node_modules directory to my repository, so I guess AWS installs modules as per package.json.

Oh, I see. Maybe you could inspect the build folder or log output on CI/CD to also verify if the graphql-ttl-transformer actually was installed successfully?
It just seems to be the most likely reason for this error when looking at the related Amplify CLI code. 🤔

Oh, I see. Maybe you could inspect the build folder or log output on CI/CD to also verify if the graphql-ttl-transformer actually was installed successfully?
It just seems to be the most likely reason for this error when looking at the related Amplify CLI code. 🤔

The logging I included in my initial report was from the AWS Amplify CI/CD build process. I have tried building the project locally and that seems fine. I agree that it seems that the graphql-ttl-transformer module isn't being found during the build process but I don't understand why.

The logging I included in my initial report was from the AWS Amplify CI/CD build process. I have tried building the project locally and that seems fine. I agree that it seems that the graphql-ttl-transformer module isn't being found during the build process but I don't understand why.

What CI/CD system are you using exactly?

What CI/CD system are you using exactly?

I'm using AWS Amplify Console with the default build settings:
version: 1
backend:
  phases:
    build:
      commands:
        - '# Execute Amplify CLI with the helper script'
        - amplifyPush --simple
frontend:
  phases:
    preBuild:
      commands:
        - npm ci
    build:
      commands:
        - npm run build
  artifacts:
    baseDirectory: dist
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*

I'm using AWS Amplify Console with the default build settings:
version: 1
backend:
  phases:
    build:
      commands:
        - '# Execute Amplify CLI with the helper script'
        - amplifyPush --simple
frontend:
  phases:
    preBuild:
      commands:
        - npm ci
    build:
      commands:
        - npm run build
  artifacts:
    baseDirectory: dist
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*

If you're not already familiar with using the hosting side of the Amplify Console, these docs might be helpful:
https://docs.aws.amazon.com/amplify/latest/userguide/welcome.html
https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html

If you're not already familiar with using the hosting side of the Amplify Console, these docs might be helpful:
https://docs.aws.amazon.com/amplify/latest/userguide/welcome.html
https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html

I have linked branches of my repository to an App in the AWS Amplify Console so that whenever I push changes it automatically attempts to create a new build and deploy it. All my other node packages currently build fine with this setup. It only started to fail when I added the graphql-ttl-transformer package.

I have linked branches of my repository to an App in the AWS Amplify Console so that whenever I push changes it automatically attempts to create a new build and deploy it. All my other node packages currently build fine with this setup. It only started to fail when I added the graphql-ttl-transformer package.

Hm, I really never used that before. I'd just go with some trial and error stuff at this point:
version: 1
backend:
  phases:
    build:
      commands:
        - npm i -S graphql-ttl-transformer
        - '# Execute Amplify CLI with the helper script'
        - amplifyPush --simple
frontend:
  phases:
    preBuild:
      commands:
        - npm ci
    build:
      commands:
        - npm run build
  artifacts:
    baseDirectory: dist
    files:
      - '**/*'

What I've modified here:

Added - npm i -S graphql-ttl-transformer to the backend build commands.
Removed the caching configuration from the frontend (should not be a problem as I guess the frontend build is run separately).

Does that work? And if not, is it still the same error in the log output after those modifications?

Hm, I really never used that before. I'd just go with some trial and error stuff at this point:
version: 1
backend:
  phases:
    build:
      commands:
        - npm i -S graphql-ttl-transformer
        - '# Execute Amplify CLI with the helper script'
        - amplifyPush --simple
frontend:
  phases:
    preBuild:
      commands:
        - npm ci
    build:
      commands:
        - npm run build
  artifacts:
    baseDirectory: dist
    files:
      - '**/*'

What I've modified here:

Added - npm i -S graphql-ttl-transformer to the backend build commands.
Removed the caching configuration from the frontend (should not be a problem as I guess the frontend build is run separately).

Does that work? And if not, is it still the same error in the log output after those modifications?

Yes, that worked 😀 The backend built successfully and you can see that graphql-ttl-transformer was installed this time:
                                 # Starting phase: build
                                 # Executing command: npm i -S graphql-ttl-transformer
2021-01-19T17:04:04.484Z [WARNING]: npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
2021-01-19T17:04:04.486Z [WARNING]:
2021-01-19T17:04:04.486Z [INFO]: +<EMAIL_ADDRESS>                                 added 41 packages from 62 contributors and audited 1626 packages in 9.276s

Do you know if/why removing the cache config is necessary? I don't like changing the build settings without fulling understanding the consequences (which I don't in this case).

Yes, that worked 😀 The backend built successfully and you can see that graphql-ttl-transformer was installed this time:
                                 # Starting phase: build
                                 # Executing command: npm i -S graphql-ttl-transformer
2021-01-19T17:04:04.484Z [WARNING]: npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
2021-01-19T17:04:04.486Z [WARNING]:
2021-01-19T17:04:04.486Z [INFO]: +<EMAIL_ADDRESS>                                 added 41 packages from 62 contributors and audited 1626 packages in 9.276s

Do you know if/why removing the cache config is necessary? I don't like changing the build settings without fulling understanding the consequences (which I don't in this case).

Is there anything you can do on the module side that would remove the neccessity for the custom build settings in AWS Amplify Console?

Is there anything you can do on the module side that would remove the neccessity for the custom build settings in AWS Amplify Console?

I'm not sure how the caching works exactly. I just thought it might sense to try deactivating it to make sure it is not preventing the CI/CD process from re-installing the dependencies and thus not installing graphql-ttl-transformer.
I believe it should not be necessary to also remove caching. It should be enough to just add the additional build command to install the library manually.
But I can't tell you if this is best practice or not. Maybe you should also check with the guys from amplify-console.
I don't think it is possible to make it work by just changing something at this module as the problem seems to be coming from the way Amplify Console handles external dependencies.
As it seems to be working, I'll close this issue now. If there are any new insights about whether removing the caching is necessary or if ust adding the install command was enough, it would be helpful if you could add another comment about it though (for people looking for it in the future) 🙂
Thanks! May this module serve you well in your projects!

I'm not sure how the caching works exactly. I just thought it might sense to try deactivating it to make sure it is not preventing the CI/CD process from re-installing the dependencies and thus not installing graphql-ttl-transformer.
I believe it should not be necessary to also remove caching. It should be enough to just add the additional build command to install the library manually.
But I can't tell you if this is best practice or not. Maybe you should also check with the guys from amplify-console.
I don't think it is possible to make it work by just changing something at this module as the problem seems to be coming from the way Amplify Console handles external dependencies.
As it seems to be working, I'll close this issue now. If there are any new insights about whether removing the caching is necessary or if ust adding the install command was enough, it would be helpful if you could add another comment about it though (for people looking for it in the future) 🙂
Thanks! May this module serve you well in your projects!

Saved my life . Thanks, removing caching helped me with this. It was a caching issue.

I would like to add to this and say that the only way I could get it to work was by adding the install command to my backend build as well as removing the caching.

Just wanted to note here the solution that worked for me was upgrading npm and installing the plugin before the push ie:
version: 1
backend:
  phases:
    build:
      commands:
        - npm install -g npm@latest
        - npm ci
        - amplifyPush --simple


feature: easymotion-sn like experience. able to replace '/'

Did you check the docs?

[X] I have read all the flash.nvim docs

Is your feature request related to a problem? Please describe.
Unfortunate, It's seem like only easymotion implement this.
Describe the solution you'd like
Easymotion-sn able to replace default \. you could just type, and <tab> to surfing around. if you find  what you want, you don't need to conside tag, just type <space> or <enter> to go first match. It‘s very useful when you are viewing the code rather then edit it. you don't need exact tag to jump.
The key is <tab> to surfing and <enter>/<space> to jump first
Highly recommend try the plug-in(easymotion) setting below.
Compare to telescope. you don't need leave cur window, which might break your thought. And also give you more info, like the density of matches. and  whole screen context of matches.
Compare to default '/'. If you find that what you type is not what you need, just . no need to enter </> , to find more. And type tab to surf is much faster! It's surfing by screen.
Here is a quickview gif:

Describe alternatives you've considered
easymotion itself
Additional context
the easymotion config i'm using, using lazy.nvim
{
    'easymotion/vim-easymotion',
    event = 'VeryLazy',
    init = function()
        vim.g.EasyMotion_smartcase        = 1
        vim.g.EasyMotion_do_mapping       = 0
        vim.g.EasyMotion_enter_jump_first = 1
        vim.g.EasyMotion_space_jump_first = 1
        vim.g.EasyMotion_use_upper        = 1
        vim.keymap.set(
            'n',
            '/','<Plug>(easymotion-sn)',
            { remap = true }
        )
    end,
}

Do you know about C-g, C-t to navigate matches without leaving the search prompt? Its builtin to neovim

true, and you can of course add cmdline mappings if you want to use different keys


Support Homebrew builds on macOS

User Story
As a macOS user, I want install Paratext 10 Studio and Platform.Bible using Homebrew so that I can more easily do advanced things (e.g., run with command line arguments, programmatically update versions, etc.).
Description
@merchako suggested that getting Paratext and Platform using Homebrew would be nice for some users.
A few things to note:

We need to pick which types of builds (Apple silicon, universal, or Intel silicon) to produce.
We need to pick which OSes to support. I assume we'd be looking at binary builds, so we'll need matching build machines to support that.
We might need to make sure that Homebrew's ICU libraries have not been installed as we had problems with those. We distribute the ICU libraries from MacPorts instead.

Electron v33+ no longer supports macOS 10.15 Catalina and lower, so we're not going to help our users any by supporting those versions with ICU.
It seems fine to make one macOS build: universal.

A Universal app is just the x64 app and the arm64 app glued together into a single application. It's twice as big because it contains two apps in one. Twice as big should be fine at this time since our users will be early adopters (and developers).

How might I learn more about what went wrong with the Homebrew ICU libraries?

@merchako I don't remember the details at this point, and the person who got things working using MacPorts was a volunteer who is no longer spending time on the project. Regardless, we have more logging in the icu.net library now that should provide more details than we had previously about why library loading fails at runtime. This is a very recent addition that is very useful on macOS in particular for these sorts of things.
If you want to try to get this working with Homebrew libraries now, you'll probably need to update this from ParanextDataProvider.csproj:
  <!--
    This assumes that icu4c libs are installed under "/opt/local/lib" on macOS. This is the default
    location for libs that MacPorts installs. If we need to start bundling icu4c libs from
    somewhere other than "/opt/local/lib", this path and some other paths in the build scripts will
    need to be updated. We have to bundle the icu4c libs somehow unless macOS starts to include them
    by default.
    -->
  <ItemGroup>
    <Content Include="/opt/local/lib/libicu*.??.dylib" Exclude="/opt/local/lib/libicutest*.dylib;/opt/local/lib/libicutu*.dylib" Condition="$([MSBuild]::IsOsPlatform('macOS'))">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>

I don't remember where Homebrew installs its libs. MacPorts installs them under /opt/local/lib.
In addition, for GitHub Actions to build using Homebrew there are a number of other changes we'd need to make:

Find or create a way to install Homebrew on GitHub build images. Here is what we do for MacPorts:

      - name: Install MacPorts
        if: ${{ matrix.os == 'macos-latest' }}
        uses: melusina-org/setup-macports@v1

Install the universal libs from Homebrew onto the build images. Here is what we do for MacPorts:

      - name: Install icu4c on macOS
        if: ${{ matrix.os == 'macos-latest' }}
        run: |
          sudo port -v install icu @74.2_0 +universal

Unless the Homebrew icu libraries are built a lot differently than the MacPorts ones, update the loader paths that are embedded inside of the icu libraries so that we don't run into problems with the libraries not "seeing" each other. Here is what we do for MacPorts:

      - name: Install loader tools on macOS
        if: ${{ matrix.os == 'macos-latest' }}
        run: |
          sudo port -v install ld64

      - name: Fixup loader paths for icu4c
        if: ${{ matrix.os == 'macos-latest' }}
        # LIB_DEPENDENCIES are of the form "<ICU lib short name> <dependency as ICU lib short name>"
        # For example, libicuuc (shortened to "uc") depends on libicudata (shortened to "data")
        # Dependencies can be seen by running "dyld_info -dependents /path/to/something.dylib"
        run: |
          ICU_VERSION=74
          LIB_DEPENDENCIES="
          i18n data
          i18n uc
          io data
          io i18n
          io uc
          uc data
          "
          LIB_DEPENDENCIES=$(echo "$LIB_DEPENDENCIES" | sed '/^$/d')
          while IFS= read -r line; do
            set -- $line
            sudo install_name_tool -change "/opt/local/lib/libicu$2.$ICU_VERSION.dylib"<EMAIL_ADDRESS>"/opt/local/lib/libicu$1.$ICU_VERSION.dylib"
          done <<< "$LIB_DEPENDENCIES"

These steps are part of the publish.yml, package-main.yml, and test.yml GitHub workflows.
Feel free to reach out with questions.


usertype value not being destructed if constructed outside lua VM?

Hiya, thanks for sol2! I'm a huge fan of lua and new to actually writing C++, so this has been extremely fun to play around with.
Code that highlights my issue: https://gist.github.com/chrsm/46e3a1335a66da46dce7534c3033ac2e
Essentially, I have a type data_container that can return either a data_val or nullptr on a call to data_container::next.
When creating/destroying data_vals in pure lua, the dtor is called as I'd expect.
When using a data_container created in lua and calling next, however, data_val dtor is never called, even after calling collect_garbage via sol::state. As a result, valgrind/etc say I am leaking memory.
How should I ensure that these values are being cleaned up properly from sol?
 Every single time you directly call next. Your code leaks because you are manually using new[]/new and delete[]/delete. sol2 is very clear about it's ownership semantics, and what happens with Raw pointers. That is we DO NOT DELETE raw pointers, because raw pointers do not tell sol2 (me) what your intentions with that pointer are. Are you going to pass it off? Is it just a reference you don't intend to delete? Is it an array that needs delete[], or a regular value that needs delete ? We talk about this here:
http://sol2.readthedocs.io/en/latest/tutorial/ownership.html
I am going to post your code back at you, with the necessary adjustments made to stop leaking memory. Notice that there is no raw new or delete within the code. We instead use wrapping, 0-overhead, lightweight classes called std::unique_ptr and std::vector to appropriately capture the semantics of your code while being resistant to memory leakage.
#include "deps/sol2/sol.hpp"
#include <cstdlib>
#include <iostream>
#include <string>
#include <cstdint>

#include <vector> // std::vector

struct data_val {
    data_val();
    ~data_val();

    std::vector<uint32_t> crap;
};

// initializing 10 elements with a value of 0
data_val::data_val(): crap(10, 0) {
// if you don't like the "constructor initialization" syntax, you can resize after
// the member and base constructors run by putting statements
// in the constructor body
/* e.g.:
* crap.resize(10); // and anything else you want
*/
}
data_val::~data_val() {
    std::cout << "crap vector deleter called\n";
}

struct data_container {
    std::unique_ptr<data_val> next();
};

std::unique_ptr<data_val> data_container::next() {
    // can be null, but for simplicity's sake...
    std::unique_ptr<data_val> d(new data_val());
    return d;
}

int main(int argc, char *argv[]) {
    sol::state lua;
    lua.open_libraries();

    lua.new_usertype<data_container>("data_container", "next", &data_container::next);
    lua.new_usertype<data_val>("data_val",
        sol::constructors<data_val()>(),
        "crap", &data_val::crap
    );

    // properly deleted when created in lua
    lua.script("local d = data_val.new();\n"
        "d = nil\n"
        "collectgarbage()\n"
    );

    // not deleted when returned from data_container?
    lua.script(
        "local container = data_container.new()\n"
        "local done = false\n"
        "local d = container:next()\n"
        "d = nil\n"
        "print(\"set data_val to nil\")\n"
        "collectgarbage()\n"
        "print(\"not deleted?\")\n"
    );

    return 0;
}

Note that you can "tighten" the requirements here, if possible. For example, we use std::vector because most individuals need a resizable array. If your array is fixed in size and you want the minimal overhead but still have painless creation/deletion, use std::unique_ptr<uint32_t[]>( new uint32_t[10] );. You can store the size (10) in a static const std::size_t crap_size = 10; global constant so you're not using magic numbers everywhere, or just remember the number (global constants are preferred over just remembering the number and sprinkling 10 all over the place, which leads to overflows and bugs when you change the number in 9 places but forget the 10th spot).
 No unique_ptr or new required.
Finally, since we're already running a train of unsolicited advice here: there are easier ways to iterate over a container that come from C++, especially if it's already a std::vector or any of the many std:: library containers. sol2 explicitly supports iteration, so you don't have to make up a "next" scheme and flag done:
#include "deps/sol2/sol.hpp"
#include <cstdlib>
#include <iostream>
#include <string>
#include <cstdint>

#include <vector> // std::vector
#include <numeric> // std::iota

struct data_val {
	data_val();
	~data_val();

	std::vector<uint32_t> crap;
};

// initializing 10 elements with a value of 0
data_val::data_val()
: crap(10, 0) {
	// http://en.cppreference.com/w/cpp/algorithm/iota
	std::iota(crap.begin(), crap.end(), 5);
}
data_val::~data_val() {
	std::cout << "crap vector deleter called\n";
}

struct data_container {
	std::vector<data_val> values;

	data_container(int num_vals = 1);

	// required definition
	typedef typename std::vector<data_val>::value_type value_type;
	typedef typename std::vector<data_val>::iterator iterator;
	typedef typename std::vector<data_val>::size_type size_type;

	// begin/end iterators
	iterator begin() {
		return values.begin();
	}
	iterator end() {
		return values.end();
	}

	size_type size () const {
		return values.size();
	}
};

data_container::data_container(int num_vals /* = 1 */) : values(num_vals) {
}

int main(int argc, char* argv[]) {

	{
		sol::state lua;
		lua.open_libraries();

		lua.new_usertype<data_container>("data_container",
			sol::constructors<data_container(), data_container(int)>()
		);
		lua.new_usertype<data_val>("data_val",
			sol::constructors<data_val()>(),
			"crap", &data_val::crap);

		/* This:
		R"delim(
			...
		)delim";
			is known as a raw string literal. You can
			stuff a bunch of content in it
			note that it will take your code literally as it is between the 2 delimeters,
			whitespace (identtation and newlines) included
		*/
		lua.script(R"lua(
local container = data_container.new()
-- perform iteration
for index, value in pairs(container) do
	print("printing container's " .. index .. " index'd value:")
	local crap = value.crap
	-- iterate on 'crap'
	for value_index, num in pairs(crap) do
		-- show me
		print(value_index, ' = ', num)
	end
end
		)lua");
	}

	return 0;
}

This is all powered by C++'s begin and end iterators on a container. You can also make your own class, and as long as it has proper begin and end functions that return iterators of some kind, sol2 will iterate it properly. This is tested with nearly every single standard library container in our tests, and with several custom containers in the tests. User code has also relied on this feature and deployed to production.
I hope this helps you.
Thanks for picking sol2. Best of luck on your journey forward.

Heyo - thank you very much @ThePhD for your information here. I genuinely appreciate your advice - I'm definitely a newbie and this has been very informative! You rock.


Fewer releases

(I hope it's ok to provide feedback here, I couldn't find a reference to a mailing list or twitter account)
I love this package and appreciate all of the hard work!
But until Atom can automatically install package updates, it's annoying to be forced to accept package updates every day or every other day.  Unless you're fixing a critical bug, releasing once a week or every other week would be much better.
Thank you!

The past few releases have been fixing 'critical' bugs; at least they were for some. I hardly ever use Atom so I guess I'm not affected - I wasn't aware that Atom forced anyone to update packages but I'll try to avoid updating this package too often.


Add new Input OTP component

Describe the feature
In the original shadcn library there is an Input OTP component. Can this be ported to this version?

Please search issues before opening new ones, thank you!
Duplicate of #995


How to get font range?

Hi,
I've a tft file contain chinese font,but i don't konw unicode range?
How should we find this range?
wt006.zip

Have a  look at this site: https://www.compart.com/en/unicode/U+6211
It tells you the Unicode block if you type a character

Thanks.I close this issue


hit-enter prompt with vim.err_write with redraw before last line (deoplete)

The following will not trigger a hit-enter prompt:
:py3 import vim; vim.err_write('\n'.join(str(x) for x in range(10))+'\n'); vim.command('redraw'); vim.err_write('last\n')

It displays the lines 0-9, then waits for a short time, and displays "last".
This is good/useful when wanting to add a traceback/more info for :messages, but have the actual error in the end (without a large red blob).
But for some reason similar code in deoplete will not (when adding a redraw command before the last line) - it displays all of it at once, causing a hit-enter prompt: https://github.com/Shougo/deoplete.nvim/blob/57d3f0c3cdfcfc1d91901a6d59d08f9008abd166/rplugin/python3/deoplete/util.py#L94-L101
This might be related to how deoplete integrates with neovim-python-client (https://github.com/Shougo/deoplete.nvim/blob/master/rplugin/python3/deoplete/parent.py#L96-L102).

I'm not sure why the first case "waits". That seems like an accident, doesn't it?

Agreed. I've thought that it might be intentional, but I also think that it should not wait.
The main issue is that the second case even triggers the hit-enter prompt though.

The trick that deoplete uses is to first use echom for additional info (traceback), then redraw and then echom for the main msg.
This way you have it in :messages, but are not bothered with the full blob initially.
I've noticed that this does not work as expected when using vim.err_write.

@justinmk
Please elaborate.
Do you mean to do this from deoplete's error_tb (Python)? (https://github.com/Shougo/deoplete.nvim/blob/57d3f0c3cdfcfc1d91901a6d59d08f9008abd166/rplugin/python3/deoplete/util.py#L94-L101)
deoplete uses rpcnotify to trigger the Python code.


Better error handling for unrecognized Ops

Currently a formula like 'y ~ a * b' will throw an assertion error during code generation. Maybe we can recognize * as a valid Op but throw an NotImplementedError if we see it being used in the formula.
File "/Users/npradhan/workspace/pyro_dev/brmp/brmp/formula.py", line 208, in rpn2ast
    assert len(out) == 1
AssertionError

Thanks for opening this. It's a good example of the kind of thing I had in mind when opening #7.

Sorry I missed that issue. Closing this as duplicate. Lets track this in #7.

Sorry I missed that issue.

No problem!

Lets track this in #7.

Here or there, either is fine with me.


OSX - No Command+Shift+P?

I use Dvorak keyboard on OSX 10.14.6

Command+P and Command+Shift+P enter insert mode.  (I'm physically pressing R for the Dvorak key "P").
Control+L enters the fuzzy file finder. (I'm physically pressing P for the the Dvorak key "L").

This crashes pretty quick.  I think there is a bug already for this.

Control+Shift+L enters the command pallet. (I'm physically pressing P).

Nothing I select with the return key works.

I am using Colemak and experiencing this issue as well. If there is a way to enable debug mode in the release build, I'm happy to send over a stack trace.

+1 to this: I have to press physical "Cmd+Shift+P" to get the palette as a dvorak user; the keybind doesn't seem to respect mac os's keymap. This isn't terribly surprising fwiw, since many games have similar problems; so it's likely that revery et al just doesn't get this right yet.
The next step down this road is "only honors keymap present at application start". This is another bug that some game have: start in dvoark, always use dvorak mapped binds (likewise for qwerty); swapping doesn't pick up. This is especially insidious if:

you've got a hardware dvorak keyboard
and you also unplug, and then need to swap to the software-remapped notebook builtin keyboard

This is a less common event for games, but frequent for something that I leave running all day, like "my editor" ;-)

I believe the move to SDL2 will help us more precisely handling these layouts: https://github.com/onivim/oni2/pull/780 , and seems to handle the switching-layout-while-running case as well.

Works For Me Now ™

Awesome! Thanks for the confirmation @jcorbin .
I'll close this out, but please feel free to log a new issue if there are still input-layout cases that are not working as expected. Still seem to be some remaining issues in #557 in particular I'm tracking


Update to workflows

Contains a fix for a problem in #32. As well as an update to the labeler.

Maintainer Notes
⚠ Do not delete this section. Checklist for maintainers.
IMPORTANT: Complete the following checklist before merging.

All PR's should be added to the Code Reviews project page.
Once you are happy with the changes remove the do not merge for the ready to merge tag.
Commits should be Squashed and Merged.

Plus also a fix to the copyright check.


Export/Perf: use foreach_set/foreach_get for manipulating image data

2.83 will include faster methods for getting/setting image.pixels: https://developer.blender.org/D7053
We should try these out and see how we can best make use them. If they're fast enough we might even be able to get rid of the compositor hack...

If they're fast enough we might even be able to get rid of the compositor hack...

Looks like they are :DDD

This is a very good news :)
I saw the commit on blender repo, but didn't get time to test it yet.


[Table] Pass rowData instead of just index for cases like onRowClick

So I'm making a pretty standard datatable using the Table component.
All was good until I implemented row selection, sorting and filtering.
Sorting and filtering by themselves is not a problem but as soon as row selection comes into play, I must be able to keep track of the "primary key" of the row, not the relative index of the row in the table.
For simple selection, I implemented this by changing the "defaultRowRenderer"  to the following
if (onRowClick) {             a11yProps.onClick = () => {                 onRowClick({ index, rowData })             }         }
So now I can get the rowData every time I click on the row. But the problem is, I also need to display which rows are selected to the users even after a filter has been applied and the "rowStyle" prop only provides the relative index of the row, not the rowData. I believe this little tweak can reduce great amount of housekeeping code people need to write to keep the relative row number and the actual primary key of the row in sync for the aforementioned case etc.

Ok so just to update others, I managed to mark which rows are selected by adding a custom className to the custom version of defaultRowRenderer like the following
if(rowData.selected){         className += " RV_ROW_SELECTED"     }
then using css to highlight selected rows

Hi @yhware,
Would you like to contribute a PR that adds the rowData parameter to the defaultRowRenderer? I would support this change. 😄

Nevermind. Closed via 449717a. This will go out with the next release at some point.

Nevermind. Closed via 449717a. This will go out with the next release at some point.


i18n(zh-cn): Update syntax-highlighting.mdx

Description (required)
Update syntax-highlighting.mdx
Related issues & labels (optional)

#10419
Suggested label: i18n

Lunaria Status Overview
🌕 This pull request will trigger status changes.

Learn more
By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.
You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File
Note

zh-cn/guides/syntax-highlighting.mdx
Localization changed, will be marked as complete.

Warnings reference

Icon
Description

🔄
The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.


New feature to your excellent script

Hello!
Thank you very much for your excellent script. It's really easy to use and quite powerful.
Would you please add one tiny feature to it?
I'm talking about optional first column with Line No., 1,2,3, etc. which will be constant in any sorting type.

hi,
currently you cannot set indices, but you can fix position of some rows by putting attribute data-disable-sorting on them. such rows won't be sorted then
does that cover your use case?

Hello! I want to have first column with 1,2,3 no matter what sorting is applied to the table.
It's not about fixing position of rows.

so you mean that before sorting the rows are not first, second thirs, but after sorting, you want to have them in that order?

i mean that i want to count rows visually, and I need first column with line nos. Want a screenshot?

yes please, I think I don't understand what you mean

aha, so you want the column to be fixed, that's unfortunately not possible, because the sorting is done on rows as the smallest entity
there is an event triggered after the sorting, so you can hook on it and change the content of the first column after sorting

Yes, exactly. I know that now there's no such functionality :)
What about implementing it in new version? :)

I'm affraid that it's not possible with how the sorting works

Well', I'm done with these script:
$('#statTable').on('sorted', function () {
				var userListTable = document.getElementById('statTable');
				for (var i = 1; i < userListTable.rows.length; i++) {
					userListTable.rows[i].cells[0].innerText = i;
				}
			});

yes, that's what I meant


Feature: Move selected channels to a different group (new or existing)

I know that you can rename whole group easy is notepad, but can you add this feature here? Selected channels move to a different group,

Renaming a whole group at once? Right now its renaming one cell, copy it, select the range to rename and paste.  I can do it like select range, F2 and rename all in next version.
The 2nd part of your question I don't get it right now. You want to move a range of selected rows to a different group? So no Ctrl-c, Ctrl-i ?

Renaming a whole group at once? Right now its renaming one cell, copy it, select the range to rename and paste.  I can do it like select range, F2 and rename all in next version.
The 2nd part of your question I don't get it right now. You want to move a range of selected rows to a different group? So no Ctrl-c, Ctrl-i ?

I am still getting used to how it work. For moving to another group of  some channels: CTRLC new group name + select group field of channels to move (or entire group) + CTRLV. I think that works also for renaming an entire group. Still getting used to the use of F2 to edit a cell. Maybe use a double click to edit cell?

I am still getting used to how it work. For moving to another group of  some channels: CTRLC new group name + select group field of channels to move (or entire group) + CTRLV. I think that works also for renaming an entire group. Still getting used to the use of F2 to edit a cell. Maybe use a double click to edit cell?

double click is already used for playing in vlc, I will extend F2 key for selected cells

double click is already used for playing in vlc, I will extend F2 key for selected cells

Double play in most apps is to edit a cell. You have the play button in top to play specific line. I think is sufficient. Use double click to edit cell.

Double play in most apps is to edit a cell. You have the play button in top to play specific line. I think is sufficient. Use double click to edit cell.

Usually in datatables it is just typing/single click or F2. You can switch between both options in settings.

Usually in datatables it is just typing/single click or F2. You can switch between both options in settings.


DialAddr should do Happy Eyeballs

Following up on https://github.com/quic-go/quic-go/issues/3755#issuecomment-1506462065, I believe our DialAddr method is not doing the right thing:

It currently uses ResolveUDPAddr, which prefers IPv4 over IPv6 (we should do the opposite!). See #3755 for more details.
ResolveUDPAddr is a misleading function anyway, since it returns a single result. A typical DNS response will contain multiple A and AAAA records.

After discussing this on the QUIC Slack, I believe this is what a "correct" implementation would look like:

We need to do DNS resolution ourselves (using a net.Resolver).
If we receive both A and AAAA, we should start dialing IPv6 first, and try IPv4 shortly after if that doesn't work. This is the Happy Eyeballs logic described in RFC 8305.
This results in two loops, dialing A and AAAA addresses in parallel. If a connection timeout times out, we should start dialing the next address.

Unfortunately, this is some significant complexity. DialAddr would not be a very thin wrapper around Dial any more. However, most users of quic-go probably want to connect to a domain, and not only an IP address, so it seems like this logic either belongs into quic-go or into a wrapper around quic-go, otherwise it would have to be reimplemented again and again.
This results in interesting interactions between the dial context timeout and the handshake timeout. Specifically, the dial context timeout needs to be larger than the handshake timeout for us to be able to proceed to the second A / AAAA record if the first one fails. As the context deadline is set by the deadline, there's not a lot we can do about this, other than being very clear how the logic works.

It's not clear how this interacts with 0-RTT. The safest option would be to just send the 0-RTT data on the first connection, and treat subsequent connections as "0-RTT rejected". It's not immediately clear how this would best be exposed on the API, since DialAddrEarly will return the connection struct directly, and now it needs to be substituted with a different connection.


Remove 'sh' entrypoint

Hi, I'm trying to use your image on GitLab CI, but where you've overridden the base Alpine image's entrypoint, it causes the job to fail. I believe it's because GitLab tries to use the CMD of sh itself:
sh: can't open 'sh': No such file or directory

The fix, I believe, is to just remove the ENTRYPOINT line from your Dockerfile entirely, and use the standard Alpine one, which works fine.

Hello @flyte,
I'm not sure about which runner you use, but overriding entrypoint seems possible in the Docker runner.
Could you try to override the entrypoint with a blank string like entrypoint: [""]?
Reference - https://gitlab.com/gitlab-org/gitlab-runner/-/issues/1421

I don't have control of the endpoint that Gitlab uses (I don't think) but
to be honest you probably want to remove that line anyway and stick with
the default Alpine one which does the same thing as you're intending with
this one, but works universally (try it!).
On Fri, 24 Jun 2022, 17:25 Sunghoon Kang, @.***> wrote:

Hello @flyte https://github.com/flyte,
I'm not sure about which runner you use, but overriding entrypoint seems
possible in the Docker runner
https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#overriding-the-entrypoint-of-an-image
.
Could you try to override the entrypoint with a blank string like entrypoint:
[""]?
Reference - https://gitlab.com/gitlab-org/gitlab-runner/-/issues/1421
—
Reply to this email directly, view it on GitHub
https://github.com/line/kubectl-kustomize/issues/9#issuecomment-1165734496,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAIZTWHC4W4WYOS5Q3BNTL3VQXORDANCNFSM5ZXLABSA
.
You are receiving this because you authored the thread.Message ID:
@.***>

@flyte Will be applied from next release 🙂

Thank you!
On Sat, 25 Jun 2022, 05:36 Sunghoon Kang, @.***> wrote:

@flyte https://github.com/flyte Will be applied from next release 🙂
—
Reply to this email directly, view it on GitHub
https://github.com/line/kubectl-kustomize/issues/9#issuecomment-1166190816,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAIZTWG7R6MTW5NPWUNH55LVQ2EEZANCNFSM5ZXLABSA
.
You are receiving this because you were mentioned.Message ID:
@.***>


Task 1024sat7

Related Tickets

#Ticket_ID

WHAT this PR does?

ex: Change number items completed/total in admin page.

Notes Impacted Areas

N/A.

Attachments

N/A.

ok


CU-2egggc8 NovaUtils. Improve type creation script.

Task linked: CU-2egggc8 NovaUtils. Improve type creation script.


UXP UI Canvas support

Dear UXP Developers, are you going to support HTML Canvas element on the UXP panel? It's impossible to create complex gradients, or process thumbnails images etc. on the panel without it. It was on the roadmap 2 years ago and I really really really need it (and it's not just me, I see this request popping up from time to time).
Thank you!

@anastasiuspernat HTML Canvas Support for basic shapes and styling will available now in UXP v7.0. This will be available in Photoshop beta soon in the next few weeks.
We will continue to work on adding more features to canvas like animations, images, text,etc which will be available in subsequent releases.


feat: handle the X-Databend-Route-Hint header returned from the server side

on some cases, the server will response a X-Databend-Route-Hint header in the response.
when server responded this header, the client should forget its own generated rout-hint, and remember the route-hint returned from the server.
this header is useful to keep the client session sticky on the same cluster when there're multiple clusters in the server side.
it seems that the jdbc driver still haven't processed this header from the server response yet.
may reference the logic in the go driver: https://github.com/databendlabs/databend-go/blob/main/client.go#L500

Hi @flaneur2020 , the jdbc has handle the logic as same as go driver,  maybe you can check here: https://github.com/databendlabs/databend-jdbc/blob/main/databend-client/src/main/java/com/databend/client/DatabendClientV1.java#L312

If so maybe we can delete this?
https://github.com/datafuselabs/databend-jdbc/blob/bab24f4cc34b741513497620f041ae1b9b2c3e44/databend-jdbc/src/main/java/com/databend/jdbc/ConnectionProperties.java#L254
private static class RouteHint
            extends AbstractConnectionProperty<String> {
        public RouteHint() {
            super("route_hint", NOT_REQUIRED, ALLOWED, STRING_CONVERTER);
        }
    }

It's no usage.

if the code is not being referenced, i guess it's good to clean it up 🤔

Hi @flaneur2020 , the jdbc has handle the logic as same as go driver, maybe you can check here: https://github.com/databendlabs/databend-jdbc/blob/main/databend-client/src/main/java/com/databend/client/DatabendClientV1.java#L312

thank you for clarifying this, i believe the behaviour is aligned with the go-driver.
here the implmenetation stores the it in additionalHeaders, while the go-driver stores it inside a field of the client struct. the final behaviour should be the same.

@TCeason https://github.com/databendlabs/databend-jdbc/pull/281 this pr clean up it, I will close this issue.


cgo: invalid flag in #cgo CFLAGS: -finput-charset=UTF-8

Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version go1.9.4 linux/amd64

This problem is absent in go1.9.3
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/peter/go"
GORACE=""
GOROOT="/my/opt/go"
GOTOOLDIR="/my/opt/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build425907123=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
go get github.com/pebbe/tokenize

What did you expect to see?
No output
What did you see instead?
go build github.com/pebbe/tokenize: invalid flag in #cgo CFLAGS: -finput-charset=UTF-8

There are more, similar errors with other packages:
go build github.com/andlabs/ui: invalid flag in #cgo CFLAGS: --std=c99

go build gopkg.in/qml.v1: invalid flag in #cgo CXXFLAGS: -pedantic-errors

@ianlancetaylor @rsc
https://go.googlesource.com/go/+/master/src/cmd/go/internal/work/security.go#61 should handle the first case, but it may be that we're not allowing two slashes in flags.
-pedantic-errors seems to simply be absent from the whitelist.
Adding needsdecision label to determine which release this should go in.

Closing in favor of a general issue to cover all whitelist options in #23749.


Use new pg:backups syntax

We attempted to do this in 5e789c3, but Heroku Toolbelt had some missing
functionality with respect to the new pg:backups syntax, and our code
retained the --expire flag, which is now automatic and no longer
allowed.
This change requires that users have version 3.32.0 of the Heroku
Toolbelt installed, but the old pgbackups:capture / pgbackups:restore
syntax and addon are being retired in the first week of May 2015, so we
need to do this to move on in any event (users who don't upgrade won't
be able to use the old parity either).
Close #29.

@croaky, @bernerdschaefer, @gabebw, and others, if any of the contributors can give this a try on their machine before we release, that would be awesome. We should try to get this out ASAP with a new release, as users are going to start losing access to the old pgbackups add-on over the course of the next week.


Disabling hash from filename / build ignores assetsDir

Version
3.0.0-rc.3
Reproduction link
https://codepen.io/anon/pen/zaXgNz
Steps to reproduce
Setup vue-cli , and use the setup of vue.config.js from the link above.
What is expected?
To have dist/assets/app.css
What is actually happening?
Without specifying the assets folder manually in the filename it ignores the assetsDir option.

I'm not sure you can specify a path in the file names. Please try:
module.exports = {
  css: {
    extract: {
      filename: '[name].css',
      chunkFilename: '[id].css'
    }
  }
}

@Akryum actually it works, the example on codepen is working. Just that it's weird to hack around that way :)

@Akryum Why is this closed ? The question remains on why a manual overwrite needs to happen since it doesn't respect the assetsDir setting

You issue wasn't clear to me. You mean the extracted CSS isn't under assetsDir?

@Akryum
That's correct, the CSS and JS aren't under assetsDir. Hence the hack of adding assetsDir + filename in chainWebpack and configureWebpack.
It should just work with
configureWebpack: {
    output: {
      filename: "[name].js",
      chunkFilename: "[name].js"
    }
  },

and not with
configureWebpack: {
    output: {
      filename: assetsDir + "/[name].js",
      chunkFilename: assetsDir + "/[name].js"
    }
  },

Or is the assetsDir not supposed to apply anymore once you manually overwrite the filename / chunkFilename ?

Or is the assetsDir not supposed to apply anymore once you manually overwrite the filename / chunkFilename ?

Yes, because we don't know what you really want. By default we set filename to assetsDir + '/css/[name].[contenthash:8].css', so if you overwrite it well it doesn't have assetsDir in it.
What you should do in vue.config.js:
module.exports = {
  css: {
    extract: {
      filename: 'my-assets/[name].css',
      chunkFilename: 'my-assets/[id].css'
    }
  }
}

I'm not sure if it's a good idea to modify the options the developer set up in vue.config.js since maybe he wants to put the css somewhere else. @yyx990803 any thoughts?

@Akryum
Well i would assume that a setting called assetsDir , is still used when overwriting the filename
I understand your reasoning though. Maybe an heads up in the documentation ?

Maybe an heads up in the documentation ?

Feel free to PR! 😸


Sentinel-1 VV VH backscatter DA (REWORKED)

Description
This PR is a reworked version of #1208
This PR:

Extracts the testcase that was added to the source code
Updates documentation
Reverts Config.pl to the Main branch
Removes unnecessary NaN check in LIS_historyMod.F90

Addresses #1192
Addresses #1012

Testcase

I have confirmed this replicates the testcase in #1208
I have confirmed this compiles with strict checks.

When compiled with GNU compilers, LIS crashes in enkf_Mod.F90 at line 319 with the message:
Error in `./LIS': malloc(): memory corruption:

When compiled with Intel compilers with additional debugging enabled, LIS crashes in LIS_DAobservationsMod.F90 at line 2051 with the message:
forrtl: severe (408): fort: (3): Subscript #2 of the array LIS_OBS_NGRIDS has value -1 which is less than the lower bound of 0

In S1_sigmaVVVHSMLAI/S1_sigmaVVVHSMLAI_Mod.F90, flist is used uninitialized.  This file also uses ls to create a list of files.  This should be replaced with a call to create_filelist.

Hi @jvgeiger
I addressed the issues that you raised in this PR https://github.com/cmclaug2/LISF/pull/1 for the branch of @cmclaug2. Results are zero-diff.
The only thing I could not test is the compilation with the GNU compiler. Hope the memory corruption is fixed as well. Let me know if there is anything else I can do to finalize this PR.
Thanks!

Hello.  I apologize for the delay.  We get to pull requests, issues, and discussions when time permits.  Unfortunately, other tasks kept coming up.  I will review your bug fixes and finish this pull request as soon as possible.


Colorbox picture title handling

Hi,
in  sigal/sigal/themes/colorbox/templates/index.html the titles are above a colorbox defined:
 {% if 'sigal.plugins.media_page' in settings.plugins %}

{% else %}

{% endif %}

As far as I understand this code, the real title (as defined in the xxx.md) is only used if the media_page plugin is enabled. For me it looks like these are two independent things (having the title and creating the dedicated html files per picture).
By the way, how can I get the whole text of the title shown below the image and not above ? I know, thats a colorbox setting, not sigal, but maybe somebody knows the right config for this.
Kind regards,
Thomas

Hi,
I think the title in the second case has not been updated, so media.filename should be replaced with media.title if media.title else media.filename.
For your second question, you can copy the theme somewhere, modify it (moving the title below the image should be enough) and tell sigal to use this theme.

Ok, thanks. I changed this in my local code.


create-react-app doesn't creating src and public folder

no description? no steps to reproduce? no nothing?


v0.3.0

Changelog
v0.3.0

Added method count_users

I would wait with that until we know what is actual behavior of search endpoint. Maybe we need to move to custom endpoint if that's not good enough.

I would wait with that until we know what is actual behavior of search endpoint. Maybe we need to move to custom endpoint if that's not good enough.

@nomysz This version is just to implement user count method, search with q parameters with be with the next version


Report output to a file

How can i log output of command ./kube-hunter.py --remote some.node.com to a file?

This should work if you're on linux or mac
./kube-hunter.py --remote some.node.com > my-report.txt

Thanks Julien. I am using Linux but apparently this is not working.. Any other recommendations?

@Richahasija to redirect output to a file, you can run:
./kube-hunter.py --remote some.node.com 2> my-report.txt
logging happens on stderr, this is why you should use 2>


proxy.bypass should support async functions

Describe the bug
I'm migrating our angular projects from webpack to esbuild/vite, and ran into a problem with the vite proxy: Any non-synchronous calls in proxy.bypass result in errors, though they kinda work:

If I return a Promise from the bypass function, I get a compile or typing error:

error TS2322: Type '(req: IncomingMessage, res: ServerResponse<IncomingMessage>, proxyOptions: ProxyOptions) => false | Promise<...> | undefined' is not assignable to type '(req: IncomingMessage, res: ServerResponse<IncomingMessage>, options: ProxyOptions) => string | false | void | null | undefined'.
  Type 'false | Promise<boolean> | undefined' is not assignable to type 'string | false | void | null | undefined'.
    Type 'Promise<boolean>' is not assignable to type 'string | false | void | null | undefined'.

I can tell from the code that there's no explicit support for Promises in the bypass implementation, and there are no tests, but interestingly it kinda works...

If I ignore / work around the type error, I get this error in the console for each proxied request:

8:14:57 PM [vite] http proxy error: Must provide a proper URL as target
Error: Must provide a proper URL as target
    at ProxyServer.<anonymous> (file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:39678:36)
    at viteProxyMiddleware (file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:40021:15)
    at call (file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:22418:7)
    at next (file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:22362:5)
    at viteCachedTransformMiddleware (file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:42209:5)
    at call (file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:22418:7)
    at next (file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:22362:5)
    at cors (file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:22890:7)
    at file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:22926:17
    at originCallback (file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:22916:15)

BUT the async call does complete successfully, and the browser receives the correct async proxied result.

If I add a placeholder / fake proxy.target value (as the error message suggests), it is used instead and resolves, and when my async bypass function completes it fails because the response has already been written. So I get 2 errors, eg:

8:18:45 PM [vite] http proxy error: /foo
Error: getaddrinfo ENOTFOUND not.localhost
    at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26)
node:_http_server:342
    throw new ERR_HTTP_HEADERS_SENT('write');
    ^

Error [ERR_HTTP_HEADERS_SENT]: Cannot write headers after they are sent to the client
    at ServerResponse.writeHead (node:_http_server:342:11)
    at Timeout._onTimeout (file:///C:/src/github/johncrim/vite-bugs/node_modules/.vite-temp/vite.config.ts.timestamp-1733717919201-ba46a9b806b2d.mjs:9:17)
    at listOnTimeout (node:internal/timers:581:17)
    at process.processTimers (node:internal/timers:519:7) {

Note that webpack's proxy bypass does support Promises.
Reproduction
https://github.com/johncrim/vite-bugs
Steps to reproduce
git checkout https://github.com/johncrim/vite-bugs
yarn
yarn dev --config vite.config.ts

Open the browser, then visit the /foo URL. The page displays after 3 seconds, but the error listed above is shown in the terminal.
I provided 2 forms of non-sychronous bypass functions, with and without Promises:
without Promises:
// vite.config.ts
import { defineConfig } from 'vite';

export default defineConfig({
  server: {
    proxy: {
      '/foo': {
        bypass: (req, res, options) => {
          setTimeout(() => {
            res.writeHead(200, {
              'Content-Type': 'text/plain'
            });
            res.end('Hello after 3 seconds (setTimeout)')
          }, 3000);
        },
        // The error message says a target is required, but
        // uncommenting this completely breaks the proxy.
        //target: 'http://not.localhost'
      }
    }
  }
})

with Promises:
// vite.config2.ts
import { defineConfig } from 'vite';

export default defineConfig({
  server: {
    proxy: {
      '/foo': {
        bypass: async (req, res, options) => {
          await timeout(3000);
          res.writeHead(200, {
            'Content-Type': 'text/plain'
          });
          res.end('Hello after 3 seconds (async timeout)')
        }
      }
    }
  }
})

function timeout(ms: number) {
  return new Promise<void>((resolve, reject) => {
    setTimeout(() => resolve(), ms);
  })
}

Both have the same problem. I think supporting Promise<false | string | void> in the bypass function would be ideal, and at a minimum the viteProxyMiddleware fn should exit after the bypass function is called if it doesn't return a string or false
System Info
System:
    OS: Windows 11 10.0.22631
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i9-12900H
    Memory: 6.24 GB / 31.68 GB
  Binaries:
    Node: 22.6.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
    npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (128.0.2739.67)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    vite: ^6.0.1 => 6.0.3

Used Package Manager
yarn
Logs
I don't believe the startup info is useful - this is a vanilla starter project with 2 custom config files. The error log is:

Error info inside
  vite:proxy /foo -> undefined +0ms
8:34:18 PM [vite] http proxy error: Must provide a proper URL as target
Error: Must provide a proper URL as target
    at ProxyServer.<anonymous> (file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:39678:36)
    at viteProxyMiddleware (file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:40021:15)
    at call (file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:22418:7)
    at next (file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:22362:5)
    at viteCachedTransformMiddleware (file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:42209:5)
    at call (file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:22418:7)
    at next (file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:22362:5)
    at cors (file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:22890:7)
    at file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:22926:17
    at originCallback (file:///C:/src/github/johncrim/vite-bugs/node_modules/vite/dist/node/chunks/dep-yUJfKD1i.js:22916:15)
  vite:time 3003.82ms /foo +0ms

Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

Here's another issue from 2.5 years ago asking for async proxy rewriting - the workaround the issue author came up with isn't an option for us b/c Angular doesn't support custom vite plugins.
If async bypass were supported, I think it makes sense to add async proxy rewriting at the same time.


AdnRevitApiLabsXtra Updated to 2019

Review the changes

Dear Naveen,
The changes you suggested for migrating the xtra labs from Revit 2020 to Revit 2019 turned out to be very useful after all.
I see that you caught a number of errors that have been lurking in there for a long time.
I integrated all the applicable fixes into the existing release 2<IP_ADDRESS> and created a new release 2<IP_ADDRESS> including them.
Here are the differences; you will recognise most of them as yours:
https://github.com/jeremytammik/AdnRevitApiLabsXtra/compare/2<IP_ADDRESS>...2<IP_ADDRESS>
thank you very much for the significant cleanup!
Now let's finally get the ADN labs migrated from 2018 to 2019 and continue from there.
cheers,
jeremy


Feature/fix 4

Patches bug where new Date() attributes are not serialized and sent to the server

Thank you!


libraw: 0.18.12 -> 0.19.0

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.
This update was made based on information from https://repology.org/metapackage/libraw/versions.
These checks were done:

built on NixOS
/nix/store/c152az463594l2si39h4assahzv5wv6r-libraw-0.19.0/bin/raw-identify passed the binary check.
/nix/store/c152az463594l2si39h4assahzv5wv6r-libraw-0.19.0/bin/unprocessed_raw passed the binary check.
/nix/store/c152az463594l2si39h4assahzv5wv6r-libraw-0.19.0/bin/4channels passed the binary check.
/nix/store/c152az463594l2si39h4assahzv5wv6r-libraw-0.19.0/bin/simple_dcraw passed the binary check.
/nix/store/c152az463594l2si39h4assahzv5wv6r-libraw-0.19.0/bin/mem_image passed the binary check.
/nix/store/c152az463594l2si39h4assahzv5wv6r-libraw-0.19.0/bin/dcraw_half passed the binary check.
/nix/store/c152az463594l2si39h4assahzv5wv6r-libraw-0.19.0/bin/half_mt passed the binary check.
/nix/store/c152az463594l2si39h4assahzv5wv6r-libraw-0.19.0/bin/multirender_test passed the binary check.
/nix/store/c152az463594l2si39h4assahzv5wv6r-libraw-0.19.0/bin/postprocessing_benchmark passed the binary check.
/nix/store/c152az463594l2si39h4assahzv5wv6r-libraw-0.19.0/bin/dcraw_emu passed the binary check.
10 of 10 passed binary check by having a zero exit code.
0 of 10 passed binary check by having the new version present in output.
found 0.19.0 with grep in /nix/store/c152az463594l2si39h4assahzv5wv6r-libraw-0.19.0
directory tree listing: https://gist.github.com/d21a46bb80b662baa7febf18eab4e313
du listing: https://gist.github.com/02a9d0af77dcf1045b4d3c5f7d17528f

meta.description for libraw is: '"Library for reading RAW files obtained from digital photo cameras (CRW/CR2, NEF, RAF, DNG, and others)"'.
This build is cached with Cachix. To use the cache follow these instructions:
One time setup in nixpkgs Git checkout:
cachix use r-ryantm
git remote add r-ryantm https://github.com/r-ryantm/nixpkgs.git

Test this build:
git fetch r-ryantm && git checkout 92d48c6a21a0fe1c814d611b8a923688404f83f0 && nix-shell --pure -I nixpkgs=. -p libraw

Success on x86_64-linux (full log)
Attempted: libraw
Partial log (click to expand)
shrinking RPATHs of ELF executables and libraries in /nix/store/aw0yi5m12aymbx97082sq2zq8p1f6c8h-libraw-0.19.0-dev
strip is /nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/aw0yi5m12aymbx97082sq2zq8p1f6c8h-libraw-0.19.0-dev/lib
patching script interpreter paths in /nix/store/aw0yi5m12aymbx97082sq2zq8p1f6c8h-libraw-0.19.0-dev
checking for references to /build in /nix/store/aw0yi5m12aymbx97082sq2zq8p1f6c8h-libraw-0.19.0-dev...
shrinking RPATHs of ELF executables and libraries in /nix/store/3j7frdy10kf0l46xsgahxq37y4lgc32i-libraw-0.19.0-doc
strip is /nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/3j7frdy10kf0l46xsgahxq37y4lgc32i-libraw-0.19.0-doc
checking for references to /build in /nix/store/3j7frdy10kf0l46xsgahxq37y4lgc32i-libraw-0.19.0-doc...
/nix/store/c152az463594l2si39h4assahzv5wv6r-libraw-0.19.0

Success on x86_64-darwin (full log)
Attempted: libraw
Partial log (click to expand)
patching script interpreter paths in /nix/store/fkpa8h5kalch3z38cccd9nr767lzbrl7-libraw-0.19.0
strip is /nix/store/7ddbq63v97nk8gkbf7gcsfmby37h6gbl-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/k1jvaswdy3kcqrj8pdjbwva15s7ncirg-libraw-0.19.0-lib/lib
patching script interpreter paths in /nix/store/k1jvaswdy3kcqrj8pdjbwva15s7ncirg-libraw-0.19.0-lib
strip is /nix/store/7ddbq63v97nk8gkbf7gcsfmby37h6gbl-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/fs1y4zbrsl7h0rb1miy1ah93gxa7s0s8-libraw-0.19.0-dev/lib
patching script interpreter paths in /nix/store/fs1y4zbrsl7h0rb1miy1ah93gxa7s0s8-libraw-0.19.0-dev
strip is /nix/store/7ddbq63v97nk8gkbf7gcsfmby37h6gbl-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/07dh0scsr35fkh6yir9qj44djxsvsfgf-libraw-0.19.0-doc
/nix/store/fkpa8h5kalch3z38cccd9nr767lzbrl7-libraw-0.19.0

Success on aarch64-linux (full log)
Attempted: libraw
Partial log (click to expand)
shrinking RPATHs of ELF executables and libraries in /nix/store/p1xsirhrfiw8hxlsdzs1cpv14zkyp0lg-libraw-0.19.0-dev
strip is /nix/store/0pjsgkxz0rp5baycq5sp2s72lrr5q9sg-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/p1xsirhrfiw8hxlsdzs1cpv14zkyp0lg-libraw-0.19.0-dev/lib
patching script interpreter paths in /nix/store/p1xsirhrfiw8hxlsdzs1cpv14zkyp0lg-libraw-0.19.0-dev
checking for references to /build in /nix/store/p1xsirhrfiw8hxlsdzs1cpv14zkyp0lg-libraw-0.19.0-dev...
shrinking RPATHs of ELF executables and libraries in /nix/store/yd7s55dp6m2xkyqz95xpwlkbziqhka93-libraw-0.19.0-doc
strip is /nix/store/0pjsgkxz0rp5baycq5sp2s72lrr5q9sg-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/yd7s55dp6m2xkyqz95xpwlkbziqhka93-libraw-0.19.0-doc
checking for references to /build in /nix/store/yd7s55dp6m2xkyqz95xpwlkbziqhka93-libraw-0.19.0-doc...
/nix/store/hm11lmikf95b2iddk7pvsq530fzsli61-libraw-0.19.0

This makes the krita build fail:
/build/krita-4.0.3/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.cpp: In member function 'bool KDcrawIface::KDcraw::Private::loadFromLibraw(const QString&, QByteArray&, int&, int&, int&)':
/build/krita-4.0.3/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.cpp:381:32: error: 'struct libraw_output_params_t' has no member named 'linenoise'
             raw.imgdata.params.linenoise    = m_parent->m_rawDecodingSettings.NRThreshold * 2.11E-5 + 0.00111111;
                                ^~~~~~~~~
/build/krita-4.0.3/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.cpp:382:32: error: 'struct libraw_output_params_t' has no member named 'cfaline'
             raw.imgdata.params.cfaline      = true;
                                ^~~~~~~
/build/krita-4.0.3/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.cpp:389:32: error: 'struct libraw_output_params_t' has no member named 'lclean'
             raw.imgdata.params.lclean       = m_parent->m_rawDecodingSettings.NRThreshold     * 5E-5;
                                ^~~~~~
/build/krita-4.0.3/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.cpp:390:32: error: 'struct libraw_output_params_t' has no member named 'cclean'
             raw.imgdata.params.cclean       = m_parent->m_rawDecodingSettings.NRChroThreshold * 5E-5;
                                ^~~~~~
/build/krita-4.0.3/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.cpp:391:32: error: 'struct libraw_output_params_t' has no member named 'cfa_clean'
             raw.imgdata.params.cfa_clean    = true;
                                ^~~~~~~~~
/build/krita-4.0.3/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.cpp:398:32: error: 'struct libraw_output_params_t' has no member named 'linenoise'
             raw.imgdata.params.linenoise    = 0;
                                ^~~~~~~~~
/build/krita-4.0.3/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.cpp:399:32: error: 'struct libraw_output_params_t' has no member named 'cfaline'
             raw.imgdata.params.cfaline      = false;
                                ^~~~~~~
/build/krita-4.0.3/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.cpp:400:32: error: 'struct libraw_output_params_t' has no member named 'lclean'
             raw.imgdata.params.lclean       = 0;
                                ^~~~~~
/build/krita-4.0.3/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.cpp:401:32: error: 'struct libraw_output_params_t' has no member named 'cclean'
             raw.imgdata.params.cclean       = 0;
                                ^~~~~~
/build/krita-4.0.3/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.cpp:402:32: error: 'struct libraw_output_params_t' has no member named 'cfa_clean'
             raw.imgdata.params.cfa_clean    = false;
                                ^~~~~~~~~
/build/krita-4.0.3/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.cpp:408:24: error: 'struct libraw_output_params_t' has no member named 'ca_correc'; did you mean 'exp_correc'?
     raw.imgdata.params.ca_correc  = m_parent->m_rawDecodingSettings.enableCACorrection;
                        ^~~~~~~~~
                        exp_correc
/build/krita-4.0.3/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.cpp:409:24: error: 'struct libraw_output_params_t' has no member named 'cared'
     raw.imgdata.params.cared      = m_parent->m_rawDecodingSettings.caMultiplier[0];
                        ^~~~~
/build/krita-4.0.3/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.cpp:410:24: error: 'struct libraw_output_params_t' has no member named 'cablue'
     raw.imgdata.params.cablue     = m_parent->m_rawDecodingSettings.caMultiplier[1];
                        ^~~~~~
/build/krita-4.0.3/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.cpp:464:24: error: 'struct libraw_output_params_t' has no member named 'eeci_refine'
     raw.imgdata.params.eeci_refine    = m_parent->m_rawDecodingSettings.eeciRefine;
                        ^~~~~~~~~~~
/build/krita-4.0.3/plugins/impex/raw/3rdparty/libkdcraw/src/kdcraw_p.cpp:465:24: error: 'struct libraw_output_params_t' has no member named 'es_med_passes'; did you mean 'med_passes'?
     raw.imgdata.params.es_med_passes  = m_parent->m_rawDecodingSettings.esMedPasses;
                        ^~~~~~~~~~~~~
                        med_passes

Success on aarch64-linux (full log)
Attempted: krita
Partial log (click to expand)
shrinking /nix/store/a7vqypi6gy02pkx157n62nvlfpmlxdjw-krita-4.1.3/lib/libkritawidgets.so.17.0.0
shrinking /nix/store/a7vqypi6gy02pkx157n62nvlfpmlxdjw-krita-4.1.3/lib/libkritawidgetutils.so.17.0.0
shrinking /nix/store/a7vqypi6gy02pkx157n62nvlfpmlxdjw-krita-4.1.3/lib/libkritaplugin.so.17.0.0
shrinking /nix/store/a7vqypi6gy02pkx157n62nvlfpmlxdjw-krita-4.1.3/lib/libkritaglobal.so.17.0.0
shrinking /nix/store/a7vqypi6gy02pkx157n62nvlfpmlxdjw-krita-4.1.3/lib/libkritaversion.so.17.0.0
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/a7vqypi6gy02pkx157n62nvlfpmlxdjw-krita-4.1.3/lib  /nix/store/a7vqypi6gy02pkx157n62nvlfpmlxdjw-krita-4.1.3/bin
patching script interpreter paths in /nix/store/a7vqypi6gy02pkx157n62nvlfpmlxdjw-krita-4.1.3
checking for references to /build in /nix/store/a7vqypi6gy02pkx157n62nvlfpmlxdjw-krita-4.1.3...
postPatchMkspecs


CLI command to trigger repo garbage collection

The UI button for repo garbage collection is not really usable as the operation seems to run for like 30 minutes with the browser stuck in the POST request with a moderate amount of repos present. I'd like to see a CLI command to trigger garbage collection on all repos (maybe also accept single repo argument) with some progress feedback on the CLI itself.
Would solve https://github.com/go-gitea/gitea/issues/7436 for me.

I wonder if it is generally safe to manually run git gc inside each repo directory.

I was under the impression that git gc was moved to queues...

I was under the impression that git gc was moved to queues...

It wasn't. Maybe it's better to use a queue than a cli command?
About performing the git gc action from command line, according to this it should be safe. The question is about Windows UNC paths, but the answers are not specific.

All operations on admin panel should be as a task on queue. And these tasks could be tracked.

It'd be great if there were at least some kind of feedback/progress info on the UI for the admin tasks. Clicking the GC button and having the browser stuck in a POST for 30+ mins is not very user-friendy.

About performing the git gc action from command line, according to this it should be safe

My question was more specific to gitea, e.g. does gitea need to clean any caches when I perform a manual git gc on a repo or is all repo data queried live? I guess certain git operations might fail during a gc operation when refs are being rewritten.

This could be added to the manager subcommand.
In general some of our gitea admin commands likely need to be adjusted to have the option to talk to a running gitea server rather than touch the database directly.

In general some of our gitea admin commands likely need to be adjusted to have the option to talk to a running gitea server rather than touch the database directly.

Agreed. The will cause problems sooner or later otherwise.

Yeah I guess it should talk to the API instead of modifying fs/db.
Regarding this PR, I think I may just be happy with https://github.com/go-gitea/gitea/pull/10629 if I get some feedback on gc on the UI.


Feature/thread pool metrics

Pull Request type

[ ] Bugfix
[x] Feature
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes (Please run ./gradlew generateLock saveLock to refresh dependencies)
[ ] WHOSUSING.md
[ ] Other (please describe):

Changes in this PR
Expose thread pool metrics
Describe the new behavior from this PR, and why it's needed
Issue #
Alternatives considered
Describe alternative implementation you have considered

@jxu-nflx if i may, i suggest that the commits are cleaned up before this PR is merged. It's hard to track history when there are superfluous commits like this one where only the imports are modified. https://github.com/Netflix/conductor/pull/2738/commits/dee7f9a5ec184295dc76d01041b5b06347dad1e4
One simple tool that i use, is the "--amend" option in the commit command. If the formatting is missed. i amend it to the previous commit rather than creating a new one.
Another option is to use "Squash & Merge" when doing the merge. There are also other options like rebase.

@jxu-nflx if i may, i suggest that the commits are cleaned up before this PR is merged. It's hard to track history when there are superfluous commits like this one where only the imports are modified. dee7f9a
One simple tool that i use, is the "--amend" option in the commit command. If the formatting is missed. i amend it to the previous commit rather than creating a new one.
Another option is to use "Squash & Merge" when doing the merge. There are also other options like rebase.

yea fixed now


Give txn_participation / txn tables more context about transactions

Problem
The txn_participation table becomes useless when trying to query info about an address as it relates to a specific asset.
for example, doing something like this:
SELECT * FROM txn_participation
LEFT JOIN txn on txn_participation.round = txn.round AND txn_participation.intra = txn.intra
WHERE addr = <ADDRESS> AND asset = <Random ASA/APP> LIMIT 1000;

will take forever on certain addresses due to the sheer number of txns they generate.
On the flipside, the txn table gives me no context on the sender and receiver of a txn which itself is hidden behind a deeply nested json blob making indexing it impossible. The sender / receiver is a core part of every txn and should be surfaced as such.
Solution
Add context to the txn_participation table regarding an asset or even better add context to the txn table regarding the sender and receiver of a txn instead of nestling it within a json blob.
Urgency
No urgency, but I think having the ability for a user to ask about the txns involved with a specific app/asset as it relates to some sender or receiver (whether that be another address, app, or asset) and have it not be an intensive query to run is important.

This table is specifically for matching accounts to transactions. It sounds like you might need a custom lookup table or index for the questions your trying to answer.


allow readonly only for volume with content source

It doesn't make sense to allow the creation of empty volumes which is going to be accessed with read-only mode, this commit allows the creation of volume which is having readonly capabilities only if the content source is set for the volume.
Signed-off-by: Madhu Rajanna<EMAIL_ADDRESS>

s/who is going to../which is going to.... in PR or commit description.

@humblec PTAL

/retest ci/centos/mini-e2e/k8s-1.18.5

/test commitlint

/retest ci/centos/mini-e2e

/retest ci/centos/mini-e2e-helm

/retest commitlint

@nixpanic modified cephfs ROX test case to create clone ROX PVC

/test commitlint

@Madhu-1 we expose this capability from our driver. So, by that it is meant, We support ROX PVCs regardless of volume Content Source. Isnt it ?

@Madhu-1 we expose this capability from our driver. So, by that it is meant, We support ROX PVCs regardless of volume Content Source. Isnt it ?

is there any use-case to support empty ROX PVC?
at least for RBD you cannot create a filesystem on rbd images as it's mapped with readonly

@Madhu-1 we expose this capability from our driver. So, by that it is meant, We support ROX PVCs regardless of volume Content Source. Isnt it ?

is there any use-case to support empty ROX PVC?
at least for RBD you cannot create a filesystem on rbd images as it's mapped with readonly

If the CSI spec does not prohibit creating an empty ROX volume, maybe we should just allow that too. I'd recommend to report it as a warning, like Uh, really?! Well, you asked for it, here is a read-only empty volume.

/test all

@Madhu-1 we expose this capability from our driver. So, by that it is meant, We support ROX PVCs regardless of volume Content Source. Isnt it ?

is there any use-case to support empty ROX PVC?
at least for RBD you cannot create a filesystem on rbd images as it's mapped with readonly

If the CSI spec does not prohibit creating an empty ROX volume, maybe we should just allow that too. I'd recommend to report it as a warning, like Uh, really?! Well, you asked for it, here is a read-only empty volume.

CSI spec may not prohibit it, it's up to the SP to support it or not.
Even if we report the warning, the warning will only be available in CSI logs it won't propagate to the User. again user has to come back and delete the Empty clone and create a new clone.

@mergifyio rebase

/test all

@mergifyio rebase

@humblec PTAL

@humblec PTAL


Update bugs section of high-resolution-time.json

The High Resolution Time API has been found to enable a "Spy in the Sandbox" class of security vulnerability. Full PDF of security research paper is at http://arxiv.org/pdf/1502.07373v2.pdf

@PublicStartup Can you reformat the "bug" object to consist just of a description? See the sample file and note that you can use markdown to include a link. Thanks.


adding support for QNX

I am cross compiling libtorch for QNX and I came across cpuinfo which does not have an implementation for QNX. Is there a way to build libtorch and bypass cpuinfo? Otherwise I will create an implementation for cpuinfo for QNX

@asobhy-qnx -- did anything come of this? If you came up with your own QNX implementation, would you mind sharing it?


The playback time of the exported Ogg audio file will be incorrect.

Your environment.

Version: Release or SHA
Browser: include version
Other Information - stacktraces, related issues, suggestions how to fix, links for us to have context

What did you do?

What did you expect?
If you see the PR(#1536 ) and there is no problem, please merge.
What happened?
When trying to record the microphone input of a user connected to webrtc using oggwriter.
An audio file with a playback time longer than the recorded time has been created. It doesn't actually play that time, and the header seems to be broken.
The default value for previousTimestamp is 1 instead of 0. The playback time of the ogg file created by it is supposed to be strange.
As a result, the value of previousGranulePosition starts with a large number, and the playback time becomes several hours or more.
I've created a modified PR so I'd be happy if you could review it for correctness.

Resolved by 1ffa87eb0733e7bfc6a50dcd2b2bac7d93c380ad
Thank you so much @BambooTuna

Hi
I am still seeing same issue, the ogg file created with opus code by using  oggwriter shows duration very large
When recorded a small ogg file of ~30 secs, it shows file duration as ~ 223 Hours, any headers or page info should I verify ?
I am using Pion WebRTC v3.0.17, and I can see this above changes are available


Please support ARM-based machine

I got the following error while running docker run -d --restart=on-failure --name my_workspace --cap-add=SYS_PTRACE --gpus all --shm-size=1024m -p 10022:22 -p 14000:4000  gezp/ubuntu-desktop:22.04-cu12.1.1:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
9254d6b71b2a006637d0597e84d90a3781dcb2e4a3a538aee3ef783060233443
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

I have tried to support it, but failed due to no release of Chrome browser for arm64, i don't know how to solve this problem, so i have no plan to support arm64 platform.

i use firefox instead of chrome browser, now, ubuntu desktop image for arm64 is supported! I only test image tag 22.04 on Raspberry Pi 4B with ubuntu desktop OS, it works well, but hardware GPU accelerated rendering isn't verified due to no nvidia gpu  on this platform.
by the way, which arm device do you use? the performance of arm device is poor and there are limited resources at chip, such as small memory space, and the desktop image is heavy compared to other normal docker image，so i don't think it's a good idea to run this image on arm devices.

done!


Support broadcast nested loop existence joins with no condition

Fixes #9086.  Adds code to handle unconditional nested loop existence joins in both the build left and build right cases along with tests.

build

build

build


feat: relate List.mapAccumr to List.foldr

Add lemmas that rewrite an application of List.mapAccumr or List.mapAccumr_2 into an application of List.foldr

Whoops, I tried to prove the second one with just the simp call as well, but didn't realize a final rfl was needed too.

bors merge


SMRT-1209 Adding Travis CI file

co-authored-by: Richard Jones<EMAIL_ADDRESS>

closing to fix ci issues


Add test for checking if MainContext Senders return errors when the R…

…eceiver is removed from the context

👍

Thanks, 👍


refactor: lint pr check update

Lint pr check update
:book: Description
JIRA TICKET: DLT-1527
Our current commit check checks the commit name if there is only one commit on a PR, and the PR title if there is more than one commit.
We did this previously because GitHub has no option to change this behaviour. Github has a new option to always “use pull request title” when doing a squash commit.
This has already been enabled on the repo but we need to change our commit naming check to no longer check the commit message, and only check the PR title.

This is awesome! Thanks.


Extension host terminated unexpectedly

Hi Team,
I have created a project to keep all my org backup codes in VS Code. Whenever I am trying to retrieve the source from  org in manifest, I am receiving errors stating that the host has terminated unexpectedly. I have re-installed and disabled all the extensions but still it is not working.
This is a major concern for me as I am unable to proceed with my development in vscode.
Please help me to resolve this issue as soon as possible.
Thank You,
Shramana

@Shramana21 Can you please follow the steps at https://github.com/microsoft/vscode/wiki/Native-Crash-Issues and attach a crash dump?

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


feat(esl-trigger): add esc key event handler

Requested to be released ASAP, but needs additional discussion regarding API (optionality of handling).

:tada: This PR is included in version 4.0.0-beta.11 :tada:
The release is available on:

npm package (@beta dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 4.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[Bug]: VSCode crashes when there is a cyclic dependency

Description
When the package has a cyclic dependency, the LS crashes with the following exception. The reason is that, if there are cyclic dependencies, the compilation is skipped and hence the semantic model is not accessible.
java.lang.IllegalStateException: Semantic model cannot be retrieved when the module is in compilation state. This is an internal error which will be fixed in a later release.
	at io.ballerina.projects.PackageCompilation.getSemanticModel(PackageCompilation.java:145)
	at io.ballerina.projects.SyntaxNodeAnalysisTaskRunner.runTasks(SyntaxNodeAnalysisTaskRunner.java:75)
	at io.ballerina.projects.SyntaxNodeAnalysisTaskRunner.runTasks(SyntaxNodeAnalysisTaskRunner.java:59)
	at io.ballerina.projects.SyntaxNodeAnalysisTaskRunner.runTasks(SyntaxNodeAnalysisTaskRunner.java:51)
	at io.ballerina.projects.CodeAnalyzerManager.runSyntaxNodeAnalysisTasks(CodeAnalyzerManager.java:108)
	at io.ballerina.projects.CodeAnalyzerManager.runCodeAnalyzerTasks(CodeAnalyzerManager.java:61)
	at io.ballerina.projects.PackageCompilation.compile(PackageCompilation.java:114)
	at io.ballerina.projects.PackageCompilation.from(PackageCompilation.java:94)
	at io.ballerina.projects.PackageContext.getPackageCompilation(PackageContext.java:214)
	at io.ballerina.projects.Package.getCompilation(Package.java:144)
	at org.ballerinalang.langserver.workspace.BallerinaWorkspaceManager.waitAndGetPackageCompilation(BallerinaWorkspaceManager.java:272)
	at org.ballerinalang.langserver.workspace.BallerinaWorkspaceManager.waitAndGetPackageCompilation(BallerinaWorkspaceManager.java:283)
	at org.ballerinalang.langserver.workspace.BallerinaWorkspaceManager.semanticModel(BallerinaWorkspaceManager.java:251)
	at org.ballerinalang.langserver.contexts.AbstractDocumentServiceContext.currentSemanticModel(AbstractDocumentServiceContext.java:238)
	at org.ballerinalang.langserver.hover.HoverUtil.getHover(HoverUtil.java:62)
	at org.ballerinalang.langserver.BallerinaTextDocumentService.lambda$hover$1(BallerinaTextDocumentService.java:170)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642)
	at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:479)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

Steps to Reproduce

Create a package with two modules
bal new foo && bal add mod1
Import foo in mod1 and vise versa

Affected Version(s)
2201.2.1
OS, DB, other environment details and versions
No response
Related area
-> Editor
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response

Currently, in the package resolution phase, diagnostics with the severity ERROR are only reported for severe issues such as version incompatibilities and cyclic dependencies in which case compilation cannot be continued.
Therefore in the CLI implementation, if there are errors in package resolution, we print the diagnostics and exit without continuing to compilation. I think we should do the same for language servers

With https://github.com/ballerina-platform/ballerina-lang/pull/37496 we have prevented access to the semanticModel when we have a  DiagnosticErrorCode.BAD_SAD_FROM_COMPILER. We can follow a similar approach here. In this particular case, LS does not crash, it simply returns an exception thrown when trying to access the semantic model. When we remove the cyclic dependency it works fine. However, as long as the cyclic dependency is there no features which depends on the semantic model will not work as it can't be accessed.


Dispose instances of test instantiation service

This will call sinon.restore() and prevent a memory leak
Part of #187471

Same for ExtensionRecommendationsService.

Instead of restoring on dispose, is it possible to hook at the end of each test file and restore?

I did a new change that restore the stubs after every test file - https://github.com/microsoft/vscode/pull/187496 - I ran some builds with this change enabling unit tests in windows 32 bit and they seem to run. But there is one unit test that is failing consistently in Mac.

I did a new change that restore the stubs after every test file - #187496 - I ran some builds with this change enabling unit tests in windows 32 bit and they seem to run. But there is one unit test that is failing consistently in Mac.

After discussing in standup the outcome was that we should properly clean up after each test/test suite and should not use a hook to restore after every test file.


Data corrupting when sending whole number as int16 with digits

When sending an object {id: 62, action: 2, values: [{v: 76}]}
with this schema:
const valueSchema = BufferSchema.schema('value', {
    v: { type: int16, digits: 3}
});

const actionSchema = BufferSchema.schema('action', {
    id: int16,
    action: uint8,
    values: [valueSchema],
});

The data arrives as {action: 2, id: 62, values: [{v: 10.464}]}
Even though the value of v does not have decimal places, it should arrive as "v: 76.000" at the very least.

Without a dot, your number would be 76000 which does not fit into an int16. Please try and use int32.
Please, if it work, add a note to the docs for other users.

Although Int16 can store 76, you set the digits to 3. This multiplies that 76 by 1000. The new number (76000) is too big to fit in Int16 so it loops around. The formula for the Int16 loop-around is something like this: -32768 + (76000 - 32768) which should come up to 10,464. That result gets divided by 1000 to be 10.464. you are getting the expected result.
With a digits value of 3, the maximum number allowed for Int16 would be 32.767 (minimum value would be -32.768). I suggest you use Int32 or lower your decimal place accuracy to 2.
I'll edit the readme.md today with a description of what digits does.

I recommend closing this as it is not a bug.


improvements for #655 issue

Codecov Report

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

@@          Coverage Diff           @@
##           master    #774   +/-   ##
======================================
  Coverage    6.23%   6.23%
======================================
  Files          93      93
  Lines        5033    5033
  Branches      455     455
======================================
  Hits          314     314
  Misses       4693    4693
  Partials       26      26

Continue to review full report at Codecov.

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

Could we get a screenshot of the final result, please? So that people can decide if they like the new one better?

I have tested this one, it looks like :

So, yes. Problem is solved. On the other hand numbers should be invisible when pictures appear.


NextJS support added

@Touqeer-tqr
Is the nextjs test running successfully for you? It seems to fail when I run it.


add: dat serve support

Support for dat serve based off an example script from @mafintosh. I think something simple like this might be very helpful for new users to get up and running with basic clone-push-pull stuff.

There are a few problems here--

You don't need to do db.status
defaults.js should be reserved for options that are available over all of the commands

good job!
I opened a PR here: https://github.com/maxogden/dat/pull/342