Provide this gem via rubygems.org?

The README suggests to use this gem from Github. However, I noticed that there is a gem at rubygems.org as well. Is this the same gem?
If yes, why is it not recommended in the README to use rubygems? If no, why not? :)

I believe the gem on rubygems is older and for Capistrano 2

@RogerE is it maintained by the same person?

@groe probably not, you can find a link to the repository at the rubygems.org page you linked to.

:+1: To this request.
Regarding the question in tydeyen/capistrano-maintence#14 of what to do about naming, what if this were to become capistrano3-maintenance, since the README specifically says to use capistrano ~> 3.0?
I'd really like to get this git dependency out of my Gemfile.

@kirs What is your take on that?

Yes please. Software meant for use should be released to rubygems.
The README for this repo says "Or install it yourself: $ gem install capistrano-maintenance"
However, if you do that, you get something that claims to be version 0.0.4.  However, this repo has a version file that claims to be 0.0.1.  I don't understand the relationship between the two. Is the actually released one an entirely different codebase that is only for cap2?  Then you're setting people up for confusion.
If you have or can get rubygems release rights for the "capistrano-maintenance" gem, I recommend releasing this one as 1.0.  If you can not, then you'll have to find another gem name, sure "capistrano3-maintenance" works.
Pretty please.

At the very least, please update the readme file to reflect the fact that this gem is not the one currently being served by rubygems.

Okay, if I don't hear otherwise, at some point I'm going to fork this and release it as capistrano3_maintenance. Unless someone else beats me to it, which would be great, because I don't plan to maintain this myself really.

Let's take one last shot. @kirs (cc @bruno- @leehambley @peterjmit @seenmyfate @swalkinshaw)
Current status: This gem is available only via git. An outdated gem with the same name is available via RubyGems. Confusing to everyone.
Proposed solution: The maintainer of the RubyGems-gem @tvdeyen is willing to give access to the gem name. We can provide this gem via rubygems using the name capistrano-maintenance.
Next Steps:

Increase version number to 1.0.0
Kindly ask @tvdeyen to set up access on rubygems
Push it to rubygems

Can someone from the capistrano team do that so we can resolve this confusion?
Otherwise we would have to go the fork way.

Either Kirs or I will help you, I'd suggest gem ownership to be transferred to you, and if you're fine with that, I'll set you up with R/W to this repository so you can make the changes you need

If @groe or @jrochkind don't want the responsibility of maintainership, I can take care of it. It sounds like Jonathan really doesn't want it and I'm not sure about @groe.

@leehambley Sure, I would be happy to take care of it!

Tell me what to do and I will happily transfer ownership of RubyGems and GitHub.

Thank you guys and sorry for late reply. It has been the busiest month during last year so far :confused:
@tvdeyen my RG username is<EMAIL_ADDRESS>No need to transfer, just add me the push access :yellow_heart:

@kirs done! I also released a last version (0.0.5) of my version that fixes the Capistrano dependency. So now you can publish a 0.1.0 or even a 1.0 release that supports Capistrano 3 \o/

@tvdeyen thank you!
I pushed the 1.0.0 version to RG.

Thank you all! I see you updated the README too, to gem 'capistrano-maintenance', '~> 1.0' instead of github direct clone. Thanks!

Awesome, thank you guys!


V6 - How to create a checkbox group

I need to create a slightly complicated checkbox group. I was able to get this working in V5 quite easily by accessing property values within my form code. But, I don't see how to do this in V6.
I have an array of vectorDatasets that I pass into my form using mapStateToProps/connect.  Each vectorDataset has an array of vectorFiles.  I create a checkbox for each vectorFile.
My model has a list of spatialAverages.  Each spatialAverage has a vectorFile.  In my form, a vectorFile checkbox should be checked if the array of spatialAverages contains a spatialAverage with spatialAverage.vectorFile.id === vectorDataset.id.
My data looks like this:
  {
    regions: [
      {
        spatialAverages: [
          {
            vectorFile: {
              id
              ...
            }
          }
          ...
        ]
      }
      ...
    ]
    ...
  }

Here's my attempt so far...
<FieldArray name={`${region}.spatialAverages`} component={spatialAverages =>

Spatial Averages

    {vectorDatasets.map((vectorDataset, i) => (

{vectorDataset.datasetId}

        {vectorDataset.files.map((vectorFile, j) =>

              <input type="checkbox"
                     name="spatialAverages"
                     value={vectorFile.id}
              />
              {vectorFile.name}

        )}

    ))}

}/>

Any suggestions as to how I might achieve this in V6?

Hey,
I wanted to achieve something similar and ended up creating an adapter:
// adapter.jsx
import React from 'react';
import { Field } from 'redux-form';

export const CHECKBOX = 'CHECKBOX';
export const CHECKBOXES = 'CHECKBOXES';

export default function adapter(key, props) {
  switch (key) {
    case CHECKBOX:
      return (
        <input type="checkbox" {...props} />
      );

    case CHECKBOXES:
      return (

          {props.options.map((option, index) => (
            <Field
              key={index}
              name={`${props.name}[${option.value}]`}
              label={option.label}
              checked={!!props.value[option.value]}
              component={CHECKBOX}
            />
          ))}

      );

    default:
      return null;
  }
}

/// MyForm.jsx
const weekdayOptions = [
  { value: 1, label: 'Monday' },
  { value: 2, label: 'Tuesday' },
  { value: 3, label: 'Wednesday' },
  { value: 4, label: 'Thursday' },
  { value: 5, label: 'Friday' },
  { value: 6, label: 'Saturday' },
  { value: 7, label: 'Sunday' },
];

<Field
  name="weekdays"
  label="Weekdays"
  component={CHECKBOXES}
  options={weekdayOptions}
/>

@hardchor I'm trying to get a multiselect checkbox working and I'm not sure I follow everything from your example above - can you explain the workflow in a bit more detail? I'm still very new to redux and redux-form and am trying to get some sort of multi-select option working one of my forms but I've spent the better part of 2 days and don't have it functional yet...

I would avoid this method, it create far more connected Field components then is needed. Each state update will re-render all the fields for each checkbox AND run your redux reducers.
better to use a single Field component and manage the state of child <input type="checkbox" /> components within that custom Field component.

@andrewmclagan can you provide example please? :)

import React from 'react';
import { FormGroup, ControlLabel, HelpBlock, Label } from 'react-bootstrap';

const Error = ({ meta : {touched, error} }) =>  (touched && error ? <HelpBlock>{error}</HelpBlock> : null);

const CheckboxGroup = ({ label, required, name, options,  input, meta}) => (
  <FormGroup controlId={name}>
    <ControlLabel>{label} { required && required }</ControlLabel>
      { options.map((option, index) => (

            <input type="checkbox"
                   name={`${name}[${index}]`}
                   value={option.name}
                   checked={input.value.indexOf(option.name) !== -1}
                   onChange={event => {
                     const newValue = [...input.value];
                     if(event.target.checked) {
                       newValue.push(option.name);
                     } else {
                       newValue.splice(newValue.indexOf(option.name), 1);
                     }

                     return input.onChange(newValue);
                   }}/>
            {option.name}

))
      }
    <Error meta={meta} />
  </FormGroup>
);

export default CheckboxGroup;`

@Crazy-Ivan may I ask for an example on how would you implement this?

I think @Crazy-Ivan comment should become part of documentation.

@Crazy-Ivan 's answer works this means onChange mutates the state before it dispatches the action?

@goldylucks @aftabnaveed @Crazy-Ivan
If any of you want to contribute to the project, that's a chance 😉  send us your docs PR!

@gustavohenke
I might take a swing at it with some guidance.
I'm using a simplified version of @Crazy-Ivan code.
Seeing how many people waste hours on a simple thing as checkboxes, how about I make a component for that?
with documentations, tests and everything of course :)

@goldylucks Sounds like a plan, I'm currently wasting hours, too :)

Ah, code changes aren't exactly what I was "hired" for 😁
@erikras is the best person to ask some suggestion, but he might take ages to look at this issue, so perhaps you should ping him on Twitter!
Anyway, I support your idea! 👍
If you could make sure that your component is not opinionated in terms of what the UI should look like, then IMO it's definitely an addition to the next release.

@gustavohenke
I'm not on twitter :o
The component will be fully customizable, and will support passing className and style for every part, so no worries about that.

For those who spent hours struggling with this,
here comes the rescue which modified from @Crazy-Ivan's
import React, {Component} from 'react';
import {Field} from "redux-form";
import PropTypes from 'prop-types';

export default class CheckboxGroup extends Component {

  static propTypes = {
    options: PropTypes.arrayOf(PropTypes.shape({
      label: PropTypes.string.isRequired,
      value: PropTypes.string.isRequired
    })).isRequired
  };

  field = ({input, meta, options}) => {

    const {name, onChange} = input;
    const {touched, error} = meta;
    const inputValue = input.value;

    const checkboxes = options.map(({label, value}, index) => {

      const handleChange = (event) => {
        const arr = [...inputValue];
        if (event.target.checked) {
          arr.push(value);
        }
        else {
          arr.splice(arr.indexOf(value), 1);
        }
        return onChange(arr);
      };
      const checked = inputValue.includes(value);
      return (
        <label key={`checkbox-${index}`}>
          <input type="checkbox" name={`${name}[${index}]`} value={value} checked={checked} onChange={handleChange} />
          {label}

      );
    });

    return (

{checkboxes}

        {touched && error &&
{error}
}

    );
  };

  render() {
    return <Field {...this.props} type="checkbox" component={this.field} />;
  }
}

And this is how you use it
const options = [
  {label: 'English', value: 'en'},
  {label: '繁體中文', value: 'zh-TW'},
  {label: 'Tibetan', value: 'bo'}
];

<CheckboxGroup name="langs" options={options} />

@kmsheng : I tried your solution and it works great, only touched is never updated because input.onBlur is not connected. I found it works best when putting it right before return onChange(arr);, like this:
import React, {Component} from 'react';
import {Field} from "redux-form";
import PropTypes from 'prop-types';

export default class CheckboxGroup extends Component {

  static propTypes = {
    options: PropTypes.arrayOf(PropTypes.shape({
      label: PropTypes.string.isRequired,
      value: PropTypes.string.isRequired
    })).isRequired
  };

  field = ({input, meta, options}) => {

    const {name, onChange, onBlur, onFocus} = input;
    const {touched, error} = meta;
    const inputValue = input.value;

    const checkboxes = options.map(({label, value}, index) => {

      const handleChange = (event) => {
        const arr = [...inputValue];
        if (event.target.checked) {
          arr.push(value);
        }
        else {
          arr.splice(arr.indexOf(value), 1);
        }
        onBlur(arr);
        return onChange(arr);
      };
      const checked = inputValue.includes(value);
      return (
        <label key={`checkbox-${index}`}>
          <input type="checkbox" name={`${name}[${index}]`} value={value} checked={checked} onChange={handleChange} onFocus={onFocus} />
          {label}

      );
    });

    return (

{checkboxes}

        {touched && error &&
{error}
}

    );
  };

  render() {
    return <Field {...this.props} type="checkbox" component={this.field} />;
  }
}

Hello, how a can return this in checkbox group
value: {
  values: ['one', 'two'],
  labels: ['One apple', 'Two apples'],
}

@jorrit  : I tried your code, the checkboxes don't get unticked or unticked when they are infocus. The first time it works, but if we try again without removing focus, the checkbox doesn't get unticked and the value is added to the array the second time.  Would you know why?

@Jaikant which browser is this? Are you using keyboard navigation to check/uncheck?

@jorrit I am using chrome on Mac with a mouse.

I don't know how I can help you. If the first example works for you, I guess you should use it.

I needed the same, but needed to extend the visualisation with custom components. In my use-case the choices also need to display images. And another one had to display images in another way.
So I created a package for this, based on @kmsheng 's example, located here: https://github.com/leroy0211/form-redux-checkbox-group
It's far from ready yet, and also not available on NPM. So please contribute!

@Crazy-Ivan
Happened to see your answer after Googling for a bit for Group checkbox. Thanks a ton! Got what I needed to work exactly. :)

I was hoping to achieve this without interfering with the onChange handler, here's how I did it if it helps anyone:
I am using redux-form-material-ui too
[
 { id: 'watermelon', label: 'I like watermelon.' },
 { id: 'pineapple', label: 'I like pineapple.' },
 { id: 'banana', label: 'I like bananas.' },
].map(food => (
 <FormControlLabel
   label={food.label}
   control={
     <Field
       name="favouriteFoods"
       component={Checkbox}
       normalize={(value, previousValue) => {
         if (value) {
           if (previousValue.includes(food.id)) return previousValue;
           return [...previousValue, food.id];
         }
         const i = previousValue.indexOf(food.id);
         if (i === -1)  return previousValue;
         return [
           ...previousValue.slice(0, i),
           ...previousValue.slice(i + 1),
         ];
       }}
       format={value => value.includes(food.id)}
     />}
 />
))

@kmsheng how can I handle the function to show preselect checkboxes ?
const checkboxes = options.map(({ label, value, check }, index) => {
      var execution = false
      var checked = check
      const handleChange = (event) => {
        const arr = [...inputValue];

        if (event.target.checked) {
          arr.push(value);
        }
        else {
          arr.splice(arr.indexOf(value), 1);
        }

        checked = !checked

        return onChange(arr);

      };

      return (
        <FormControlLabel
          control={<Checkbox name={`${name}[${index}]`} value={value} checked={checked} onChange={handleChange} />}
          label={label}
        />
      );
    });

but I am getting this error

TypeError: Invalid attempt to spread non-iterable instance

How can I get this to work with semantic-ui's Checkbox? I'm using redux-form, and to my understanding I need to hook up the component so I can read the value, using onChange and value like so:
onChange={(param, data) => props.input.onChange(data.value)}
value={props.input.value}

I've tried but I don't really understand how to combine this with the group code...

How about "check all/uncheck all" input, help me pls ?

@jorrit Hi! How i can set checked for existing checkbox from outside?

@Crazy-Ivan 's answer works this means onChange mutates the state before it dispatches the action?
me thinks that would be VERY beneficial to have in the docs, along with a modified version of Ivan's answer

Yes the user deployed some underground tech. I am not sure how to feel about it. There was also some intricate destructuring involved with the function params as well. Some serious cheese here,

For those who spent hours struggling with this,
here comes the rescue which modified from @Crazy-Ivan's
import React, {Component} from 'react';
import {Field} from "redux-form";
import PropTypes from 'prop-types';

export default class CheckboxGroup extends Component {

  static propTypes = {
    options: PropTypes.arrayOf(PropTypes.shape({
      label: PropTypes.string.isRequired,
      value: PropTypes.string.isRequired
    })).isRequired
  };

  field = ({input, meta, options}) => {

    const {name, onChange} = input;
    const {touched, error} = meta;
    const inputValue = input.value;

    const checkboxes = options.map(({label, value}, index) => {

      const handleChange = (event) => {
        const arr = [...inputValue];
        if (event.target.checked) {
          arr.push(value);
        }
        else {
          arr.splice(arr.indexOf(value), 1);
        }
        return onChange(arr);
      };
      const checked = inputValue.includes(value);
      return (
        <label key={`checkbox-${index}`}>
          <input type="checkbox" name={`${name}[${index}]`} value={value} checked={checked} onChange={handleChange} />
          {label}

      );
    });

    return (

{checkboxes}

        {touched && error &&
{error}
}

    );
  };

  render() {
    return <Field {...this.props} type="checkbox" component={this.field} />;
  }
}

And this is how you use it
const options = [
  {label: 'English', value: 'en'},
  {label: '繁體中文', value: 'zh-TW'},
  {label: 'Tibetan', value: 'bo'}
];

<CheckboxGroup name="langs" options={options} />

Your solution do worked like champ. Thank you.

@

For those who spent hours struggling with this,
here comes the rescue which modified from @Crazy-Ivan's
import React, {Component} from 'react';
import {Field} from "redux-form";
import PropTypes from 'prop-types';

export default class CheckboxGroup extends Component {

  static propTypes = {
    options: PropTypes.arrayOf(PropTypes.shape({
      label: PropTypes.string.isRequired,
      value: PropTypes.string.isRequired
    })).isRequired
  };

  field = ({input, meta, options}) => {

    const {name, onChange} = input;
    const {touched, error} = meta;
    const inputValue = input.value;

    const checkboxes = options.map(({label, value}, index) => {

      const handleChange = (event) => {
        const arr = [...inputValue];
        if (event.target.checked) {
          arr.push(value);
        }
        else {
          arr.splice(arr.indexOf(value), 1);
        }
        return onChange(arr);
      };
      const checked = inputValue.includes(value);
      return (
        <label key={`checkbox-${index}`}>
          <input type="checkbox" name={`${name}[${index}]`} value={value} checked={checked} onChange={handleChange} />
          {label}

      );
    });

    return (

{checkboxes}

        {touched && error &&
{error}
}

    );
  };

  render() {
    return <Field {...this.props} type="checkbox" component={this.field} />;
  }
}

And this is how you use it
const options = [
  {label: 'English', value: 'en'},
  {label: '繁體中文', value: 'zh-TW'},
  {label: 'Tibetan', value: 'bo'}
];

<CheckboxGroup name="langs" options={options} />

This worked like champ. Thank you.

@Crazy-Ivan, the CheckBoxGroup component is good but in my case I need it in Multi-select-box form. can you or any help in this?
I am struggling for hours with it to work in redux-form!!


English: Release translation from 12.97.0 till 12.108.1

Hi,
i've translated all release notes from 12.97.0 till 12.108.1.
If i should change sth, just hit me up here.
Greetings

also thanks for reviewing this :)


Using unsupported buffer type: 253  (parameter: 1) when trying to use the CLI

Setup

Latest version of diesel_cli
MySql 8.3.0 running in docker

Versions

Rust: rustc 1.75.0 (82e1608df 2023-12-21)
Diesel: 2.1.1
Database: MySql 8.3.0
Operating System MacOs

Feature Flags

diesel: mysql

Problem Description
When running any commands using the diesel command, the error below is given:
$: diesel migration list
Using unsupported buffer type: 253  (parameter: 1)

Its worth noting that diesel setup does create the database, but fails to run any migrations.
What are you trying to accomplish?
Running migrations
What is the expected output?
Migrations that run? Not sure what else to put here
What is the actual output?
$: diesel setup
Creating migrations directory at: [my_directories]/migrations
Creating database: DieselTest
Failed to run migrations: Using unsupported buffer type: 253  (parameter: 1)

Are you seeing any additional errors?
No
Steps to reproduce
Repo: https://github.com/watsom27/diesel_bug

Spin up the MySql docker

docker compose up

Try diesel command

diesel setup

Checklist

[x] I have already looked over the issue tracker and the discussion forum for similar possible closed issues.

[x] This issue can be reproduced on Rust's stable channel. (Your issue will be
closed if this is not the case)
[x] This issue can be reproduced without requiring a third party crate

Thanks for opening this issue and adding these details. I would say it is expected that diesel works with the latest libmysqlclient version, therefore that's likely a bug. So I reopen this issue.
Can you verify a detail:  You can fix this by just using a older libmysqlclient version with the newer database? (So client 8.0, database 8.3)

Can you verify a detail: You can fix this by just using a older libmysqlclient version with the newer database? (So client 8.0, database 8.3)

Correct, the 8.0 libmysqlclient seems to work with the 8.3 MySql docker image. Although I haven't done a full in depth test, but it creats the database and runs the migrations.

That really sounds like something changed fundamentally in the mysql client headers at the c side. In turn that means we likely need to update the generated bindings for that + adjust some code in diesel. Unfortunately I do currently not have the capacity to do all of that on my own, so I need to mark this as accepting contributions and let it sit here till someone spends the time to perform the necessary steps. (Given that this seems to happen on a minor mysql release I highly question their approach of handling breaking changes…)

@watsom27 It's totally fine to ask for help where to start and what to try. I know that the codebase is large and complex, so you are not expected to solve this completely on your own.
I would likely start by running at these tests with the new libmysqlclient version.
https://github.com/diesel-rs/diesel/blob/ad8ef479e1c6f926b940ad9a43877fc5a993ec5f/diesel/src/mysql/connection/bind.rs#L736
Given the error message in the bug report I would expect that just running them will produce some similar error. That should give use more information about which type is affected. Starting from there I would likely check the header files of the new and old libmysqlclient version to check if the relevant bind type for that sql type has changed. Maybe add some println statements in there and see how the values change between versions. If we have more information about which type is affected and why that happens we can discuss ways how to solve that without breaking compatibility with the old versions.

Share some investigation here (note: the line number might offset by 2-3 lines since I added some debug print).
last_error_number 2036
for test in tests::queryable_by_name::struct_with_no_table (at ./tests/queryable_by_name.rs:70:16)
// failed on this query
sql_query("SELECT 1 AS foo, 2 AS bar").get_result(conn);

downside I've tracked down to StatementIterator, which might be corrupt as early as
// the metadata returned by this api is not accessible from rust
let metadata = stmt.metadata(); // underlying delegate to `ffi::mysql_stmt_result_metadata`
// when trying to print fields of underlying raw pointer
println!("field_count: {}", (&unsafe { *result_ptr }).field_count); // this should be `2`, but `0` printed.
// when trying to print all fields via, segment faults with `(signal: 11, SIGSEGV: invalid memory reference)`
println!("fields: {:?}", metadata.fields());

by comparing st_mysql_res in mysqlclient-sys-0.2.5, I've add some comment to help alignment.
pub struct st_mysql_res {
    // uint64_t row_count;
    pub row_count: my_ulonglong,
    // MYSQL_FIELD *fields;
    pub fields: *mut MYSQL_FIELD,
    // struct MYSQL_DATA *data;
    pub data: *mut MYSQL_DATA,
    // MYSQL_ROWS *data_cursor;
    pub data_cursor: *mut MYSQL_ROWS,
    // unsigned long *lengths; /* column lengths of current row */
    pub lengths: *mut ::std::os::raw::c_ulong,
    // MYSQL *handle;          /* for unbuffered reads */
    pub handle: *mut MYSQL,
    // const struct MYSQL_METHODS *methods;
    pub methods: *const st_mysql_methods,
    // MYSQL_ROW row;         /* If unbuffered read */
    pub row: MYSQL_ROW,
    // MYSQL_ROW current_row; /* buffer to current row */
    pub current_row: MYSQL_ROW,
    // struct MEM_ROOT *field_alloc;
    pub field_alloc: MEM_ROOT, // This field is embedded in rust
    // unsigned int field_count, current_field;
    pub field_count: ::std::os::raw::c_uint,
    pub current_field: ::std::os::raw::c_uint,
    // bool eof; /* Used by mysql_fetch_row */
    pub eof: my_bool,
    // bool unbuffered_fetch_cancelled;
    pub unbuffered_fetch_cancelled: my_bool,
    // enum enum_resultset_metadata metadata;
    // void *extension;
    pub extension: *mut ::std::os::raw::c_void,
}

and corresponding C struct (from mysql master, 8.3.0)
typedef struct MYSQL_RES {
  uint64_t row_count;
  MYSQL_FIELD *fields;
  struct MYSQL_DATA *data;
  MYSQL_ROWS *data_cursor;
  unsigned long *lengths; /* column lengths of current row */
  MYSQL *handle;          /* for unbuffered reads */
  const struct MYSQL_METHODS *methods;
  MYSQL_ROW row;         /* If unbuffered read */
  MYSQL_ROW current_row; /* buffer to current row */
  // ------------------------
  // NOTE here in C struct, the MEM_ROOT is a pointer
  // ------------------------
  struct MEM_ROOT *field_alloc;
  unsigned int field_count, current_field;
  bool eof; /* Used by mysql_fetch_row */
  /* mysql_stmt_close() had to cancel this result */
  bool unbuffered_fetch_cancelled;
  // ------------------------
  // NOTE here in C struct, a new field not in `st_mysql_res`
  // ------------------------
  enum enum_resultset_metadata metadata;
  void *extension;
} MYSQL_RES;

Note that the difference in alignment of MYSQL_RES is not critical since we use ffi::mysql_num_fields and ffi::mysql_fetch_fields to access fields.
https://github.com/diesel-rs/diesel/blob/a5c82df865e0071f58b51aaad389a540423f8e83/diesel/src/mysql/connection/stmt/metadata.rs#L18-L28
But the difference (size) between st_mysql_field and MYSQL_FIELD would cause the error since we treat the return value as an array of MysqlFieldMetadata, or say &[st_mysql_field].
pub struct st_mysql_field {
    // char *name;
    pub name: *mut ::std::os::raw::c_char,
    // char *org_name;
    pub org_name: *mut ::std::os::raw::c_char,
    // char *table;
    pub table: *mut ::std::os::raw::c_char,
    // char *org_table;
    pub org_table: *mut ::std::os::raw::c_char,
    // char *db;
    pub db: *mut ::std::os::raw::c_char,
    // char *catalog;
    pub catalog: *mut ::std::os::raw::c_char,
    // /* THIS FIELD IS NOT PRESENT IN C STRUCT */
    pub def: *mut ::std::os::raw::c_char,
    // unsigned long length;
    pub length: ::std::os::raw::c_ulong,
    // unsigned long max_length;
    pub max_length: ::std::os::raw::c_ulong,
    // unsigned int name_length;
    pub name_length: ::std::os::raw::c_uint,
    // unsigned int org_name_length;
    pub org_name_length: ::std::os::raw::c_uint,
    // unsigned int table_length;
    pub table_length: ::std::os::raw::c_uint,
    // unsigned int org_table_length;
    pub org_table_length: ::std::os::raw::c_uint,
    // unsigned int db_length;
    pub db_length: ::std::os::raw::c_uint,
    // unsigned int catalog_length;
    pub catalog_length: ::std::os::raw::c_uint,
    // /* THIS FIELD IS NOT PRESENT IN C STRUCT */
    pub def_length: ::std::os::raw::c_uint,
    // unsigned int flags;
    pub flags: ::std::os::raw::c_uint,
    // unsigned int decimals;
    pub decimals: ::std::os::raw::c_uint,
    // unsigned int charsetnr;
    pub charsetnr: ::std::os::raw::c_uint,
    // enum enum_field_types type;
    pub type_: enum_field_types,
    // void *extension;
    pub extension: *mut ::std::os::raw::c_void,
}

I still can't see how specifying MYSQLCLIENT_LIB_DIR would bypass this.

Maybe we should updating bindings for mysqlclient-sys, https://github.com/sgrif/mysqlclient-sys/pull/24,
or not use a fix binding, instead we could generate one on build.

@clouds56 Thanks for investigating. That's really helpful :heart:
I've marked this as release blocker now, as we should resolve this before issuing a new release.
Given the current state of the mysqlclient-sys crate I would expect that this is unfortunately a bit more work than "just" updating the bindings.
We should likely setup a CI there as first step. After that we likely need to check if the new bindings also work with older versions otherwise that would be problematic.
I'm generally not a big fan of only generating the bindings at build time as that requires a dependency on bindgen, which in turn requires libclang, which might be problematic on windows.
(Help by all of this is appreciated.)

Hi Apple fans,
Thanks for @clouds56 investigation.
mysql 8.0.1 Remove my_bool and then added MYSQL_TYPE_INVALID, MYSQL_TYPE_BOOL and MYSQL_TYPE_TYPED_ARRAY fields for enum_field_types, so I just change mysql connection for macos mysqlclient 8.3.
And I also use rust-bindgen to autogen the bindings.rs for macos, so there is no need to maintain the bindings_os.rs any more.
Thanks,
Leslie Zhai

@xiangzhai Thanks for looking into this. This is likely a good starting point, but I fear it won't be as easy as just adjusting the code to work with the new version (only) as we also need to support older versions. I'm not sure yet how to do that.
As for auto generating the bindings: I would consider accepting a PR to mysqlclient-sys that adds that behind a feature flag. I do not want to have that enabled by default as it requires libclang to be present on the build system, which might not be the case on most windows systems.

it requires libclang to be present on the build system, which might not be the case on most windows systems.

I will play it on Windows :P


Feature Request: hash for Enum and IntEnum

Initial discussion https://gitter.im/numba/numba?at=5ef0a19f54d7862dc4a03f1f
Currently __hash__ is not implemented for Enum and IntEnum. Because of this they cannot be used as keys for typed.Dict which is a bit unfortunate.
The CPython implementation for hashing Enums is surprising simple, it is simply hash(name)
https://github.com/python/cpython/blob/b4e85cadfbc2b1b24ec5f3159e351dbacedaa5e0/Lib/enum.py#L641-L642
But unfortunately within numba Enums are currently lowered as their Value field only, so that the name field is not trivially accessible. Therefore implementing the __hash__ function may get tricky.
https://github.com/numba/numba/blob/ae598dbf252bad3917b76d9e9844e6ab59bcd218/numba/cpython/enumimpl.py#L55-L60
In case someone wants to look into this a few hints (or things that surprised me):
In [1]: from enum import Enum
   ...:
   ...: class Color(Enum):
   ...:     RED = 1
   ...:     BLUE = 2
   ...:     GREEN=3
   ...:     MAGENTA=1
   ...:

In [2]: type(Color)
Out[2]: enum.EnumMeta
# Enums are of type EnumMeta (but the type is called Enum in numba)

In [3]: type(Color.RED)
Out[3]: <enum 'Color'>
# Enum members are of type Enum (but the type is called EnumMember in numba)

In [4]: Color.RED.name
Out[4]: 'RED'

In [5]: Color.BLUE.name
Out[5]: 'BLUE'

In [6]: Color.MAGENTA.name
Out[6]: 'RED'
# Aliases (members with same value) seem to have their name set to the first member
# with this value, this is why all aliases have the same hash

@HPLegion thanks for submitting this, I have labeled it as a feature request.

Cheers!
In the meantime in case anyone else runs into a similar problem:
I managed to use IntEnums as typed.Dict keys by overloading __hash__ based on the value. For dictionary purposes this seems to be good enough, but the hashes will be different from those in CPython - so they should not be used for other purposes.
@numba.extending.overload_method(numba.types.EnumMember, '__hash__')
def enum_hash(val):
    def impl(val):
        return hash(val.value)
    return impl


Investigate issues with gevent.monkey.patch_all()

Is your feature request related to a problem? Please describe.
Users on an older version of gevent (1.5.0) reported that running gevent.monkey.patch_all() breaks workflow asyncio.
Describe the solution you'd like

Replicate the error on that gevent version (a simple workflow is probably fine)
Upgrade gevent to see if it still occurs

If not, essentially bisect to find offending version minimum and maybe document in README
If so, find workaround and document in README

Does this mean gevent with Temporal is meant to be a supported configuration? Do you need to use synchronous Activities to use gevent code?
Is there any documentation on the usage together? I tried looking for some earlier and couldn’t find it.

Does this mean gevent with Temporal is meant to be a supported configuration?

No, the SDK does use gevent in any way nor depend on it in any way. This is just a case where a user had an old gevent library in their existing code and it clashed with Temporal due to some bug in gevent's global side-effecting code that may have since been fixed. This issue is simply me acknowledging it so I can test and if necessary add a warning to the README for users of older gevent libraries.

Do you need to use synchronous Activities to use gevent code? Is there any documentation on the usage together? I tried looking for some earlier and couldn’t find it.

You may have to and there is no documentation here (nor is there with any Python async library integration beyond builtin asyncio). Synchronous activities are just normal functions that can do anything you'd do in a normal Python call, so yes you do have to use those for non-async def functions. I suppose you may technically be able to use something like https://github.com/gfmio/asyncio-gevent but I have not tested and in general would not recommend altering the built-in asyncio event loop implementation (or doing any of gevent's global "magic"/"patching" if you can avoid it).

Thanks for the context. I am planning on testing our gevent setup with Temporal. I will report back the results w/gevent version once I have done so

As a follow-up, we use gevent 1.3.7 and ran into a number of issues. We haven't done a full investigation but here are some of the things we did:

Only used synchronous activities
Set activity_executor to an instance of a gevent monekypatched concurrent.future.ThreadPoolExecutor
Avoided usage of any WorkflowHandle.result() calls (including execute_workflow) and prevented any gevent greenlets from executing

When things worked, it was awesome! Unfortunately, in general we experienced unpredictable behavior in our code where it would mysteriously hang indefinitely (usually around monkeypatched IO calls). We haven't had time to dig in and identify exactly where the incompatibility is. We have a general sense of uneasiness of using gevent monkeypatched code with asyncio code.
If I have time, I'm going to try an experiment where I run Temporal in a process forked off before gevent monkeypatching and using a cross-process executor. I don't expect it to work, but it is a fun exercise!

This is still failing on latest gevent (21.12.0) and temporalio (0.1b2).
Minimal code to reproduce:
from gevent.monkey import patch_thread; patch_thread()

import asyncio
from datetime import timedelta

from temporalio import activity
from temporalio import workflow
from temporalio.client import Client
from temporalio.service import RPCError, RPCStatusCode
from temporalio.worker import Worker

@activity.defn
async def get_name(prefix: str) -> str:
    return f"{prefix} angela"

@workflow.defn
class SimpleWorkflow:
    @workflow.run
    async def run(self) -> str:
        return await workflow.execute_activity(
            get_name,
            "Dear",
            start_to_close_timeout=timedelta(seconds=10),
        )

async def start_temporal():
    temporal_client = await Client.connect("localhost:7233")
    try:
        await temporal_client.start_workflow(
            SimpleWorkflow.run,
            id="simple_workflow",
            task_queue="test-queue",
        )
    except RPCError as e:
        if e.status is not RPCStatusCode.ALREADY_EXISTS:
            raise

    worker = Worker(
        temporal_client,
        task_queue="test-queue",
        workflows=[SimpleWorkflow],
        activities=[get_name],
    )
    await worker.run()

if __name__ == "__main__":
    asyncio.run(start_temporal())

Error
Failed handling activation on workflow with run ID f5df1f62-b1b3-4a84-8af8-0837c77e7208
Traceback (most recent call last):
  File "/Users/michase/workspace/ntflx/fastapi_temporal_poc/.venv/lib/python3.9/site-packages/temporalio/worker/workflow.py", line 186, in _handle_activation
    completion = await asyncio.wait_for(
  File "/Users/michase/.newt-cache/pyenv/versions/cpython-3.9.14/lib/python3.9/asyncio/tasks.py", line 435, in wait_for
    loop = events.get_running_loop()
RuntimeError: no running event loop
Failed completing activation on workflow with run ID f5df1f62-b1b3-4a84-8af8-0837c77e7208
Traceback (most recent call last):
  File "/Users/michase/workspace/ntflx/fastapi_temporal_poc/.venv/lib/python3.9/site-packages/temporalio/worker/workflow.py", line 234, in _handle_activation
    await self._bridge_worker().complete_workflow_activation(completion)
  File "/Users/michase/workspace/ntflx/fastapi_temporal_poc/.venv/lib/python3.9/site-packages/temporalio/bridge/worker.py", line 98, in complete_workflow_activation
    await self._ref.complete_workflow_activation(comp.SerializeToString())
RuntimeError: no running event loop

Explanation
NOTE that only threading needs to be patched
I believe there is something funky with how gevent patches thread locals and how thread locals are used to store the current event loop.
The code here that calls asyncio._set_running_loop(None) is overwriting the loop on the main thread instead of in the thread in use from spawning the workflow in a thread pool executor here. This happens on the main thread because the worker thread pool executor spawns greenlets instead of true threads. The greenlets run on the main thread. Under the hood, pure-python uses a thread local to manage the running loop and gevent should be patching that. However, cpython manages this using a c specific implementation that gevent cannot patch.
Similar to @alecgorge I tried to pass in a gevent.threadpool.ThreadPoolExecutor to the worker but the futures it returns are not asyncio compliant and raise ValueError for calls such as asyncio.ensure_future (which is invoked under wait_for). There may be a way to patch the gevent ThreadPoolExecutor in a simple subclass but I have not looked into that.
Potential fix
Use set_event_loop and get_event_loop instead. Those implementations do still use the underlying c calls for get_running_loop. However, with this I can push the worker into a real thread. The base event loop policy does not create a new loop in the non-main thread so it should prevent _get_running_loop from returning a value and, instead the event loop policy will be used for managing the loop. That maintains a thread local that can be patched.
I will add an example with this soon.

After a deep dive into the asyncio code I found that a running loop always sets the c specific thread local and there is no (easy) way around that.
That said, I was able to get the gevent ThreadPoolExecutor working with the following:
    worker = Worker(
        temporal_client,
        task_queue="test-queue",
        workflows=[SimpleWorkflow],
        activities=[get_name],
        workflow_task_executor=CFGThreadPool(4)
    )
    await worker.run()

class CFGThreadPool(gevent.threadpool.ThreadPoolExecutor):
    def _set_result_and_wake(self, fut, loop, result, exc_info):
        if fut.cancelled():
            return

        # call_soon_threadsafe wakes up the loop under the hood
        if exc_info is not None:
            loop.call_soon_threadsafe(fut.set_exception, exc_info)
        else:
            loop.call_soon_threadsafe(fut.set_result, result)

    def submit(self, func, *args, **kwargs):
        loop = asyncio.get_running_loop()
        fut = concurrent.futures.Future()

        @functools.wraps(func)
        def wrapper(*w_args, **w_kwargs) -> None:

            result = None
            exc_info = None

            try:
                result = func(*w_args, **w_kwargs)
            except Exception as ex:
                exc_info = ex

            self._set_result_and_wake(fut, loop, result, exc_info)

            return result

        super().submit(wrapper, *args, **kwargs)
        return fut

@reallistic - Thanks for this deep dive. I have this on my schedule to dig into and even write an integration test for (if isolatable, i.e. can "unpatch" afterwards).

Use set_event_loop and get_event_loop instead.

I think this is the right approach and we should do this if it in fact fixes it. Who knows who else is setting default event loops on threads somehow. I just set to None because I thought I was in control of the thread.

I just set to None because I thought I was in control of the thread.

This is 100% sane and reasonable. The issue is that gevent monkey patches pure python threading but not the c implementation.
Also, changing _(s|g)et_running_loop to (s|g)et_event_loop is a good idea to prevent changes in the private API from breaking things.
However, using those apis does not help out with gevent. This is because the main loop used to connect the client and run the Worker (not the _WorkflowInstanceImpl ) has to be running via either asyncio.run or loop.run_until_complete. Both implementations call _set_running_loop which sets the loop directly on the c thread local. The public get_event_loop call first calls _get_running_loop prior to consulting get_event_loop_policy().get_event_loop(). Thus, when gevent monkey patches threading, the main loop will always be returned effectively ignoring the public set_event_loop.
The only approach I can think of to allow gevent to work would be to use regular asyncio calls instead of a custom event loop. I recognize though that doing such an implementation would require a decent amount of work and you would lose the safeguards of preventing multi-threading etc.

Also, changing _(s|g)et_running_loop to (s|g)et_event_loop is a good idea to prevent changes in the private API from breaking things.

Completely agree, but there was something w/ the default event loop policy on some platform I think was causing me problems. But I forget what and I didn't document it, so will definitely try to move back to all public API.

The only approach I can think of [...]

We really have to keep our custom event loop. It's the underpinning of what makes workflows work well.
Maybe we can have a similar monkey patch that overrides gevent for the life of the run_once and then puts it back after. I'll have to check gevent, but surely we're not the first that have wanted to do advanced asyncio loop management in a gevent-enabled process. I'll have to dig into what they really do. I only need a short synchronous window to own the loop on a thread run.

I am happy to report I have succeeded combining gevent and Temporal: https://github.com/temporalio/samples-python/pull/84. @reallistic - I basically took your approach but I created a separate executor for running the asyncio event loop in a native gevent thread (separate from the executor that is used to execute workflow/activity tasks).
I will have to update the README in this repo with the update and then I'll be able to close this out I think.


Can not install

the link http://lunyx.net/CasualMeter/Setup.exe does not work. I download the CasualMeter-master zip file but it does not contain an .exe or setup file. Instructions on installation would be appreciated.

Does anyone keep up with this site?

Site owner is away now and can't fix it. Probably he will be back after weekend.
You have downloaded source code, you need MS Visual Studio to compile it.

Thanks I found my old setup file download file. But it will not launch. I have used the updater as well. Has there been an patch that broke it until it is updated again?

If your setup.exe is older than date of last patch in your server - it wouldn't work even if you unpack it manually. Update is working via the same site as download, so it will be working only when site will be back online.
You may try to combine your version of Casual with Tera.Core.dll and fresh database from latest shinrameter. If your Casual is not too old - it will work fine.

I'm having the same problem as Tehfreaks. Is there any chance you could put the setup files on Google Drive or Dropbox and give us the Download link? i really wanna use this but I cant access the website for the files

Updated my fork that have only one difference - disabled autoupdate.

Thanks, works great

Don't forget to go back to original installer version when site comes back online or you will need to check for updates manually.

I'm not sure why the web hosting keeps crashing as the server itself is still up.  I'll try to investigate this more, but for now, it's back up.

Updated to new host.


Implement fall damage for players

Thanks for the PR! This currently does not take into account liquids, where I think it should reset the fall distance. I'm just entirely not sure if simply checking if the player is inside of a liquid would be sufficient, because if the player was falling really quickly it might not have a movement where the position is inside of the liquid(?)

if the player was falling really quickly it might not have a movement where the position is inside of the liquid(?)

the 99% case would be landing in water on the ground, so the collision with the solid block would ensure it, no?

In a lot of cases, yes, but there are cases where people have water with signs under it to drop through. I don't know to what extent it would happen even with that though.

For now I'm just checking if the block at the player's position is equal to a liquid before attempting to apply any fall damage, and it seems to work. I don't think this should cause any issues?

That would break if the player first dropped through water, then hit the ground later.

Implemented the method you suggested, let me know if I'm missing anything

Looks good, thank you!


feat(server): improve random_url config handling

Description
Currently, in order to turn random URL's off, you must have at least one random_url declaration with a type and enabled = false.
This PR makes the random_url config optional while deprecating the enabled field without breaking current configs.
Motivation and Context
Closes #121
How Has This Been Tested?

cargo test
fixtures

Changelog Entry

### Changed

- Make the `random_url` config optional

```toml
# enabled
random_url = { type = "petname", words = 2, separator = "-" }

# disabled
# random_url = { type = "petname", words = 2, separator = "-" }
```

### Deprecated

- Deprecate `enabled` field in `random_url`

Types of Changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Documentation (no code change)
[ ] Refactor (refactoring production code)
[ ] Other

Checklist:

[x] My code follows the code style of this project.
[ ] I have updated the documentation accordingly.
[x] I have formatted the code with rustfmt.
[x] I checked the lints with clippy.
[x] I have added tests to cover my changes.
[x] All new and existing tests passed.

Codecov Report
Patch coverage: 87.50% and project coverage change: -0.03% :warning:

Comparison is base (679a264) 69.47% compared to head (554c4b1) 69.44%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #122      +/-   ##
==========================================
- Coverage   69.47%   69.44%   -0.03%
==========================================
  Files          11       11
  Lines         557      563       +6
==========================================
+ Hits          387      391       +4
- Misses        170      172       +2

Flag
Coverage Δ

unit-tests
69.44% <87.50%> (-0.03%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed
Coverage Δ

src/config.rs
60.86% <0.00%> (-5.80%)
:arrow_down:

src/server.rs
82.08% <ø> (ø)

src/paste.rs
85.34% <100.00%> (+0.38%)
:arrow_up:

src/random.rs
84.61% <100.00%> (+1.28%)
:arrow_up:

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


LLDP Packet failed to validate!

Intense packet flows cause the problem.
The only problem it causes is packet loss that after some time gets resolved and then comes back.
Log:
WARN  [LinkDiscovery] LLDP Packet failed to validate!
Detecting LLDP packets and flagging them to be immune to SRv6 and INT injections, and/or IPv6 encapsulation (if they are triggered as) must solve the problem.
It may also just be a Mininet problem

The upgrade of the stratum image to a newer version solved the problem.


Installation failed with pip

I tried to install pyethereum via pip with the command:
sudo pip install ethereum

But installation failed and error log is
error in ethereum setup command: 'tests_require' must be a string or list of strings containing valid project/version requirement specifiers; Unordered types are not allowed

I'm getting this error as well would love to find a fix.


[Feature Request] Store Credit

Allow shop owners to set up store credit so that we can give it out as rewards for certain things

You could definitely do this yourself with a bit of event hook trickery. Some things you'd have to figure out:

Do purchases by default use store credits?

if yes, you'll have to figure out how to refund the transaction within the hook without erroring (which fails the transaction, halting the handling of the purchase)
if no, you'll have to figure out the users intentions, when they want to use store credits vs. when they don't

If the transaction fails, are you okay with just giving them back krist? If not, you're either going to have to cover every case where radon gives back a refund (found in handlePurchase), or do all checks to make sure that the purchase is valid in the preProduct hook. Both are very possible, I do the former somewhat with my shop network.


Using interrogate as Sphinx extension

I have made a prototype to integrate documentation coverage results directly into a Sphinx documentation.
Are you interested in a cooperation?
Could you support this?

Interesting - is this essentially just like HTML support, like how coverage report can generate? How are you imagining this integrating into interrogate?

(Sorry I just noticed, I never updated the post with updated links to my prototype.
Now I added links to https://pytooling.github.io/sphinx-reports/)

The integration is different from coverage report or coverage html, when you refer to Coverage.py.
These commands generate:

report → a coverage report on console,
json → a coverage report converted to JSON,
xml → a coverage report converted to XML,
html → a coverage report rendered as HTML pages.

When it comes to code coverage (statement coverage and branch coverage), I can read XML and/or JSON files. See this page: https://pytooling.github.io/sphinx-reports/coverage/index.html for a demonstration.
Besides this I can also read and render unit test results. See https://pytooling.github.io/sphinx-reports/unittests/index.html for a demonstration.

But lets stay with documentation coverage, as this is the topic of interrogate. The current results are visible here: https://pytooling.github.io/sphinx-reports/DocCoverage.html
Currently, I use """docstr-coverage""" as a backend, but the code is written in a way that I could support other backends too. The usage is explained here: https://pytooling.github.io/sphinx-reports/DocCov/index.html
Essentially:

Define Python packages to investigate.
Refer to this package by an ID in a ReST directive.
(This allows for multiple source directories or packages to be referenced individually by the ReST documentation.)

Are you interested?

How to integrate it?
So it's not that interrogate creates some outputs, it the other ways around, I import interrogate and need an API to hand over files/directories for analysis and I get a data structure containing the coverage statistics.
I can convert from your data model to my data model, but I would prefer if we can find a common ground. Besides writing such Sphinx plugins, I spend some time in writing unified data models for libraries I need to fulfill my final goals (EDA²). That's why I have created a generalized data model for Code Coverage for Python code and I would like to generalize it further for any programming language (future work).
We can discuss pros and con of my data model, what parts are maybe missing for interrogate, etc. Such a process of a data model adaption (if wished) can also be an incremental path.
In future I would be interested in some kind of rules or settings to enforce or exclude certain objects from coverage counting. E.g. do nested function need a documentation? User should be able to tune the results.
What advantages are given by Sphinx?

The documentation coverage report can be an appendix to the documentation (handwritten + auto generated parts) and strengthen the quality of an open-source Python package.
The report is generated in Sphinx intermediate documentation representation form an can be converted to any output format.

What are future plans?
Have a per file (module) coloring of Python language constructs (variable, class, function, method, ...) colored with green, red, ... background (similar to Coverage.py HTML reports for used/unused code).


Exchange member endpoint is slow

Description
The API endpoint for a project getting member-specific information is very slow. This is leading to Heroku alerts about long responses.
The URL for the endpoint is /api/direct-sharing/project/exchange-member/.
Example
The following situation reproduces a long response...

Running the site locally
Using read-only access to the production database
Using requests to call this endpoint with an access token corresponding to the in-development PersonalDataAPI project (project id: 187) and member madprime

This was uncovered through the Overland project which (accidentally) amassed 300+ small files for some members.
With so many files the bottleneck probably is the S3 signing of download links returned when doing the exchange-member. In the most extreme case observed this leads to a page load time of >30 seconds, which in turn is terminated by Heroku.

Added the affects-users label as users will be unable to load the activity page in such cases as well due to the heroku timeout.

In addition to the API endpoint, activity pages with premade S3 links are also failing when there's too many files. We think we should extend the public file URL method to work for private files, using some sort of token authorization. This URL then redirects to an S3 link generated on the fly, one file at a time.

Closed via #935 and #937


feat: enable use of cypress cloud to record runs as video

Please check the following
Enable use of cypress cloud to record test run videos

[ ] Do the tests still pass? (see Run the Tests)
[ ] Is the code formatted properly? (see Linting (Formatting))
For New Features:

[ ] Have tests been added to cover any new features or fixes?
[ ] Has the documentation been updated accordingly?

Please describe additional details for testing this change

@itsalaidbacklife is there any sort of limit to the number of recordings or anything that we also need to implement?

@seriouslysean no there is no limit on the number of test runs with the open source plan for cypress cloud (which we're set up for already). We get up to 5 users so I can add you as well.
Also I had video configured to record but I'm turning that off because it slows the runs down by ~50%. I figure this way we can turn video on to troubleshoot a flaky test but we'll have the screenshots and run history organized in cypress cloud


allow re-use of NoSetterOnServiceRule

really like the NoSetterOnServiceRule rule, but it doesnt fit our naming convention
would it be possible to make the regex which matches the Service-Classes a parameter?
atm there is a blacklist used, but I feel it would be easier to apply the rule to our architecture by using a whitelist (e.g. classnames ending in Service)

Sure :+1: go for it

Closing as not an issue and suggestion is accepted. Feel free to send PR :+1:


Replacing before_filter with before_action s it is deprecated in Rails 5

@wunderbart, I will need it for Rails 5 upgrade in community

👍  if it works :trollface:

https://build.lonelyplanet.com/job/Homepage-Branch-Build/60/console :trolleybus:


"enum" parameter bitstream mapping

consider this somewhat pointless example of a primitive the end user might instantiate
module LOGIC_GATE(input A, B, output X);
parameter MODE = "AND";
generate
   if (MODE == "AND") assign X = A & B;
   else if (MODE == "OR") assign X = A | B;
   else if (MODE == "XOR") assign X = A ^ B;
endgenerate
endmodule

this would generate a FASM configuration feature in nextpnr like X6Y9A.MODE.AND or X6Y9A.MODE.XOR
the underlying hardware primitive might look like
module LOGIC_GATE(input A, B, input [1:0] ConfigBits, output X);
parameter MODE = "AND";

assign X = (ConfigBits == 2'b01) ? (A & B) :
   (ConfigBits == 2'b10) ? (A | B) :
  (ConfigBits == 2'b11) ? (A ^ B) :
  1'bx;

endmodule

we now need some way of specifying the mapping of
MODE.AND => ConfigBits[1:0]=2'b01
MODE.OR => ConfigBits[1:0]=2'b10
MODE.XOR => ConfigBits[1:0]=2'b11

the encoding being just an example, others might be possible
one way of doing this using attributes might be like
(* FABulous, BelMap,
MODE_start=0,
MODE_end=1,
MODE_enum,
MODE_AND=2'b01,
MODE_OR=2'b10,
MODE_XOR=2'b11,
*)

essentially, we need to specify more things for MODE than just a single bit mapping - the range of bits it maps to and the set of possible values. Same for multi-bit non-enumarated configuration values (like the initial accumulator value of a DSP), which in this syntax could perhaps just specify _start and _end attributes without any of the enum stuff.

I am thinking maybe something like this:
(* FABulous, BelEnum, MODE.
ADD,
OR,
XOR
*)
(* Fabulous, BelMap,
start=0,
end=1,
some_init_value=Vector(2)
MODE
*)

Then the AND, OR, XOR will get automatically assigned to b00, b01, b10.  This might make parsing multiple enums easier. The Vector(2) will be indicated using 2 bits for the some_init_value

Then the AND, OR, XOR will get automatically assigned to b00, b01, b10

We want to have the ability to support custom encodings though.
Actually, Dirk did suggest out-of-band going back to hot comments here, if that's easier to work with. Something like
// bitstream encoding
// parameter MODE [1:0]
// AND=2'b01
// ..
// end MODE

this would specify that MODE is located in bits 1..0 and the encoding of AND etc
but we could maybe have something like this as attributes still too?

I don't think going back to comment will be a good idea.
This should just do the same,
(* FABulous, BelEnum, MODE[1:0],
ADD=01,
OR=10,
XOR=11
*)

Looks good!

Now the following Bel map:
(* FABulous, BelEnum, MODE1[1:0],
A=001,
B=010,
C=011,
*)
(* FABulous, BelEnum, MODE2[0:1],
ADD=01,
OR=10,
XOR=11
*)
(* Fabulous, BelMap,
test=0,
MODE2,
some_init_value1=1:0,
some_init_value2=0:1,
MODE1
*)

will yield the following dictionary after parsing.
{
   "test":{
      "0":{
         "0":"1"
      }
   },
   "MODE2":{
      "ADD":{
         "0":"0",
         "1":"1"
      },
      "OR":{
         "0":"1",
         "1":"0"
      },
      "XOR":{
         "0":"1",
         "1":"1"
      }
   },
   "some_init_value1":{
      "3":{
         "1":"1",
         "0":"1"
      },
      "2":{
         "1":"1",
         "0":"0"
      },
      "1":{
         "1":"0",
         "0":"1"
      },
      "0":{
         "1":"0",
         "0":"0"
      }
   },
   "some_init_value2":{
      "0":{
         "1":"1",
         "0":"1"
      },
      "1":{
         "1":"1",
         "0":"0"
      },
      "2":{
         "1":"0",
         "0":"1"
      },
      "3":{
         "1":"0",
         "0":"0"
      }
   },
   "MODE1":{
      "A":{
         "1":"0",
         "0":"0"
      },
      "B":{
         "1":"0",
         "0":"1"
      },
      "C":{
         "1":"0",
         "0":"1"
      }
   }
}

I have further looked into bitstream generation to support with an enum, but it looks like that will also require refactoring.

looks good!


optimize: add klog for debuging requests with apiserver

Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (5140372) 38.13% compared to head (4186040) 38.13%.

Additional details and impacted files

@@           Coverage Diff           @@
##             main     #830   +/-   ##
=======================================
  Coverage   38.13%   38.13%
=======================================
  Files          61       61
  Lines       10428    10428
=======================================
  Hits         3977     3977
  Misses       6152     6152
  Partials      299      299


Error: couldn't find flv

I try and it not working. error:
Error: couldn't find flv
at IncomingMessage.<anonymous> (C:\Users\admin\Desktop\grabs\node_modules\xvideos\xvideos.js:67:19)

This module is a joke. Don't be too surprised that it's broken.


Add check JH dashboard visibility

Adds a check to see if the Dashboard is visible
Skips the spawner automation test in the default testcase when the user has a running pod
Signed-off-by: Landon LaSmith<EMAIL_ADDRESS>

:+1:  testing this out

That test is getting skipped as intended
==============================================================================
Test
Logged into OpenShift                                                 | PASS |
Can Launch Jupyterhub                                                 | PASS |
Can Login to Jupyterhub                                               | PASS |
Can Spawn Notebook                                                    | PASS |
SKIP:The user has an existing notebook pod running
Can Launch Python3                                                    | FAIL |
Link with locator 'Python 3' not found.
Test                                                                  | FAIL |
5 critical tests, 4 passed, 1 failed
5 tests total, 4 passed, 1 failed


Fix sideways scrolling on service priority organisation pages

Fixes https://www.pivotaltracker.com/story/show/92350934
Zendesk: https://govuk.zendesk.com/tickets/974685
The .service-priority class was including grid-row styles to contain floats, but this came with a negative margin. This negative margin caused sideways scrolling on thin page widths. Instead use the existing floated-children class on the inner block to contain the floats (and alter padding at different screen sizes) and stop extending with grid-row.
Outcome is a page that looks exactly the same but doesn’t sideways scroll.
Example of live bug: https://www.gov.uk/government/organisations/driver-and-vehicle-standards-agency

:+1:


keyboard layouts switches to US when running as sudo on mac

System details:
OS: MacOS Mojave - 10.14.2
VSCode - 10.30.2
Extensions: None
Setup / Problem:
SSH mounted directory, which has some specific permissions that is not allowed to be changed. Due to the VS code always asks for admin user password on save. Because of that i run Code as sudo. with this script sudo "/Applications/Visual Studio Code.app/Contents/MacOS/Electron" &>/dev/null &. When Code opens I now have US keyboard layout despite the fact I have a nordic keyboard. This only happens when I tun code as sudo. Code uses the correct keyboard layout (nordic) when I start normally (e.g code in terminal or open by shortcut).
Reproducible steps:

Have a nordic keyboard (don't know if the bug is present for other non-us keyboards)
Start VSCode with the script (sudo "/Applications/Visual Studio Code.app/Contents/MacOS/Electron" &>/dev/null &)
Try create/edit a file and the keyboard in VSCode is not corresponding to the actual keyboard.
Quit VSCode
Try to open code with code in terminal
Now it is the correct keyboard layout.

Expectation: Adopt keyboard layout from actual keyboard.
Reality: Sudo use forces us keyboard layout
Edit:
I use the Logitech K750-mac keyboard nordic/danish layout

Is there any software you use that you can launch with sudo which respects the user selected keyboard layout? I think perhaps this is the way macOS works... What happens if you launch Chrome from the terminal as root? What keyboard layout does it use?

I think it's a (bug?) in MacOS Mojave because it's working fine opening programs as sudo in MacOS High Sierra 10.13.6 - it respects user keyboard layout. Something happened between this version an MacOS Mojave where opening any program as sudo always forces US keyboard layout.
I've opened a bug report at Apple 6 months ago - but no answer at all.
This is very frustrating as the majority of the time in my job I require to open IDE's with sudo, but this "bug" really slows my effectivity and productivity because I always have to provide my sudo/user password when eg. saving a file.
So even though Apple might not fix this in the shortrun, I think you could investigate how to improve this - because it's a problem for many users (I've talked to over the past 6 months).
Regards Rasmus.

I am also having this issue on Mojave and it is very annoying... I need to run as sudo, but if I do I can't use my external keyboard because the layout is messed up.....

I'm having this bug as well. Any updates?

I don't like my solution, but since I run on a virtual environment, my solution, if you are running on Linux, Mac or BSD, is to run on the folder of the project I am working with sudo chmod -R 777 ., this gives all rights to edit the project folder, so I do not have to run visual studio as admin. Not a definitive solution and of course not good for all workflows, but to me that suffice. Not what I wanted, but while this bug still exists may help someone.


Update form_helper.rb

If the form has other stimulus controllers then they get overwritten by the strada_form_with helper. This change will merge them together. e.g.
    <%= strada_form_with(
      model: person,
      data: {
        controller: "person",

I thought I would submit this change here in case others are using this for inspiration like I did.

Thanks for this!
Do we need to split then join the controllers, though? I feel like we could do this instead, right?
"#{options.dig(:data, :controller)} "bridge--form"

Actually I noticed that my change will fail whenever the data key does not exist, I think dig will fix this. Will make some changes on this and resubmit.

Any update on this @rachelgraves ?

@scarroll32 I think I fixed this on my project but I never got around to pushing it here. I'll see if I can dig it out this afternoon :)

@scarroll32 @joemasilotti updated using dig.

@scarroll32 @joemasilotti updated using dig.

Thank yo @rachelgraves !!


Allow clients to notify bsp servers of modified files

We should add the didChangeWatchedFiles notification to the bsp specification, and also add a mechanism for servers to register for these notifications at the beginning of the connection (in LSP this is done via dynamic capabilities).
The didChangeWatchedFiles is already implemented in LSP (https://microsoft.github.io/language-server-protocol/specification#workspace_didChangeWatchedFiles). It exists because of the following reasons, explained in the document:

to our experience getting file watching on disk right is challenging, especially if it needs to be supported across multiple OSes.
file watching is not for free especially if the implementation uses some sort of polling and keeps a file tree in memory to compare time stamps (as for example some node modules do)
a client usually starts more than one server. If every server runs its own file watching it can become a CPU or memory problem.
in general there are more server than client implementations. So this problem is better solved on the client side.

In our case, this means that IDEs will send us which files have changed since the last notification, and language servers will forward the same didChangedWatchedFiles that they get from their clients.
This feature is important to get tight compile, edit and test developer workflows because the cost of file watching is reduced to zero.

Relevant discussion on the LSP side: https://github.com/Microsoft/language-server-protocol/issues/237.

Why is this entrypoint required? Why not have editors send buildTarget/compile requests on every file save?
didChangedWatchedFiles is necessary for servers to efficiently process client requests. One point of inefficiency in build servers and build tools is that when they get a compilation request, they need to figure out what source files changed. Figuring this out, in the case of Zinc (Java & Scala compilation), requires hashing all the source files of a project. This hashing may be negligible in small projects, but as projects grow it slows down compilation unnecessarily.
Compilation is not the only task affected by this. In fact, incremental task execution engines like Bazel and Pants would not need to run their whole invalidation algorithm in all the file inputs, didChangedWatchedFiles would tell them right away what files changed in the editor. These engines then would run the requested task only if the hashes of the watched files changed.
Another reason to add this entrypoint is that dumb editors (vim, emacs, atom, sublime) may not necessarily have a mapping SourceFile => BuildTargetIdentifier. In this case, it's better not to add this logic to the editors but rely on the build server to detect where the files belong to, and which projects need to be compiled.

For a final design see linked PR.


Add test for impersonated account and bump minimum ape requirement

Overview
Once ape is released, bump the required version so we can add a test to make sure we can se impersonated accounts

[ ] Also make sure ContractInstances automatically get impersonated

(see https://github.com/ApeWorX/ape/pull/619)

https://github.com/ApeWorX/ape-hardhat/pull/44

It seems this should be bumped at the next release that includes https://github.com/ApeWorX/ape/pull/619

can we reuse most of this test from ape core?
https://github.com/sabotagebeats/ape/blob/b2b19286c583c7239553c2d307280717a0ba6594/tests/functional/test_accounts.py#L172-L180

@sabotagebeats  Yes, but instead of expecting a failure we expect it to work


Add support for v0 object in parallel-mode AAE (#11)

Add support for v0 object in parallel-mode AAE

Cannot assume that v0 objects will not happen - capability negotiation down to v0 on 3.0 Riak during failure scenarios
https://github.com/basho/riak_kv/issues/1874

Related test: https://github.com/basho/riak_test/pull/1386


Initialize SensitiveTopic validator

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

:exclamation: No coverage uploaded for pull request base (main@903655f). Click here to learn what that means.

:exclamation: Current head 0019533 differs from pull request most recent head d7f7988. Consider uploading reports for the commit d7f7988 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #579   +/-   ##
=======================================
  Coverage        ?   82.93%
=======================================
  Files           ?       94
  Lines           ?     5819
  Branches        ?        0
=======================================
  Hits            ?     4826
  Misses          ?      993
  Partials        ?        0

Flag
Coverage Δ

unittests
82.93% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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


Support for Ghidra 9.2.3

Ghidra 9.2.3 has changed something in build process and Ghidra-CPP-Class-Analyzer fails to compile against it

Ghidra 9.2.3 has changed something in build process and Ghidra-CPP-Class-Analyzer fails to compile against it

Are you using a version of gradle >= 5 and < 7? Ghidra's extension building script is not compatible with gradle 7. I've fixed the issue on my end but until Ghidra's buildExtension.gradle is compatible there isn't anything I can do about it.


Fix incorrect syntax for --evm flag and text errors in CLI docs

What changed? Why?
The current documentation for the command npx thirdweb create app --evm uses an incorrect syntax for the --evm flag. Instead of using two hyphens (--), a single hyphen (-) is used, causing a syntax error when running the command.
Additionally, I have corrected typos and spelling errors in the text to improve clarity and readability.
Changes:
• Corrected the flag from -evm to --evm in the command description.
• Fixed various typos and spelling mistakes throughout the documentation.
Reason for Change:
• To fix a critical error where the command is not recognized by the CLI and fails to execute.
• To improve the overall readability and accuracy of the documentation.
Notes to reviewers
Please verify that the corrected command syntax aligns with the latest CLI version and ensure all other spelling and formatting changes are consistent.
How has it been tested?
• The corrected command was tested with the --evm flag, and it successfully executed as expected.

🟡 Heimdall Review Status

Requirement
Status
More Info

Reviews

🟡
0/1

Denominator calculation

Show calculation

1 if user is bot
0

1 if user is external
0

From .codeflow.yml

1

Additional review requirements

Show calculation

Max
0

0

From CODEOWNERS

0

Global minimum
0

Max

1

1

1 if commit is unverified
0

Sum
1


Reversing the doubly linked list.

Name:
Reverse the doubly linked list using Recursion.
About:
A doubly linked list has two pointers next and previous .By using recursion I will reverse the original doubly linked list.
Thankyou

Labels:
new algorithm, gssoc-ext, hacktoberfest, level1

Assignees:

[ 1] Contributor in GSSoC-ext
[ 2] Want to work on it

Want to work on it


When using .GroupBy then .Include is ignored

Code Like this:
var query = Context.Set<MovieCategory>()
                    .Join(Context.Set<Movie>(), mc => mc.MovieId, m => m.MovieId, (category, movie) => new { category, movie })
                    .GroupBy(cmm => cmm.movie)
                    .Select(cm => cm.Key)
                    .Include(e => e.Studio);

var result = await query.ToListAsync();

Generates query like this:
SELECT [e].[MovieId], [e].[CategoryId], [e.Movie].[MovieId], [e.Movie].[Date], [e.Movie].[Description], [e.Movie].[Duration], [e.Movie].[StudioId], [e.Movie].[Title], [e.Movie].[Uri]
FROM [MovieCategories] AS [e]
INNER JOIN [Movies] AS [e.Movie] ON [e].[MovieId] = [e.Movie].[MovieId]
ORDER BY [e.Movie].[MovieId]

As a result navigation property Studio in model Movie is null. I've runned the same query in EF6 and it worker fine. Here I've tried different combinations of placing .Include() (e.g: Context.Set().Include(e=>e.Studio) etc.)
Further technical details
EF Core version: 2.1
Database Provider: Microsoft.EntityFrameworkCore.SqlServer 2.1.3 (tried latest prerelease verion as well, but no luck)
Operating system:  Win10
IDE: (e.g. Visual Studio 2017 15.8.5)

Related to #12737

Closing as using Include after a projection will not be supported.


Make SLAM disable my in-game mic when playing

When using SLAM, people still hear my ingame mic. which ruins the music, i want to be able to play the music but be able to talk to my friends in discord at the same time. If that is possible, please let me know! it would perfect reason to donate to this program as well.
Thanks!

Almost a month late, but source engine's voice_inputfromfile makes voice input be drawn from a file instead of the microphone, it shouldn't be playing your microphone over voice if a file is actually being played

Almost a month late, but source engine's voice_inputfromfile makes voice input be drawn from a file instead of the microphone, it shouldn't be playing your microphone over voice if a file is actually being played

All i can say is when i'm putting things through slam (using a keybind, then X to play) it also relays my mic when that happens.


Update TODO with recent approved features

On 6/12/15, at 12:12 PM, matz/まつもとゆきひろ wrote:
I think we should update it

applied.

@matz ping, wdyt of this?


Sample of IMDSv2 activation

Hi,
Would you mind adding a sample to enable IMDSv2. I know I can activate with the CLI :
aws ec2 run-instances \
    --image-id ami-1a2b3c4d \
    --instance-type c3.large \
    --key-name MyKeyPair \
    --metadata-options "HttpEndpoint=enabled,HttpTokens=required"

But I can't find any resources to do it with ebextensions.
Thanks a lot in advance.

@adrienpessu, I'll follow up with the Elastic Beanstalk team and post here with any info I get. Thanks!

@adrienpessu At this time, Elastic Beanstalk doesn't support IMDSv2. This isn't just about configuration; we'd have to update our on-instance logic and software to support IMDSv2.
Also, note that if you attempt to modify the instance metadata option for an EC2 instance managed by Beanstalk to enforce IMDSv2 (disable IMDSv1), then the Beanstalk environment will break.
We're aware of this need and are tracking it internally. You're welcome to add a request for it on our public roadmap.


fix(TDI-38377): api version can't be changed in some situation

What is the current behavior? (You can also link to an open issue here)
This fix have been merge to 0.13 for customer issue firstlly:
https://github.com/Talend/components/pull/561
https://jira.talendforge.org/browse/TDI-38377
Salesforce api version can't be modified in some situation. like:
"bulk connection" and Oauth2 login type
What is the new behavior?
For "Bulk Connection" with "Basic login" type get the version from the service endpoint
For "Oauth2" Login type, need to specified by a new parameter "API version"
Because of in 6.2.1 & 6.3.1, we have a fixed API version "34.0"
So add a migration to keep the this version for 6.2.1 & 6.3.1 job
Please check if the PR fulfills these requirements

[x] The commit message follows Talend standard
[x] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features) ?
[x] The code coverage on new code >75%
[ ] The new code does not introduce new technical issues (sonar / eslint)

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build / CI related changes
[ ] Other... Please describe:

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Pull request test result: success :star:

Pull request test result: success :star:


Provider Linode

Anyone working on fog_driver/providers/linode.rb ? I'm probably going to start on it or if someone has something I'll contribute....

I don't think anyone has asked for it yet, but if you can it bootstrapped I can help you out too. We're trying to get examples on the README also now, so if you do get it working please add the needed information.

@aberrios85 any chance you've worked/made any progress on this?

pinging @aberrios85 to see if you've made any progress :+1:

No movement, if you'd like to help I'd love to see PR, but I'm closing this due to no support.


lists page ordering of playlists

Show unpublished playlists with changes first, then private ones, and then published ones according to the date they were published (desc)
Maybe it makes sense to add tabs/filters along with this? All / private / published / published + changed. Sorting options?

Filed on Odysee also: https://github.com/OdyseeTeam/odysee-frontend/issues/675


use cache for slow query and statements

[x] use cache for slow query
[x] use cache for statements

another solution for PR #822

@unbyte PTAL, thanks

LGTM

Currently I'm going to leave this PR not picked into master, until a position memorization is implemented, since in production user is very likely to scroll, and not memorizing the position is worse than simply open a new window. @baurine PTAL

Currently I'm going to leave this PR not picked into master, until a position memorization is implemented, since in production user is very likely to scroll, and not memorizing the position is worse than simply open a new window. @baurine PTAL

Got it!

Got it!


Fix running unit tests on the CI

Summary
Some of the features for the database and the REST API require accessing files on disk, which we do not have access to on Github. There are probably some way to get around this or mock accessing the disks. However, it is not  a very high priority right now provided that developers run the test suite on their own first.
Example
An example of the way that it is currently broken is this run of the CI during the development of the database: https://github.com/baas-project/baas/runs/4091566066?check_suite_focus=true

Hi, @ValentijnvdBeek
I resolved privileged problem to access some files.
but it cannot to be passed the test of config_test.go because I cannot find the example of /etc/baas.toml.
Could tell me how to write that config file?
https://github.com/u5surf/baas/runs/4196057947?check_suite_focus=true
[2021-11-13 00:59:50] - ERROR - Cannot open the configuration file: 'open /etc/baas.toml: no such file or directory'
Failed to fire hook: sending log: Post "http://control_server:4848/log": dial tcp: lookup control_server: Temporary failure in name resolution
[2021-11-13 00:59:50] - ERROR - Cannot read configuration file: 'invalid argument'
Failed to fire hook: sending log: Post "http://control_server:4848/log": dial tcp: lookup control_server: Temporary failure in name resolution
[2021-11-13 00:59:51] - INFO - Creating the configuration file object
--- FAIL: TestConfigFile (0.10s)
    config_test.go:11:
        	Error Trace:	config_test.go:11
        	Error:      	Should be true
        	Test:       	TestConfigFile
    config_test.go:12:
        	Error Trace:	config_test.go:12
        	Error:      	Should be true
        	Test:       	TestConfigFile
FAIL
FAIL	github.com/baas-project/baas/management_os/entrypoint	0.108s

HI @u5surf,
First thank you for your interest in the project and your help! I really appreciate it.
Basically, the logic here is that the configuration code (for now) run as a part of the management server on the booted image. So that file is from management_os/config/config.toml to /etc/baas.toml in the Dockerfile.   I don't think we can write to that part of the filesystem at all.
So it might be better to slightly refactor the configuration package instead.  That can be a simple as just splitting the get configuration file functionality from the singleton so you can pass a different file (or just values directly) which decouples the dependency on the layout of the machine. Otherwise you can mock it or delete the test entirely, it is a bit of a grass is green style test right now.
Oh and, finally, thank you again for your work. However due to an oversight of the previous stewards of this repository it is currently unlicensed and therefore (technically) proprietary. Luckily our contract with the university handed our rights over so we can easily relicense it with the correct license. Of course this doesn't count for any of your code, so if you could indicate what license if any you would feel comfortable with that would be great. You can also separately license your own code of course :)


Error while setting up RTMP stream

RTMP stream is not being played and in the console, I see the error below:

yourside.live.cdn.bitgravity.com/yourside/live/feed_1800k?start=0:1 GET http://yourside.live.cdn.bitgravity.com/yourside/live/feed_1800k?start=0 net::ERR_EMPTY_RESPONSE

Please, can you tell me if the RTMP stream isn't configured correctly or some issue with mejs?
Thanks,
Himani

can you provide a live example?

Closing old issues. Feel free to re-open if needed.


[python3] build failure for iOS

Host Environment

Host OS: MacOS
Target OS: iOS
Compiler: AppleClang / Xcode 12..5.1

To Reproduce
Steps to reproduce the behavior:
Define a CMake project on MacOS that cross-compiles to iOS.
Add a dependency to Boost in its vcpkg manifest.
vcpkg fails to build python3 for iOS, which is one of the dependencies for Boost.
./vcpkg install xxxx
Failure logs
-Cut and paste the appropriate build messages from the console output.
Starting package 1/53: python3:arm64-ios
Building package python3[core]:arm64-ios...
-- Using community triplet arm64-ios. This triplet configuration is not guaranteed to succeed.
-- [COMMUNITY] Loading triplet configuration from: /Users/alexander.nickolov/git/vcpkg/triplets/community/arm64-ios.cmake
-- Installing port from location: /Users/alexander.nickolov/git/vcpkg/buildtrees/versioning/versions/python3/b3a545b39c982b7f0a12891765dd9909e364ebc6
-- Downloading https://github.com/python/cpython/archive/v3.9.7.tar.gz -> python-cpython-v3.9.7.tar.gz...
-- Cleaning sources at /Users/alexander.nickolov/git/vcpkg/buildtrees/python3/src/v3.9.7-de99cf1568.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /Users/alexander.nickolov/git/vcpkg/downloads/python-cpython-v3.9.7.tar.gz
-- Applying patch 0001-static-library.patch
-- Applying patch 0002-use-vcpkg-zlib.patch
-- Applying patch 0003-devendor-external-dependencies.patch
-- Applying patch 0004-dont-copy-vcruntime.patch
-- Applying patch 0005-only-build-required-projects.patch
-- Applying patch 0006-fix-duplicate-symbols.patch
-- Using source at /Users/alexander.nickolov/git/vcpkg/buildtrees/python3/src/v3.9.7-de99cf1568.clean
-- Getting CMake variables for arm64-ios-dbg
-- Getting CMake variables for arm64-ios-rel
-- Configuring arm64-ios-dbg
-- Configuring arm64-ios-rel
-- Building arm64-ios-dbg
-- Installing arm64-ios-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:155 (message):
    Command failed: /usr/bin/make -j 13 -f Makefile altinstall DESTDIR=/Users/alexander.nickolov/git/vcpkg/packages/python3_arm64-ios
    Working Directory: /Users/alexander.nickolov/git/vcpkg/buildtrees/python3/arm64-ios-dbg
    See logs for more information:
      /Users/alexander.nickolov/git/vcpkg/buildtrees/python3/install-arm64-ios-dbg-out.log
      /Users/alexander.nickolov/git/vcpkg/buildtrees/python3/install-arm64-ios-dbg-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_build_make.cmake:210 (vcpkg_execute_build_process)
  scripts/cmake/vcpkg_install_make.cmake:26 (vcpkg_build_make)
  buildtrees/versioning/versions/python3/b3a545b39c982b7f0a12891765dd9909e364ebc6/portfile.cmake:173 (vcpkg_install_make)
  scripts/ports.cmake:140 (include)

Error: Building package python3:arm64-ios failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `./vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: python3:arm64-ios
  Vcpkg version: 2021-08-12-unknownhash

Additionally, attach any relevant sections from the log files above.
-- Running vcpkg install - failed

-Please attach any additional failure logs mentioned in the console output.
[This is the content of install-arm64-ios-dbg-err.log]
ld: warning: ignoring file /Users/alexander.nickolov/GitHub/tdh-in-session-member-manager/build_ios_arm64/vcpkg_installed/arm64-ios/debug/lib/libssl.a, building for macOS-x86_64 but attempting to link with file built for iOS-arm64
ld: warning: ignoring file /Users/alexander.nickolov/GitHub/tdh-in-session-member-manager/build_ios_arm64/vcpkg_installed/arm64-ios/debug/lib/libcrypto.a, building for macOS-x86_64 but attempting to link with file built for iOS-arm64
ld: warning: ignoring file /Users/alexander.nickolov/GitHub/tdh-in-session-member-manager/build_ios_arm64/vcpkg_installed/arm64-ios/debug/lib/libexpat.a, building for macOS-x86_64 but attempting to link with file built for iOS-arm64
ld: warning: ignoring file /Users/alexander.nickolov/GitHub/tdh-in-session-member-manager/build_ios_arm64/vcpkg_installed/arm64-ios/debug/lib/libexpat.a, building for macOS-x86_64 but attempting to link with file built for iOS-arm64
ld: warning: ignoring file /Users/alexander.nickolov/GitHub/tdh-in-session-member-manager/build_ios_arm64/vcpkg_installed/arm64-ios/debug/lib/libffi.a, building for macOS-x86_64 but attempting to link with file built for iOS-arm64
ld: warning: ignoring file /Users/alexander.nickolov/GitHub/tdh-in-session-member-manager/build_ios_arm64/vcpkg_installed/arm64-ios/debug/lib/libsqlite3.a, building for macOS-x86_64 but attempting to link with file built for iOS-arm64
*** WARNING: renaming "_hashlib" since importing it failed: dlopen(build/lib.macosx-11.5-x86_64-3.9-pydebug/_hashlib.cpython-39d-darwin.so, 2): Symbol not found: _CRYPTO_memcmp
  Referenced from: build/lib.macosx-11.5-x86_64-3.9-pydebug/_hashlib.cpython-39d-darwin.so
  Expected in: flat namespace
 in build/lib.macosx-11.5-x86_64-3.9-pydebug/_hashlib.cpython-39d-darwin.so
*** WARNING: renaming "_sqlite3" since importing it failed: dlopen(build/lib.macosx-11.5-x86_64-3.9-pydebug/_sqlite3.cpython-39d-darwin.so, 2): Symbol not found: _sqlite3_aggregate_context
  Referenced from: build/lib.macosx-11.5-x86_64-3.9-pydebug/_sqlite3.cpython-39d-darwin.so
  Expected in: flat namespace
 in build/lib.macosx-11.5-x86_64-3.9-pydebug/_sqlite3.cpython-39d-darwin.so
*** WARNING: renaming "pyexpat" since importing it failed: dlopen(build/lib.macosx-11.5-x86_64-3.9-pydebug/pyexpat.cpython-39d-darwin.so, 2): Symbol not found: _XML_ErrorString
  Referenced from: build/lib.macosx-11.5-x86_64-3.9-pydebug/pyexpat.cpython-39d-darwin.so
  Expected in: flat namespace
 in build/lib.macosx-11.5-x86_64-3.9-pydebug/pyexpat.cpython-39d-darwin.so
*** WARNING: renaming "_elementtree" since importing it failed: PyCapsule_Import could not import module "pyexpat"
*** WARNING: renaming "_ctypes" since importing it failed: dlopen(build/lib.macosx-11.5-x86_64-3.9-pydebug/_ctypes.cpython-39d-darwin.so, 2): Symbol not found: _ffi_call
  Referenced from: build/lib.macosx-11.5-x86_64-3.9-pydebug/_ctypes.cpython-39d-darwin.so
  Expected in: flat namespace
 in build/lib.macosx-11.5-x86_64-3.9-pydebug/_ctypes.cpython-39d-darwin.so
ld: warning: ignoring file /Users/alexander.nickolov/GitHub/tdh-in-session-member-manager/build_ios_arm64/vcpkg_installed/arm64-ios/debug/lib/libssl.a, building for macOS-x86_64 but attempting to link with file built for iOS-arm64
ld: warning: ignoring file /Users/alexander.nickolov/GitHub/tdh-in-session-member-manager/build_ios_arm64/vcpkg_installed/arm64-ios/debug/lib/libcrypto.a, building for macOS-x86_64 but attempting to link with file built for iOS-arm64
ld: warning: ignoring file /Users/alexander.nickolov/GitHub/tdh-in-session-member-manager/build_ios_arm64/vcpkg_installed/arm64-ios/debug/lib/libexpat.a, building for macOS-x86_64 but attempting to link with file built for iOS-arm64
ld: warning: ignoring file /Users/alexander.nickolov/GitHub/tdh-in-session-member-manager/build_ios_arm64/vcpkg_installed/arm64-ios/debug/lib/libexpat.a, building for macOS-x86_64 but attempting to link with file built for iOS-arm64
/Users/alexander.nickolov/git/vcpkg/buildtrees/python3/src/v3.9.7-de99cf1568.clean/Modules/_ctypes/cfield.c:2:10: fatal error: 'pycore_byteswap.h' file not found
#include "pycore_byteswap.h"      // _Py_bswap32()
         ^~~~~~~~~~~~~~~~~~~
1 error generated.
ld: warning: ignoring file /Users/alexander.nickolov/GitHub/tdh-in-session-member-manager/build_ios_arm64/vcpkg_installed/arm64-ios/debug/lib/libsqlite3.a, building for macOS-x86_64 but attempting to link with file built for iOS-arm64
*** WARNING: renaming "_hashlib" since importing it failed: dlopen(build/lib.macosx-11.5-x86_64-3.9-pydebug/_hashlib.cpython-39d-darwin.so, 2): Symbol not found: _CRYPTO_memcmp
  Referenced from: build/lib.macosx-11.5-x86_64-3.9-pydebug/_hashlib.cpython-39d-darwin.so
  Expected in: flat namespace
 in build/lib.macosx-11.5-x86_64-3.9-pydebug/_hashlib.cpython-39d-darwin.so
*** WARNING: renaming "_sqlite3" since importing it failed: dlopen(build/lib.macosx-11.5-x86_64-3.9-pydebug/_sqlite3.cpython-39d-darwin.so, 2): Symbol not found: _sqlite3_aggregate_context
  Referenced from: build/lib.macosx-11.5-x86_64-3.9-pydebug/_sqlite3.cpython-39d-darwin.so
  Expected in: flat namespace
 in build/lib.macosx-11.5-x86_64-3.9-pydebug/_sqlite3.cpython-39d-darwin.so
*** WARNING: renaming "pyexpat" since importing it failed: dlopen(build/lib.macosx-11.5-x86_64-3.9-pydebug/pyexpat.cpython-39d-darwin.so, 2): Symbol not found: _XML_ErrorString
  Referenced from: build/lib.macosx-11.5-x86_64-3.9-pydebug/pyexpat.cpython-39d-darwin.so
  Expected in: flat namespace
 in build/lib.macosx-11.5-x86_64-3.9-pydebug/pyexpat.cpython-39d-darwin.so
*** WARNING: renaming "_elementtree" since importing it failed: PyCapsule_Import could not import module "pyexpat"
/Users/alexander.nickolov/git/vcpkg/buildtrees/python3/src/v3.9.7-de99cf1568.clean/Lib/runpy.py:111: PendingDeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+
  __import__(pkg_name)
/Users/alexander.nickolov/git/vcpkg/buildtrees/python3/src/v3.9.7-de99cf1568.clean/Lib/runpy.py:111: PendingDeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+
  __import__(pkg_name)
Traceback (most recent call last):
  File "/Users/alexander.nickolov/git/vcpkg/buildtrees/python3/src/v3.9.7-de99cf1568.clean/Lib/runpy.py", line 188, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/Users/alexander.nickolov/git/vcpkg/buildtrees/python3/src/v3.9.7-de99cf1568.clean/Lib/runpy.py", line 147, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/Users/alexander.nickolov/git/vcpkg/buildtrees/python3/src/v3.9.7-de99cf1568.clean/Lib/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/Users/alexander.nickolov/git/vcpkg/buildtrees/python3/src/v3.9.7-de99cf1568.clean/Lib/ensurepip/__init__.py", line 7, in <module>
    from importlib import resources
  File "/Users/alexander.nickolov/git/vcpkg/buildtrees/python3/src/v3.9.7-de99cf1568.clean/Lib/importlib/resources.py", line 4, in <module>
    from . import _common
  File "/Users/alexander.nickolov/git/vcpkg/buildtrees/python3/src/v3.9.7-de99cf1568.clean/Lib/importlib/_common.py", line 3, in <module>
    import zipfile
  File "/Users/alexander.nickolov/git/vcpkg/buildtrees/python3/src/v3.9.7-de99cf1568.clean/Lib/zipfile.py", line 6, in <module>
    import binascii
ImportError: dlopen(/Users/alexander.nickolov/git/vcpkg/buildtrees/python3/arm64-ios-dbg/build/lib.macosx-11.5-x86_64-3.9-pydebug/binascii.cpython-39d-darwin.so, 2): Symbol not found: _crc32
  Referenced from: /Users/alexander.nickolov/git/vcpkg/buildtrees/python3/arm64-ios-dbg/build/lib.macosx-11.5-x86_64-3.9-pydebug/binascii.cpython-39d-darwin.so
  Expected in: flat namespace
 in /Users/alexander.nickolov/git/vcpkg/buildtrees/python3/arm64-ios-dbg/build/lib.macosx-11.5-x86_64-3.9-pydebug/binascii.cpython-39d-darwin.so
make: *** [altinstall] Error 1

Additional context
Add any other context about the problem here, such as what you have already tried to resolve the issue.
I'm not sure what to think of this to be honest. It looks like part of the build is performed for iOS and another part is performed for MacOS. Is Python even expected to be able to be built for iOS? It's a dependency for Boost, but perhaps it should be conditional and not built for iOS?
I did update builtin-baseline in my manifest to a commit from today. This issue is with essentially the current state of vcpkg.

If I understand the log correctly, Python is being built for OS X, but its build environment is only set up for iOS builds. I don't have a MacOS build, so the environment won't have OS X libraries, that's to be expected. If Python has to be built for the host OS, it needs to get its dependencies on its own.

/Users/alexander.nickolov/git/vcpkg/buildtrees/python3/src/v3.9.7-de99cf1568.clean/Modules/_ctypes/cfield.c:2:10: fatal error: 'pycore_byteswap.h' file not found
#include "pycore_byteswap.h"      // _Py_bswap32()
         ^~~~~~~~~~~~~~~~~~~
1 error generated.

I saw that too. Presumably there is also a problem with the configuration script. Most of the files compile fine. My guess is some target does not properly use the compiler flags variables. (This is a Makefile-based project.)

This header exists in Include/internal, please provide /Users/alexander.nickolov/git/vcpkg/buildtrees/python3/config-arm64-ios-dbg-out.log.

install-arm64-ios-dbg-out.log

It looks to me that the compilation part of the build is run twice. Perhaps because of the failures for the optional modules. The first time everything compiles successfully. The second time the internal include folder is not getting passed in and we get that include error. That seems to be a secondary issue, the second configuration not being performed properly perhaps. The main issue seems to be that the original build partially fails.

config-arm64-ios-dbg-out.log

I found this project in GitHub for building Boost for iOS (and OS X): https://github.com/apotocki/boost-iosx
It does not build 3 of Boost libraries and Boost.Python is one of them. Perhaps the problem is in Boost itself? Perhaps all the python port needs to do is check if the target system is iOS and exit without doing anything.

This issue hasn’t been updated in 3 month, if it is still an issue, please reopen this issue.