Error in using compile inside Callback class

System information.

Have I written custom code (as opposed to using a stock example script provided in Keras):Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04):Windown 10
TensorFlow installed from (source or binary):source
TensorFlow version (use command below):2.4
Python version:3.6

I'm trying to make a fine tuning callback.
So, I wish to unfreeze layers after few epochs but I get this error: "TypeError: 'NoneType' object is not callable".
My code:
 class UnFreezeCallback(tf.keras.callbacks.Callback):
    def __init__(self, n_epochs):
          super().__init__()
          self.n_epochs = n_epochs
    def on_epoch_end(self, epoch, logs=None):
        print("This is epoch number: {}".format(epoch))
        if epoch == self.n_epochs-1 and self.n_epochs != 0:
            print("Open entire model for training")
            for layer in self.model.layers[args.unfreeze_layer_idx:]:
                if args.freeze_bn == False or layer.__class__.__name__ != 'BatchNormalization':
                    layer.trainable = True
                else:
                    layer.trainable = False

            with strategy.scope():
                #must re-compile after freeze redefinition:
                print("compiling model")
                self.model.compile(loss = "categorical_crossentropy",
                                        optimizer="Adam",
                                        metrics=["accuracy"],
                                        run_eagerly=args.run_eagerly)

unfreeze_callback = UnFreezeCallback(args.open_training_epoch)

model_final.fit(
      tf_dataset,
      steps_per_epoch  = math.floor(len(y_train) / args.train_batch_size),
      epochs = args.epochs,
      batch_size = args.train_batch_size,
      verbose=1,
      initial_epoch=0,
      callbacks = [unfreeze_callback, tensorboard_callback, lr_scheduler])

If I'm removing self.model.compile everything works fine.
With it I'm having this error:
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_batch_size, validation_freq, max_queue_size, workers, use_multiprocessing)
1098                 _r=1):
1099               callbacks.on_train_batch_begin(step)
-> 1100               tmp_logs = self.train_function(iterator)
1101               if data_handler.should_sync:
1102                 context.async_wait()
TypeError: 'NoneType' object is not callable
This error shows up at the beginning of the next epoch.

The fit() call requires attributes that are set in the first compile() call. You can't recompile then resume the same fit(), it needs to be a new fit() call. You can't saw the tree branch on which you're currently sitting then expect it to stay there.
You should do something like:
for epoch in range(epochs):
  model.fit(..., epochs=1)
  change_weight_trainability(...)
  model.compile(...)


Fix env calculation with hashes

Fixes #1833.  @frostming - kinda was already there by the time I saw your note - heh.
First commit just fixes both locations where environment variables were injected before hash calculation.
Second commit DRYs up the pipfile hash checking a bit and adds a test case.  I know the API is a little goofy (returning a tuple only when truthy), but it felt like an easier to read way to do the API.
Perhaps longer term it'd be better to move this into pipfile directly.
In particularly, I think this would be a good idea:
>>> p = pipfile.load(inject_env=True)
>>> p.hash
AssertionError: cannot calculate hash on pipfile with already-substituted env vars

Great, I will close the one I created

I’d expose two functions get_locked_pipfile_hash and calculate_pipfile_hash instead, and do the comparison outside. This would make the interface cleaner IMO.

Functional-wise this is :+1:

Okay @uranusjr - switched to two functions like you suggested, but changed it to get_lockfile_hash instead cuz I thought it was slightly clearer

Added doc note about environment variables to advanced (may not have quite captured the pipenv style ;) )

🚢

Love the API change on those calls. Nice work


[Doc] Add Chinese translation of install.md and 4 super-resolution datasets README.md

This PR adds a Chinese version of the installation instructions (install.md) and the 4 super-resolution datasets description files (in tools/data/super-resolution/*/README.md).

@LiUzHiAn Please install pre-commit. This helps you check the format of the modified files.
After installing pre-commit, you can cd mmediting and enter pre-commit install.

@LiUzHiAn Please install pre-commit. This helps you check the format of the modified files.
After installing pre-commit, you can cd mmediting and enter pre-commit install.

After installing pre-commit, do I need to make a dummy commit?

@LiUzHiAn Please install pre-commit. This helps you check the format of the modified files.
After installing pre-commit, you can cd mmediting and enter pre-commit install.

After executing pre-commit run --all-files, the yapf related error was raised, just something as :
yapf.....................................................................Failed
- hook id: yapf
- exit code: 1
...
...
 File "/home/liuzhian/anaconda3/envs/mmlab/lib/python3.6/lib2to3/pgen2/parse.py", line 159, in addtoken
    raise ParseError("bad input", type, value, context)
lib2to3.pgen2.parse.ParseError: bad input: type=3, value="'\\btitle\\s*=\\s*{{\\s*{p}\\s*}}.*?\\n## (.*?)\\s*[,;]?\\s*\\n'", context=('', (44, 19))

Any idea to fix that? Thanks for your time

Usually, I commit the changes as usual. If pre-commit is installed, it will parse your files and change some minor formatting errors for you. You can try that.

@LiUzHiAn Please install pre-commit. This helps you check the format of the modified files.
After installing pre-commit, you can cd mmediting and enter pre-commit install.

After executing pre-commit run --all-files, the yapf related error was raised, just something as :
yapf.....................................................................Failed
- hook id: yapf
- exit code: 1
...
...
 File "/home/liuzhian/anaconda3/envs/mmlab/lib/python3.6/lib2to3/pgen2/parse.py", line 159, in addtoken
    raise ParseError("bad input", type, value, context)
lib2to3.pgen2.parse.ParseError: bad input: type=3, value="'\\btitle\\s*=\\s*{{\\s*{p}\\s*}}.*?\\n## (.*?)\\s*[,;]?\\s*\\n'", context=('', (44, 19))

Any idea to fix that? Thanks for your time

Usually, I commit the changes as usual. If pre-commit is installed, it will parse your files and change some minor formatting errors for you. You can try that.

I seem to find the reason. It's because some lines of code in mmedit/models/backbones/encoder_decoders/decoders/fba_decoder.py don't meet the yapf format, but I never modify. Just running pre-commit run will force the pre-commit to skip this issue.
Indeed, commit the changes as usual will also lead to the pre-commit run command. Anyway, I've committed my final Docs change.

@LiUzHiAn Please install pre-commit. This helps you check the format of the modified files.
After installing pre-commit, you can cd mmediting and enter pre-commit install.

After executing pre-commit run --all-files, the yapf related error was raised, just something as :
yapf.....................................................................Failed
- hook id: yapf
- exit code: 1
...
...
 File "/home/liuzhian/anaconda3/envs/mmlab/lib/python3.6/lib2to3/pgen2/parse.py", line 159, in addtoken
    raise ParseError("bad input", type, value, context)
lib2to3.pgen2.parse.ParseError: bad input: type=3, value="'\\btitle\\s*=\\s*{{\\s*{p}\\s*}}.*?\\n## (.*?)\\s*[,;]?\\s*\\n'", context=('', (44, 19))

Any idea to fix that? Thanks for your time

Usually, I commit the changes as usual. If pre-commit is installed, it will parse your files and change some minor formatting errors for you. You can try that.

I seem to find the reason. It's because some lines of code in mmedit/models/backbones/encoder_decoders/decoders/fba_decoder.py don't meet the yapf format, but I never modify. Just running pre-commit run will force the pre-commit to skip this issue.
Indeed, commit the changes as usual will also lead to the pre-commit run command. Anyway, I've committed my final Doc changes.

It worked now, thanks!

Hi @LiUzHiAn ！First of all, we want to express our gratitude for your significant PR in this project. Your contribution is highly appreciated, and we are grateful for your efforts in helping improve this open-source project during your personal time. We believe that many developers will benefit from your PR.
We would also like to invite you to join our Special Interest Group (SIG) private channel on Discord, where you can share your experiences, ideas, and build connections with like-minded peers. To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. Look forward to seeing you there! Join us ：https://discord.gg/UjgXkPWNqA
If you have WeChat account，welcome to join our community on WeChat. You can add our assistant ：openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends：）
Thank you again for your contribution❤


IxQuick/Startpage

Can this be implemented?

Yet another searx-like service that needs to be automated. Oh well...


Question: Notification workflow for tdlib vs. classic Telegram

Hi,
I just read in the Android app about the KeepAlive service used to restart the App so "notifications can be received" - so basically do you no longer use GCM or similar services for pushing notifications to the official apps? I also noticed that I can receive notifications on a plain LineageOS installation wiht no GApps etc.

KeepAlive service was required for Android 2.* and Android 4.*, because GCM was very unreliable there. It should be disabled by default now from Android 6.0 because of doze and other restrictions on apps work in background. So now FCM is a primary source for notifications on Android.
TDLib keeps background connection unless NetworkType is set to networkTypeNone. In that case most notifications will be received through that background connection.

Ah ok, so Telegram and Telegram X will still use FCM but not always. So suppose our tdlib client is active, connected, and new notifications arrive, we would need to react on the notification from tdlib. Can you do me one favor, there is the push type "Ubuntu Touch", can you check if this still triggers always or only when the client is not reachable via tdlib? We need to start thinking about migration scenario for Ubuntu Touch push services to the new format.

Pushes are sent always for messages in unmuted chats. They can only be delayed for approximately 3o seconds if the user is online from some other client.

Ok fine. Regarding changes to the push message format: Last time I did this together with Igor Z., is he still in charge of that? We need to fix the json content that is currently sent to our servers, but it must be done carfeull ynot to disrupt existing push notifications.

@Flohack74 Yes.


[Migrated] start of config refactor

Originally from: https://github.com/Miserlou/Zappa/issues/1372 by jamesbeedy
Description
In light of #1371 we may want to better define a single source
of truth for configs alongside increasing the maintainability
and visibility of Zappa configuration.

create config schema and bring forward a good amount of
https://github.com/juju/layer-index/blob/master/update_readme.py
create example config certificate_arn

GitHub Issues
https://github.com/Miserlou/Zappa/issues/1371

not enough info, closing.


Embedded nuxt framework

:hand:nuxt have 234,299 star,More and more people choose to use nuxt, while OHI only supports nested react
community. How does it add value? Why this feature?
It can provide more developers with the "OHIF" plug-in based on nuxt out of the box
Is your request very specific to your needs? Consider
yes, very.
contributing it yourself! Or reach
out to a community member that offers
consulting services.

Request
What feature or change would you like to see made?
Embedded nuxt framework
Why should we prioritize this feature?
...More and more people choose to use nuxt, while OHI only supports nested react

Unfortunately, that is not part of the current plan and is not a priority at the moment.


[BUG]  Subscribe to newsletter section in home page is different from rest of the pages

Description
Describe the bug:
Subscribe to newsletter section in home page is different from the rest of the pages.
Expected behavior:
To maintain ui consistency the subscribe to newsletter section should be same across all pages.
Actual behavior:
Subscribe to newsletter section in home page is different from the rest of the pages.
Reproduction Steps
Steps to reproduce the behavior:

Go to 'index.html'
Scroll down to 'Footer'
See ui inconsistency

Screenshots
Home page

Other pages

Additional Information
Device (please complete the following information):

OS: [e.g., Windows, macOS, Linux]
Browser [e.g., Chrome, Safari, Firefox]
Version [e.g., 22]

Additional context:
Add any other context about the problem here.

Kindly assign this to me.
#ssoc


ReDial Recommender Results

Hi! I'm trying to reproduce the baseline results observed in the paper "Towards Unified Conversational Recommender Systems via
Knowledge-Enhanced Prompt Learning" available here https://arxiv.org/pdf/2206.09363.pdf
Using the configuration in config/crs/redial/redial.yaml for ReDial I'm getting the following results on the recommendation task:

With early stop (8 epochs): {"hit@1": 0.0002498, "hit@10": 0.009493, "hit@50": 0.08818, "mrr@1": 0.0002498, "mrr@10": 0.002024, "mrr@50": 0.005041, "ndcg@1": 0.0002498, "ndcg@10": 0.003739, "ndcg@50": 0.02005, "rec_loss": 10.3}
Without early stop (50 epochs): {"hit@1": 0, "hit@10": 0.0002498, "hit@50": 0.0602, "mrr@1": 0, "mrr@10": 3.123e-05, "mrr@50": 0.00158, "ndcg@1": 0, "ndcg@10": 7.881e-05, "ndcg@50": 0.01134, "rec_loss": 10.29}

I was wondering if someone can provide the instructions for getting results similar to those shown in the paper I mentioned.

As previously mentioned by @wangxieric, there is a performance degradation during training due to a lack of pre-training (because it was originally designed for the specific dataset ReDial and can not be applied to all datasets). If you want to reproduce closer performance, you could try batch_size: 128 and lr: !!float 1e-4 in the rec part of the file config/crs/redial/redial.yaml instead of the default setting.
This is the result using the above parameters:
{hit@1: 0.01262  hit@10: 0.06246  hit@50: 0.1947  mrr@1: 0.01262  mrr@10: 0.02364  mrr@50: 0.02948  ndcg@1: 0.01262  ndcg@10: 0.0326  ndcg@50: 0.06119  rec_loss: 20.52}(14 epochs)

The above solution for the ReDial model does not enable stable performance. The results can get close to the given results as above, but also frequently end up with much lower performance.


Added options for toolbars on Layout and Grid plots

Adds options to disable merging of toolbars and setting the toolbar position on bokeh's LayoutPlot and GridPlot.

Addresses https://github.com/ioam/holoviews/issues/1977

Tests are green. Merging.


Allow definition of a "main" method for contracts

Contracts may include a main method which is called when executing that contract. If the main is missing, a default dispatching method is automatically generated.

This issue is related to https://github.com/accordproject/cicero/issues/73


DeclareStrictTypesFixer - prove bug

I see no reason why we remove that empty line...

any thoughts @Seldaek @SpacePossum ?

Nope I don't see why it would need to touch that space.

awesome ! (especially as it conflicting with other rules).
could you prepare a fix for fixer using my utests please?

Eh I really can't at the moment I only have my phone next few days. If
someone else can great :)

I see.
@SpacePossum , would you be able to play with it please?

I played around with a bit, but is harder than expected because of the line break attached to the open tag... I would say lets park this one until we figured out; https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/2062
(to prevent wasting dev. time on doing the same thing twice)

replaced by #3597


Error in the "version update" dialog

System information:

Operating system (distribution) and version: openSUSE Tumbleweed 20191101 (rolling)
DBeaver version: 6.2.3
Additional extensions: Office Support, SSHJ, SVG Extensions

Connection specification:
Irrelevant to the issue at hand
Describe the problem you're observing:
The "Version update" dialog shows the message 'Press "More Info" to open the web page where you can download 6.2.4'. However there is no more a "More Info" button.
Also, at the bottom of the dialog, you can see three buttons: "Update...", "Close", and "Upgrade...". It is not clear what the difference is between the "Update..." and the "Upgrade..." buttons. My trials have shown no difference.
Steps to reproduce, if exist:
Click on the "Help" menu option and choose "Check for updates". Look at the dialog that opens.
Include any warning/errors/backtraces from the logs
Irrelevant to the issue at hand

I can't reproduce this screen (Update and Upgrade buttons). I can't even find "Update ..." string in sources.
However label with "More info" is invalid, now this button has name "Details", thanks for the bug report.

Hi @serge-rider, thank you for the fix.
I suspect the upgrade mechanism is at fault, somehow generating a "hybrid" between the old and the new java code. Otherwise, how do you explain the "Version update" dialog I am getting?
Maybe this is the same problem that is/was causing bug #3546 here.
I'll try to uninstall 6.2.3, delete everything under ~/.eclipse and then install 6.2.4 and see what happens.

I did it, and now I'm supposedly running a "clean" version of DBeaver 6.2.4.
Everything seems well, but obviously now I cannot summon the upgrade dialog because there's no update available. As soon as 6.2.5 (or whatever version is the next release) is available I'll see what happens.

verified

Just one more comment to let you know that today, with the program proposing the update to 6.2.5, the dialog was correct.
It has three buttons: "Details", "Close" and "Upgrade".
Thank you


Add recipients building for Update

Used it to push profile updates and seems to work fine.
Resolves #13

Thanks!
FYI, I am planning to make some changes in order to try to simplify both little-boxes and microblog.pub codebase, so breaking changes may happen soon.
I will try to document breaking changes in the commit history, if any.

As long as the functionalities doesn't change it's good :D
Will definitely look at commits and report back if any issues.


Remove unused snippets for translation

Please remove these snippets or remove the #region Snippet:<snippet name> or use them in a markdown file.
translation: Snippet:MultipleInputs
translation: Snippet:OperationsHistory
translation: Snippet:PollIndividualDocuments
translation: Snippet:StartTranslationWithAzureBlobAsync

This work has been done


Remember Me

Because the token is stored in session when open a tab in a new page, we are forced to re-auth.
Can we get a config option to allow for "remember me" to mimic what strapi does?
Strapi put its the token in localstroage if the remember me box is checked

I believe this may be as easy as modifying  /server/services/oauth.js
We could pull a set config variable and set to local storage instead of set to session stoarge

@adamrpostjr
Thank you very much.
Currently, it does not have the same functionality as remember me.
Yes, it is not difficult to implement, but if we switch by config value, it will be a common setting in the application.
Unlike the Strapi admin login, it may be a little difficult to use that it cannot be set up on a per user basis.
What do you think?

@yasudacloud

Unlike the Strapi admin login, it may be a little difficult to use that it cannot be set up on a per user basis.

I through this as well, and it's not an ideal situation for sure. I have a few hours set aside for today that I am going to work on our environment, I will use this time to brainstorm other options.
The reason this comes up is because:
When in the admin area, if you open a link in a new tab, you get signed out and sent back to the Strapi Admin Login.

@yasudacloud I had a bit of time to look into this.
Sadly, Microsoft does not pass back the "remember me" option on response when using it to login.
The only option that I can think of other than a constant config change is to have an interface for the user to check a box before sending the request for SSO.
This then becomes clunky.

@adamrpostjr
Sorry for the delay.
Thanks for the PR. I will check it over the weekend and if everything is ok, I will merge it and try to publish it on Monday.

The only option that I can think of other than a constant config change is to have an interface for the user to check a box before sending the request for SSO.

When creating this plugin, I investigated the possibility of customizing the login screen, but concluded that it was not possible.
It is possible to create a page for OAuth, but I think this is a bit excessive for the scope of a plugin.

It is possible to create a page for OAuth, but I think this is a bit excessive for the scope of a plugin.

I was thinking the same thing, in our setup I made it so that every route that goes to the normal login page is forced through the SSO uri.
module.exports = (_config, { strapi }) => {
  const redirects = ["/", "/index.html", "/admin/", "/admin/auth/login"].map(
    (path) => ({
      method: "GET",
      path,
      handler: (ctx) => ctx.redirect("/strapi-plugin-sso/azuread"),
      config: { auth: false },
    })
  );

  strapi.server.routes(redirects);
};

I investigated the possibility of customizing the login screen

Me too, sadly it's nothing something that would be easy, we could apply a patch to the strapi package, but that's sort of overkill.

It is possible to create a page for OAuth, but I think this is a bit excessive for the scope of a plugin.

Although I have toyed with the idea of this, I agree. My thought was we would recreate the login page, then redirect all attempts to get the standard login page to the new one we created. On the new one we created, it could have the normal login page and some buttons for auth with SSO depending on what is set up.
Anyway... hope the PR is up to your standards and can be merged. If I come up with anything else, I will open another PR!
Thanks for laying the groundwork!

@yasudacloud we can probably close this with the merge of #40, what do you think?

@adamrpostjr
I had to put it on hold because it was not published in npm.
We have just released v0.4.3! Thank you.


npm update-notifier cannot be disabled

Hi,
I am using Node + Appium. Every time, when i launch appium, npm is checking for latest version and it blocks our test execution for 5 minutes. the update wont happen because we are behind the corporate proxy.
is there any way to permanently or globally disable update-notifier.
or should i remove update-notifier module

hey,
i didn´t know anyone is using this tool anymore^^
i think the best way is to remove npm-update-notifier and choose one of the new better choices (for example greenkeeper to keep your dependencies up-to-date)
i will also move this repo to deprecated in favor for this tools.


Move mongoose to dev dependencies

The mongoose module is only used in tests for the MongoDB container. It can be listed as a dev dependency, so that projects using testcontainers don't have to pull-in mongoose and its dependency tree.

Thanks @pscanf, this was missed during review. Will release this ASAP.

https://github.com/testcontainers/testcontainers-node/releases/tag/v8.13.1

Great, thanks!


WSL is not installing

I downloaded the Ubuntu 20.04 LTS and I ran it. This is the output it gave me.
Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x8007019e The Windows Subsystem for Linux optional component is not enabled. Please enable it and try again. See https://aka.ms/wslinstall for details. Press any key to continue...
I looked it up online I found that I have to use the command
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart.
But that gives the error
`Deployment Image Servicing and Management tool
Version: 10.0.17134.1
Image Version: 10.0.17134.765
Error: 0x800f0831
Feature name Microsoft-Windows-Subsystem-Linux is unknown.
A Windows feature name was not recognized.
Use the /Get-Features option to find the name of the feature in the image and try the command again.
The DISM log file can be found at C:\Windows\Logs\DISM\dism.log`
I also found out that that I can use the GUI on Turn Windows Features on or off. But mine does not seem to load.

I found this article
It says to use the command
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
But that gives the error
`Enable-WindowsOptionalFeature : Feature name Microsoft-Windows-Subsystem-Linux is unknown.
At line:1 char:1

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows- ...

  + CategoryInfo          : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
  + FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand`

So, in summary, I am trying to run Ubuntu 20.04 LTS but it is telling me to install WSL Components but anything I do to install is not working. Could anyone help me with this?
Thanks!

10.0.17134.765

That is going to be too far back for a repro. If you can't get a list of features in "Turn Windows features on or off" then you have more general problems than WSL. Windows Update to latest (currently 2004 aka 20H1) can sometimes solve many ills by virtue of reinstalling all the things. Tangentially similar #3689.

Are you using x86 OS? only AMD64 or ARM64 supports WSL

@therealkenc  I have a Dell Computer and since my computer is very old it is not updating. According to Dell my computer is not compatible for any version then what I have right now.
@licanhua I have a X64 OS.

For the giggles, try running the following to see if you can install any optional components (nvm WSL). From an elevated Powershell:
PS C:\> Get-WindowsOptionalFeature -Online

If it returns anything (but presumably not Microsoft-Windows-Subsystem-Linux) try enabling something harmless like TelnetClient.
I found some lore on the web that might or might not help. It comes with no endorsement.
Another popular path forward, assuming your box is disposable, is to disregard Dell, install Windows from an image, and hope for the best. Sometimes it works out. YRMV.

`PS C:\Windows\system32>  Get-WindowsOptionalFeature -Online
Get-WindowsOptionalFeature : Get-WindowsOptionalFeature failed. Error code = 0x800f0831
At line:1 char:2

Get-WindowsOptionalFeature -Online

 + CategoryInfo          : NotSpecified: (:) [Get-WindowsOptionalFeature], COMException
 + FullyQualifiedErrorId : Microsoft.Dism.Commands.GetWindowsOptionalFeatureCommand

`
You may be right... I might not be able to use Get-WindowsOptionalFeature.

Yes, sadly there isn't a WSL actionable here (anymore than there is a TelnetClient actionable). Do hope you can get your old box whole again.

Ok Thanks for your help


Hide Edit Button

How to hide Edit Button , disable photo edit ,just show origin image

@iFallen
With the release of v1.0.0, you are now able to hide the edit button by setting both the avaiableCrops and avaiableFilters to nil.
Read the documentation herer for more detail:
https://github.com/congnd/FMPhotoPicker#ref-available-crops
Feel free to reopen this a gain if you need more support.


Use glog loop record in the for loop, the final record is incomplete

When i use glog loop record in the for loop,i found the final record is incomplete. Like this sample:
#include <glog/logging.h>
#include <iostream>
int main(int argc, char* argv[ ]){
    google::InitGoogleLogging(argv[0]);
    FLAGS_log_dir = "./log";
    for(int count = 0;count < 150;count++)
    {
        LOG(INFO) << "count = " << count;
        std::cout << "count = " << count << std::endl;
    }
    return 0;
}

When the program is finished, you just can see "count = 146 " in the log file，But you can see the output  "count = 149" in the terminal. The log file missing three records.

I cannot reproduce. Neither using the 0.5.0 release nor current master (370cb741bb060614ff41920b8bb1983349d2619d).
Since open files are flushed when they are closed, this indicates that your program does not exit properly.
Please provide the full output of the test application. Also: what platform are you on?

I cannot reproduce. Neither using the 0.5.0 release nor current master (370cb74).
Since open files are flushed when they are closed, this indicates that your program does not exit properly.
Please provide the full output of the test application. Also: what platform are you on?

Thank you for attention. Just now, i found the reason for this problem, it's has a special relationship with the screen ratio of my computer when full screen display. I  noticed that when i used gedit text editor open the log file and full screen display in my computer, the last few lines always cannot be displayed. But when i reduce the display window and scroll to the bottom, i could see complete log content. By the way,my computer system is Ubuntu 20.04.2 LTS and the screen ratio is 16:9.

I cannot reproduce. Neither using the 0.5.0 release nor current master (370cb74).
Since open files are flushed when they are closed, this indicates that your program does not exit properly.
Please provide the full output of the test application. Also: what platform are you on?


Julia: parentheses are not properly matched

Almost same as #6534

Browser: Brave 1.2

Attached patch should help with this.


Bug and Some Advice

ref to issue 1

Hi @jsbyysheng, apologies for the severe delay in getting this merged. While I have not done a thorough test, your changes look good. I will accept this pull request and encourage others to raise concerns or submit new pull requests if they encounter any issues.
Thanks again for your contribution!


Add tiff and svs minimum tags

Fix #165
This PR introduces a new "mode" for redaction alongside a new set of rules used for the new mode. By using the --strict flag with the imagedephi run command, users can now redact tiff-based whole slide images (.tiff, .svs) down to the minimum set of metadata so that the images can be read as tiff files.
minimum_rules.yaml
If the user supplies the --strict flag, then a new ruleset called minimum_rules.yaml is used for redaction. This rule set contains tiff and svs sections with keep-type rules for all required metadata tags and a fallback rule that deletes all other tags. Associated images are also deleted.
redact.py
The redact_images function now takes an additional keyword argument, strict. The function uses this argument to get the correct set of rules, and inform the creation of the redaction plan objects. For example, the get_base_rules function is passed this value and either returns a Ruleset object created from base_rules.yaml or minimum_rules.yaml based on the value of strict. Additionally, DICOM files are skipped in this mode. There is potential for future support in the mode for DICOM images when a minimum ruleset is determined.

The strict flag should be available in the plan subcommand.


nonePass

Apply not to each predicate and pass to allPass.

https://github.com/samhh/fp-ts-std/commit/0e5ca8b35514aa1c7f33ff3cf2cc82506647d70e


Rename consts as per changes in security plugin

Description
Rename consts as per changes in security plugin
Issues Resolved
[List any issues this PR will resolve]
Check List

[ ] New functionality includes testing.

[x ] All tests pass

[ ] New functionality has been documented.

[ ] New functionality has javadoc added

[ ] Commits are signed per the DCO using --signoff

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

Pretty scary that we have these circular dependencies ;)


Pipenv must not add dependencies if it doesnt exist

Hello everyone,
Current workflow of pip have an issue for example :
for example if you want to add pytest as dependency but you make a typo and forget e
pipenv install pytst
because of there isnt any package named pytst but Pipenv still adds it to Pipfile
Issue description
cat PipFile will still show that pytst added to Pipfile
Expected result
it must be added to Pipfile after checking that package exists

Duplicate of #3318


Status of TV not sync

Hi, actually i use homebridge with broadlink plugin (learn IR or RF codes).. I am able to turn on or turn off devices like tv.. But main problem is: If i Turn On tv using homekit, then after turnoff Tv using my tv remote, homebridge dont know that i turned off tv..  So if i ask to turn on tv, it says that its already on and does not send power command.. Is there any way to know if things are powered on or off or just ignore it and signal anyway? Now its configured as switch..
I think using CEC i could figure out this.. But tried without success..
The problem it happens in all my devices like drape, tv, sound system, etc..

I thinked in Perfect Solution for this.. But i dont know if it exist or could be developed..
If IR sensor receiver attached at raspeberry pi could detect new IR signals.. When it detect ir from remote, it change homekit status of device.. This way, never device would be out of sync because was used device ir remote or homekit..


Better span.markdown-embed parity with native Obisidan print to pdf

This took a while to track down, after noticing my @media print { ... } css files where rendering differently using your plugin compared to Obsidian's native print functionality.
Issue: broken block contexts
A better (but still not ideal) solution to have span.markdown-embeds behave similarly to native Obsidian, requires nested block-level elements to be inserted after the document.body.innerHTML has been set in line 206. Namely, certain block level elements (divs, blockquotes, etc.) force a break in the block context of a parent element (most notably
) which messes up the resulting HTML if set using document.body.innerHTML:

  Hello

broken

  world

Leads to the following output with orphaned nodes when parsed by .innerHTML:

  Hello

broken

world

A possible solution is base64 encoding the content of span.markdown-embed elements starting from the last element by changing
https://github.com/l1xnan/obsidian-better-export-pdf/blob/16229e564fd85a0c3a7764f8ed905e708aba8784/src/render.ts#L234-L246
to this encoding function and then recursively decoding the base64 encoded elements after document.body.innerHTML has been set:
https://github.com/l1xnan/obsidian-better-export-pdf/blob/16229e564fd85a0c3a7764f8ed905e708aba8784/src/modal.ts#L206
using this decoding function.
Workaround
This workaround maintains nested block level elements without forcing breaks in the block context of the parent element and messing up the layout. The following functions are added

encodeEmbeds(doc)

Starts from the last element using [...document.querySelectorAll('span.markdown-embeds')].reverse();
Encodes the innerHTML of span.markdown-embed elements using span.innerHTML = btoa(span.innerHTML)

decodeAndReplaceEmbed(element)

Utility within the appendWebview function
Decodes the innerHTML of span.markdown-embeds recursively

Note: the encodeEmbeds(doc) function may need to be rewritten to encode the deepest nested (sibling) elements first instead of starting with the last element. However, simply reversing the order of iteration seems fine in my testing, as deeply nested elements always come later when selected using document.querySelectorAll().

Before: broken block contexts
![betterPDF(24 04 18)nesting(issue)](https://github.com/l1xnan/obsidian-better-export-pdf/assets/27958097/ff806f35-6042-47d0-9f3b-8ba2e192831a | width=100)
After: original block contexts

Before: broken blocks

After: original blocks

Before: broken blocks

After: original blocks

Can you compare it with the official export effect?

As, display without the css borders? Or the result from the 'Export/Debug' actions?

As, display without the css borders? Or the result from the 'Export/Debug' actions?

Use the official Export to PDF feature to generate the PDF, then compare the results with the current output. We aim to maintain consistency with the official rendering as much as possible.

Will do. Here is the prettified HTML from the debugger in the mean time (notice the difference at 'some trailing text'):
Before

      hello

    \n

      Paragraph 1 with
       Nested block"
        src="bpdf(nest)#Nested block"
        class="internal-embed markdown-embed inline-embed is-loaded"
      >

        Nested block

      \n

Embedded paragraph.

    some trailing text.

    \n

Paragraph 2

    \n

      world

    \n

Paragraph 3

After

      hello

    \n

      Paragraph 1 with
       Nested block"
        src="bpdf(nest)#Nested block"
        class="internal-embed markdown-embed inline-embed is-loaded"
        >

            Nested block

          \n

Embedded paragraph.

      some trailing text.

    \n

Paragraph 2

    \n

      world

    \n

Paragraph 3

Will do. Here is the prettified HTML from the debugger in the meantime (notice the difference at 'some trailing text'):
Before

      hello

    \n

      Paragraph 1 with
       Nested block"
        src="bpdf(nest)#Nested block"
        class="internal-embed markdown-embed inline-embed is-loaded"
      >

        Nested block

      \n

Embedded paragraph.

    some trailing text.

    \n

Paragraph 2

    \n

      world

    \n

Paragraph 3

After

      hello

    \n

      Paragraph 1 with
       Nested block"
        src="bpdf(nest)#Nested block"
        class="internal-embed markdown-embed inline-embed is-loaded"
        >

            Nested block

          \n

Embedded paragraph.

      some trailing text.

    \n

Paragraph 2

    \n

      world

    \n

Paragraph 3

Great, could you please test non-ASCII characters?

Here is the PDF output:
Before

After

Great, could you please test non-ASCII characters?

I have added two btoa_utf8 and atob_utf8 utility functions to handle unicode characters.

In general however, I think it would be better to move away from this.preview.executeJavascript(...) to build the PDF DOM. This however, would require a more significant rewrite along these lines:

// Setting up containers
const printEl = document.body.createDiv("print");
const viewEl = printEl.createDiv({
  cls: "markdown-preview-view markdown-rendered " + cssclasses.join(" ")
});

...

// Rendering markdown
await MarkdownRenderer.render(app, lines.join("\n"), viewEl, file.path, comp);
await MarkdownRenderer.postProcess(...);

...

// Cloning elements
const printDoc = document.implementation.createHTMLDocument("document");
printDoc.body.appendChild(printEl.cloneNode(true));

// Copy Obsidian styles
printDoc.head =  document.head.innerHTML;

// Preparing data transfer
const blob = new Blob([html], {
  type: "text/html",
});

// Create object URL
const printUrl = window.URL.createObjectURL(blob);

...

// Transfer HTML to print preview
this.preview.loadUrl(printUrl);
this.preview.webContents.once("did-finish-load", async () => {

  // Clean up after --> not sure URL's can re revoked from within another webview
  URL.revokeObjectURL(printUrl);
  ... additional logic ...

})

But even then, the issue of .innerHTML breaking the block context of nested blocks may persist. The reason why it works in native Obisidian is that embeds are inserted after the initial DOM has been laid out, which prevents block context breakage (whether this pattern used by the Obsidian devs follows the proper HTML5 is another discussion).

In general however, I think it would be better to move away from this.preview.executeJavascript(...) to build the PDF DOM. This however, would require a more significant rewrite along these lines:

// Setting up containers
const printEl = document.body.createDiv("print");
const viewEl = printEl.createDiv({
  cls: "markdown-preview-view markdown-rendered " + cssclasses.join(" ")
});

...

// Rendering markdown
await MarkdownRenderer.render(app, lines.join("\n"), viewEl, file.path, comp);
await MarkdownRenderer.postProcess(...);

...

// Cloning elements
const printDoc = document.implementation.createHTMLDocument("document");
printDoc.body.appendChild(printEl.cloneNode(true));

// Copy Obsidian styles
printDoc.head =  document.head.innerHTML;

// Preparing data transfer
const blob = new Blob([html], {
  type: "text/html",
});

// Create object URL
const printUrl = window.URL.createObjectURL(blob);

...

// Transfer HTML to print preview
this.preview.loadUrl(printUrl);
this.preview.webContents.once("did-finish-load", async () => {

  // Clean up after --> not sure URL's can re revoked from within another webview
  URL.revokeObjectURL(printUrl);
  ... additional logic ...

})

But even then, the issue of .innerHTML breaking the block context of nested blocks may persist. The reason why it works in native Obisidian is that embeds are inserted after the initial DOM has been laid out, which circumvents block context breakage. Whether this method used by the Obsidian devs follows the proper HTML5 spec is a discussion I'll leave for another day...

In general however, I think it would be better to move away from this.preview.executeJavascript(...) to build the PDF DOM. This however, would require a more significant rewrite along these lines:

// Setting up containers
const printEl = document.body.createDiv("print");
const viewEl = printEl.createDiv({
  cls: "markdown-preview-view markdown-rendered " + cssclasses.join(" ")
});

...

// Rendering markdown
await MarkdownRenderer.render(app, lines.join("\n"), viewEl, file.path, comp);
await MarkdownRenderer.postProcess(...);

...

// Cloning elements
const printDoc = document.implementation.createHTMLDocument("document");
printDoc.body.appendChild(printEl.cloneNode(true));

// Copy Obsidian styles
printDoc.head =  document.head.innerHTML;

// Preparing data transfer
const blob = new Blob([printDoc], {
  type: "text/html",
});

// Create object URL
const printUrl = window.URL.createObjectURL(blob);

...

// Transfer HTML to print preview
this.preview.loadUrl(printUrl);
this.preview.webContents.once("did-finish-load", async () => {

  // Clean up after --> not sure URL's can re revoked from within another webview
  URL.revokeObjectURL(printUrl);
  ... additional logic ...

})

But even then, the issue of .innerHTML breaking the block context of nested blocks may persist. The reason why it works in native Obisidian is that embeds are inserted after the initial DOM has been laid out, which circumvents block context breakage. Whether this method used by the Obsidian devs follows the proper HTML5 spec is a discussion I'll leave for another day...

In fact, the way Obsidian handles internal embeds using nested divs is inherently incompatible with how pagedjs lays out pages, as its layouting algorithm requires HTML to adhere to the spec. I've been investigating integrating pagedjs and Obsidian for a while now, and am happy to draw up a roadmap or set of requirements if you're interested.

In fact, the way Obsidian handles internal embeds via nested divs is inherently incompatible with how pagedjs lays out pages, as its layouting algorithm requires HTML to adhere to the spec. Even when implementing a mechanism where block level elements are replaced with inline elements, this would result in user css styles likely becoming incompatible with the post-processed DOM.
I've been investigating integrating pagedjs and Obsidian for a while now, and am happy to draw up a roadmap or set of requirements if you're interested.

In fact, the way Obsidian handles internal embeds via nested divs is inherently incompatible with how pagedjs lays out pages, as its layouting algorithm requires HTML to adhere to the spec. Even when implementing a mechanism where block level elements are replaced with inline elements, this would result in user css styles likely becoming incompatible with the post-processed DOM.
I've been investigating integrating pagedjs and Obsidian for a while now, and am happy to draw up a roadmap or set of requirements if you're interested.

I initially attempted to integrate Paged.js and Obsidian, but failed (blank pages couldn't display). Do you have any good ideas?

I initially attempted to integrate Paged.js and Obsidian, but failed (blank pages couldn't display). Do you have any good ideas?

The latest beta has a lot of pagination fixes, but still has some issues when elements have display: none or overflow: hidden, or nested
 elements part of complex trees (e.g. tables). Generally, pagedjs works best with a 'flat' DOM structure where each element has an intrinsic width and height (hence why Obsidian embeds/code block replacements may cause issues).
However, the devs are quick to respond to your particular issues, as I haven't encountered the blank page issue previously. My guess is that the chunker and paginator have not properly finished. It is also good practice to isolate the pagedJSPolyFill inside a webview or  and have it run unaffected by styles and scripts present in the parent context.
In my view, the biggest hurdle to make pagedJS work with Obsidian is agreeing on how nested markdown is transformed into a single document: how to signal which notes are chapters, sections or paragraphs? How is the table of contents generated? How to best collect footnotes/sidesnotes and multi-column markdown? Resolve inconsistent heading levels? Merge/split list and tables? Dataview elements? The list goes on.
My current approach is generating a DAG and an AST of each note in the DAG and have a list of custom markdown transformers that are able to handle various cases. Making this work for all edge cases is no small feat.

I initially attempted to integrate Paged.js and Obsidian, but failed (blank pages couldn't display). Do you have any good ideas?

The latest beta has a lot of pagination fixes, but still has some issues when elements have display: none, overflow: hidden or nested
 elements inside complex trees (e.g. tables). Generally, pagedjs works best with a 'flat' DOM structure where each element has an intrinsic width and height (hence why Obsidian embeds/code block replacements may cause issues).
However, the devs are quick to respond to your particular issues as I haven't encountered the blank page issue previously. My guess is that the chunker and paginator have not properly finished. It is also good practice to isolate the pagedJSPolyFill inside a webview or  and have it run unaffected by styles and scripts present in the parent context.
In my view, the biggest hurdle to make pagedJS work with Obsidian is agreeing on how nested markdown is transformed into a single document: how to signal which notes are chapters, sections or paragraphs? How is the table of contents generated? How to best collect footnotes/sidesnotes and multi-column markdown? Resolve inconsistent heading levels? Merge/split list and tables? Dataview elements? The list goes on.
My current approach is generating a DAG and an AST of each note in the DAG and have a list of custom markdown transformers that are able to handle various cases. Making this work for all edge cases is no small feat.


Draft: make result order deterministic

This PR makes the order of results in a Result.*Pool deterministic so that the order of the result slice corresponds with the order of tasks submitted. As an example of why this would be useful, it makes it easy to rewrite iter.Map in terms of ResultPool. Additionally, it's a generally nice and intuitive property to be able to match the index of the result slice with the index of the input slice.
Comments inline.

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

Comparison is base (30a99cd) 99.31% compared to head (da32844) 99.36%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #126      +/-   ##
==========================================
+ Coverage   99.31%   99.36%   +0.04%
==========================================
  Files          12       12
  Lines         441      472      +31
==========================================
+ Hits          438      469      +31
  Misses          3        3

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

this does add an extra set of lock/unlock on the mutex

Yes, it does. It would be possible to use an atomic integer for reserving a slot, but it adds more complexity of the implementation and I wouldn't expect these to be a high-contention since in most cases, the task being done in a goroutine is large. We can do some benchmarking and improve perf later if the difference turns out to be significant.

Any plans to tag a new release with this change?


Turn on Port forwarding test in ItParameterizedDomain

With port forwarding turned on ItParameterizedDomain test passed at:
https://build.weblogick8s.org:8443/job/wko-okd-test/82/testReport/
in the log we can see  msg"Start port forward process"
There are some ItMiiAuxiliaryImage tests failed in the same run. I run the test locally and on Jenkins again. It passed at
https://build.weblogick8s.org:8443/job/wko-okd-test/85/

LGTM

Maggie, Can you post the results for all the tests in a single run.


Test test-lwt-jobs fails on 32-bit architectures

Hello,
I'm trying to make a decent Debian package for ocaml-ctypes. But the last version (0.6.2) fails to build on almost all architectures, even i386! Build logs are available at:
https://buildd.debian.org/status/package.php?p=ocaml-ctypes&suite=sid
One common issue is that running tests fails on 32-bit architectures, specifically in the test-lwt-jobs test. Relevant architectures for this issue are armel, armhf, i386, hurd-i386 and kfreebsd-i386. Note that ocaml-ctypes 0.4.1 used to build successfully on these architectures.
(The failures on other architectures seem due to other issues that will be reported separately.)

Thanks for the report!  I'll investigate this shortly, and look at making another release.

#403 may fix the problem.
The lwt-jobs tests use bindings to stat.  The layout of the struct stat type can vary according to the compiler options used --- for example, whether and how the macro _FILE_OFFSET_BITS is defined.
OCaml is configured by default with _FILE_OFFSET_BITS=64.  Any C files compiled by ocamlc or ocamlopt inherit that definition.  However, generated struct stubs in the tests are currently compiled with $(CC), without any mention of _FILE_OFFSET_BITS.  The lwt-jobs tests involve linking two files, compiled with these different sets of compiler options into the same program, leading to conflicting views about the layout of struct stat: the struct stat object passed to stat is allocated with one size, but stat expects a different (and larger) size, leading to attempts to write past the end of the object.
The fix is to use the same set of C compiler flags (extracted from the OCaml configuration) to compile all the C files in the tests.
@glondu, are you able to test whether the branch in #403 fixes the problems you're seeing on i386?

This patch indeed fixes compilation on armel, armhf, i386 and kfreebsd-i386. This issue can be closed.

Would it be helpful to have a 0.6.3 release that includes this patch?  I wouldn't usually make a release just for a change to the tests, but I'm happy to do so if it makes packaging easier.


Router GET with parameter and Nested Routes It's possible?

Hi, have a problem with the routes, it is the following:
All courses: Works
/courses

Specific course: Works
/courses/1

Specific course with Nested Routes: Doesn't work - 404
/courses/1/levels

courses.js
const levels = require('./levels');

const route = new koaRouter({
    prefix: '/courses'
});

route.get('/', koaBody(), async (context) => {
    // Some Logic
    context.body = { "Courses": "All" };
});

route.get('/:id', koaBody(), async (context) => {
    // Some Logic
    context.body = { "Course": "1" };
});

route.get('/:id/levels', levels.routes());

levels.js
const route = new koaRouter({
    prefix: '/levels'
});

route.get('/', koaBody(), async (context) => {
    // Some Logic
    context.body = { "Courses Levels": "All" };
});

Can anybody help me?

Works, using:
route.use('/:id', levelsRoutes.routes());

Example:
const levels = require('./levels');

const route = new koaRouter({
    prefix: '/courses'
});

route.get('/', koaBody(), async (context) => {
    // Some Logic
    context.body = { "Courses": "All" };
});

route.get('/:id', koaBody(), async (context) => {
    // Some Logic
    context.body = { "Course": "1" };
});

// Endpoint for /levels
route.use('/:id', levelsRoutes.routes());

Thank you, seems strange because i need 'repeat' the same route.


cmd/link: link reports "symbol listed multiple times" if go:linkname into both vendor package and non-vendor package

What version of Go are you using (go version)?

$ go version
go version go1.15.3 darwin/amd64

Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/myusername/Library/Caches/go-build"
GOENV="/Users/myusername/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/myusername/GolangProjects/pkg/mod"
GONOPROXY="*.mycompanydomain.org"
GONOSUMDB="*.mycompanydomain.org"
GOOS="darwin"
GOPATH="/Users/myusername/GolangProjects"
GOPRIVATE="*.mycompanydomain.org"
GOPROXY="https://go-mod-proxy.mycompanydomain.org,https://goproxy.cn,https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.15.3/libexec"
GOSUMDB="sum.golang.google.cn"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.15.3/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/myusername/Sources/tests/test_go/main/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/h3/c5bgpd9921d0tbkpf5n9vh2w0000gn/T/go-build518026853=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Create a directory structure like this:

.
├── foo
│   ├── foo.go
│   └── go.mod
└── main
    ├── go.mod
    └── main.go

// $ cat foo/go.mod
module github.com/chenzhuoyu/env

go 1.15

// $ cat foo/foo.go
package foo

var bar string

func GetBar() string {
    return bar
}

func init() {
    bar = ""
}

// $ cat main/go.mod
module github.com/chenzhuoyu/linker_issue

go 1.15

replace github.com/chenzhuoyu/foo v0.0.0 => ../foo

require github.com/chenzhuoyu/foo v0.0.0

// $ cat main/main.go
package main

import (
    _ `unsafe`

    `github.com/chenzhuoyu/foo`
)

//go:linkname v1 github.com/chenzhuoyu/foo.bar
var v1 string

//go:linkname v2 github.com/chenzhuoyu/linkname/vendor/github.com/chenzhuoyu/foo.bar
var v2 string

func main() {
    v1 = v2
    foo.GetBar()
}

Build the main package.

$ cd main
$ go build .

What did you expect to see?
The main package builds just fine.
What did you see instead?
$ go build .
# github.com/chenzhuoyu/linker_issue
2020/11/05 23:56:41 symbol go.info.github.com/chenzhuoyu/foo.bar listed multiple times

I have also tried:

go 1.14.10 works fine.

$ cd main
$ ls
go.mod  main.go
$<EMAIL_ADDRESS>version
go version go1.14.10 darwin/amd64
$<EMAIL_ADDRESS>build .
$ ls
go.mod  linker_issue*  main.go

Passing -ldflags='-w' to the compiler also works fine.

$ go build -ldflags='-w' .
$ ls
go.mod  linker_issue*  main.go

After searching for several hours, I found these related issues, but they are not very helpful to me.

https://github.com/golang/go/issues/11699
https://github.com/golang/go/issues/15926
https://github.com/golang/go/issues/28159

I'll take a look.

A note before getting into the details of the bug:  please be aware that the behavior + implementation of "//go:linkname" is explicitly not covered by the Go 1 compatibility guarantee; the fact that importing "unsafe" is required is intended to reinforce this.
As the toolchain changes over time, the implementation and behavior of "//go:linkname" can evolve. There are uses of "//go:linkname" that may work with version X of the Go toolchain and then not work with version X+1.  For example, using "//go:linkname" to reach from package A into a dependent package B to access one of B's non-exported symbols is something that works today, but may very well not work with future versions of Go.
Regarding the Go program in the bug:
This program contains behavior that happened to work with the Go 1.14 toolchain implementation of "//go:linkname" but does not work with Go 1.15. In Go 1.14, linking and symbol resolution is done using an entirely name-driven basis; all (or virtuall all) symbols are named, and at link time two symbols with the same name wind up mapping to same linker symbol, regardless of which package or compilation unit the symbol was defined in.
What this means is that for Go 1.14 when you write
  //go:linkname v1 github.com/chenzhuoyu/foo.bar
  var v1 string

this has the effect of making "v1" (defined in main.go) and "bar" (defined in foo.go) virtually the same symbol at link time. If you look in the final binary produced by Go 1.14 for this example, there are only two "foo.bar" variables.
In Go 1.15 we moved to a new object file format and a new way of doing symbol resolution. For most regular Go symbol definitions (variables, functions) the compiler assigns the symbol an index within the object file; when the linker reads the object file, it sees the symbol (roughly) as a tuple <P,S> where P is a numeric package ID and S is a numeric symbol ID.
What this means for Go 1.15 is that there are actually three "foo.bar" strings: one defined in package foo and two in package main; each has a unique identity using the new index-based scheme. Two of the three symbols happen to have the same name, which results in a collision during DWARF generation.

I'm not sure I understand the issue.

github.com/chenzhuoyu/linkname/vendor/github.com/chenzhuoyu/foo.bar

Where do you vendor this? I didn't see any vendor directory or any vendor command.
Also, do you run into this issue in real code, or just this synthetic example?

Where do you vendor this? I didn't see any vendor directory or any vendor command.

I don't, I just write it there.

Also, do you run into this issue in real code, or just this synthetic example?

I ran into this issue in real code in our library, it is only used for unittests, so there are a lot of "hacks" in it. The code above is just a simplification.
Some of our legacy projects use dep to manage dependencies, so the code needs to work with both vendored projects and non-vendored projects, but upgrading to Go 1.15.3 breaks a lot of our tests. :(
Maybe we should consider refactoring the library and get rid of go:linkname, but that will be a lot of work. :(

A note before getting into the details of the bug: please be aware that the behavior + implementation of "//go:linkname" is explicitly not covered by the Go 1 compatibility guarantee; the fact that importing "unsafe" is required is intended to reinforce this.

We only use "//go:linkname" for unittests, not in our production code.
There are some not-so-well-designed libraries that come with a lot of side-effects (performing I/O within init, reading environment variables, etc), which can cause our tests to be very unstable.
The "//go:linkname" is a way we found to "hack" these libraries and set them into a certain state for our tests.

As the toolchain changes over time, the implementation and behavior of "//go:linkname" can evolve. There are uses of "//go:linkname" that may work with version X of the Go toolchain and then not work with version X+1. For example, using "//go:linkname" to reach from package A into a dependent package B to access one of B's non-exported symbols is something that works today, but may very well not work with future versions of Go.

Should I conside "//go:linkname" as some sort of "undefined behavior" ?

I wouldn't say that //go:linkname is undefined behavior.  But it is unsafe, and it is not covered by the Go 1 compatibility guarantee.  If you choose to use it, you must be prepared to adjust your use with each new Go release.
In general I would advise against using it.


Schema and Code Refactor

strict schema naming entityAction
createMeasurement -> measurementCreate
createSeries -> serieCreate
archiveMeasurable -> measurableArchive
and so on
less variety of functions (on our side, not in the schema)
data.measurablesData.archiveMeasurable -> data.measurablesData.updateOne
data.usersData.editUser -> data.usersData.updateOne
pull out authentication from the data layer into schema
usersData should not know about getAuth0
return a promise from lib/notifications
use absolute paths in require with NODE_PATH var
use db transactions

I like (1).
I'm hesitant to accept all of (2); I like the idea of having an updateOne method for most things, but having some specific methods like archive seems nice. I prefer pushing complexity to the server where possible.
This post recommends specific mutations, which makes sense to me.
3 Sounds good to me as well.
I think we'll eventually need some other things; like setting up a Relay-style edge/node ontology, for pagination. That could be done separately though, but should be discussed.

(2) I meant we keep the external interface of the server with specific mutations but have it implemented internally with a standard data layer interface
added 4 and 5 more @OAGr

Oh, makes sense, that sound good to me.

Tip
createMeasurement -> measurementCreate
createMeasurable -> measurableCreate
createSeries -> seriesCreate
archiveMeasurable -> measurableArchive
unArchiveMeasurable -> measurableUnarchive
editMeasurable -> measurableUpdate
editUser -> userUpdate

For now, we are not sure about
5) use absolute paths in require with NODE_PATH var
6) use db transactions
This is why we miss it within this PR.

Ok, thanks for mentioning that.


Added "edit columns" to search tab

@DmitryKey This is a PR for the "edit columns" after merging to the 'luke-thinlet' branch

thanks @yossivainshtein for your contribution! Let me check this one more time and prep a release.


etcd drop-in is not applied

On CoreOS 435.0.0 in my cloudinit config yaml I have:
coreos:
  etcd:
    name: akl2.example.com
    addr: <IP_ADDRESS>:4001
    peer-addr: <IP_ADDRESS>:7001
    discovery: https://discovery.etcd.io/token

However etcd starts with a name of default which is set in /usr/lib/systemd/system/etcd.service.
The value in /run/systemd/system/etcd.service.d/20-cloudinit.conf is not being applied despite systemd recognizing the drop-in and it having the expected content from the cloudinit config yaml.
$ systemd-delta --type=extended /run/systemd/system
[EXTENDED]   /usr/lib/systemd/system/fleet.service → /run/systemd/system/fleet.service.d/20-cloudinit.conf
[EXTENDED]   /usr/lib/systemd/system/etcd.service → /run/systemd/system/etcd.service.d/20-cloudinit.conf
[EXTENDED]<EMAIL_ADDRESS>→<EMAIL_ADDRESS>
$ systemctl status etcd.service
● etcd.service - etcd
   Loaded: loaded (/usr/lib64/systemd/system/etcd.service; enabled)
  Drop-In: /run/systemd/system/etcd.service.d
           └─20-cloudinit.conf
   Active: active (running) since Sat 2014-09-13 15:33:12 NZST; 5h 42min ago
 Main PID: 451 (etcd)
   CGroup: /system.slice/etcd.service
           └─451 /usr/bin/etcd

Sep 13 15:33:12 akl4 systemd[1]: Started etcd.
Sep 13 15:33:12 akl4 systemd[1]: Started etcd.
Sep 13 15:33:12 akl4 etcd[451]: [etcd] Sep 13 15:33:12.779 INFO      | default: state changed from 'follower' to 'candidate'.
Sep 13 15:33:12 akl4 etcd[451]: [etcd] Sep 13 15:33:12.779 INFO      | default: state changed from 'candidate' to 'leader'.
Sep 13 15:33:12 akl4 etcd[451]: [etcd] Sep 13 15:33:12.779 INFO      | default: leader changed from '' to 'default'.
Sep 13 16:16:02 akl4 etcd[451]: [etcd] Sep 13 16:16:02.456 INFO      | default: snapshot of 10006 events at index 10006 completed
Sep 13 17:20:59 akl4 etcd[451]: [etcd] Sep 13 17:20:59.826 INFO      | default: snapshot of 10003 events at index 20009 completed
Sep 13 18:25:57 akl4 etcd[451]: [etcd] Sep 13 18:25:57.200 INFO      | default: snapshot of 10002 events at index 30011 completed
Sep 13 19:30:54 akl4 etcd[451]: [etcd] Sep 13 19:30:54.588 INFO      | default: snapshot of 10003 events at index 40014 completed
Sep 13 20:35:51 akl4 etcd[451]: [etcd] Sep 13 20:35:51.958 INFO      | default: snapshot of 10003 events at index 50017 completed

$ systemctl cat etcd.service
# /usr/lib64/systemd/system/etcd.service
[Unit]
Description=etcd

[Service]
User=etcd
PermissionsStartOnly=true
Environment=ETCD_DATA_DIR=/var/lib/etcd ETCD_NAME=default
ExecStart=/usr/bin/etcd
Restart=always
RestartSec=10s

# /run/systemd/system/etcd.service.d/20-cloudinit.conf
[Service]
Environment="ETCD_ADDR=<IP_ADDRESS>:4001"
Environment="ETCD_DISCOVERY=https://discovery.etcd.io/token"
Environment="ETCD_NAME=akl4.example.com"
Environment="ETCD_PEER_ADDR=<IP_ADDRESS>:7001"

@superstructor Have you had a chance to try this with a newer version of flannel? Is it still an issue?


Pass all fingerprints from SDP to dtls transport

Before pion was only checking against the first fingerprint found in
the SDP, now all fingerprints from the SDP are used to validate
during the dtls handshake.
Description
Reference issue
Fixes #...

@suhasgaddam
Here is the text from the RFC
   The fingerprint attribute may be either a session-level or a media-
   level SDP attribute.  If it is a session-level attribute, it applies
   to all TLS sessions for which no media-level fingerprint attribute is
   defined.

So it sounds like we need to ignore the session level attribute, for each of the individual ones. I think this is the proper logic then.

Loop through each media sections. If you find a fingerprint use it, confirm that all the fingerprints match though. Currently we only support one DTLSTransport, so that is an important error to communicate to the user.
If we didn't find anything at the media level, then check the session level. If there isn't anything at the session level return an error.

Sorry I didn't respond sooner!

@suhasgaddam hey! no rush, but anything I can do to help here?
Hopefully you are still using Pion for your project. If not I am happy to write/land this change myself, but would much rather see contributors :)
thanks (and no rush!)

@Sean-Der, I am still using pion. The current changeset was a quick and dirty fix for me(and I didn't know what should happen if there are multiple fingerprints). I can still fix this up according to the RFC, as long as no one is in a rush for the fix.

I still need to test this against an actual application. What should happen if N media sections, 1 section does not have a fingerprint?

I still need to test this against an actual application. What should happen if N media sections, 1 section does not have a fingerprint?

It should use the session fingerprint.
If the session doesn't match the other Media fingerprints then we need to error out. In the future we can support multiple fingerprints (multiple DTLS sessions) but for the time being we just support one DTLSTransport.

No rush either! I think this is a great fix (and I am sure people are hitting this today) so will be great to get in :)

Closing for #1023


Backport #25415: fips: RNG health tests for FIPS 140-3

Backport of #25415 to 3.4
FIPS 140-3 mandates that the health tests in SP 800-90B section 4 are done on the output of any entropy source.
They are implemented here as a replacement for the primary DRBG in the FIPS provider. This results in a setup that looks like this:
               +-------------+
               |             |
               | Seed Source |
               |             |
               +------+------+
                      |
                      |
                      v
               +-------------+
               |             |
               |  CRNG Test  |
               |             |
               ++----------+-+
                |          |
                |          |
                v          v
    +--------------+     +--------------+
    |              |     |              |
    | Public DRBG  |     | Private DRBG |
    |              |     |              |
    +--------------+     +--------------+

An additional benefit, that of avoiding DRBG chains, is also gained. The current standards do not permit the output of one DRBG to be used as the input for a second (i.e. a chain).
This also leaves open the future possibility of incorporating a seed source inside the FIPS boundary.

[x] documentation is added or updated
[x] tests are added or updated

Rebased to remove fairly trivial conflict from #25511.

LGTM but could you please add a CHANGES.md entry? Also please create a new PR against the master branch which will sync the fixes missing there.

This change is quite strange to me. Section 4 of SP 800-90B explicitly says:

Health tests are applied to the outputs of a noise source before any conditioning is done. (It is permissible to also apply some health tests to conditioned outputs, but this is not required.)

As far as I know, OpenSSL does not implement a "noise source" but instead gets entropy from other entropy sources (such as getrandom) which already perform conditioning?

This pull request is ready to merge

Merged to the 3.4 branch. Thank you for your contribution.


Remediation not working for policy Deploys NSG flow logs and traffic analytics to a storageaccountid with a specfied retention period.

Describe the bug
Remediation for the policy 'Deploys NSG flow logs and traffic analytics to a storageaccountid with a specfied retention period.' does not work. The error is:
Reason
No policy evaluation result was found. The policy assignment's exclusions may have changed or it no longer exists. Please retry the remediation with 'ResourceDiscoveryMode' set to 'ReEvaluateCompliance'.
Steps to reproduce

Deploy the policy definition and create an assignment
Create a NSG without flowlogs configured
NSG becomes non-compliant after a. while
Create a remediation task. The task fails. with the error above and the NSG remains non-compliant.

Screenshots

Thanks @neok-g for the issue.
Can you confirm the definition ID of the policy as we have 2 with the same description:

https://www.azadvertizer.net/azpolicyadvertizer_all.html#{"col_3"%3A{"flt"%3A"nsg"}%2C"col_10"%3A{"flt"%3A"ESLZ"}}
Thanks
Jack

Hi @jtracey93
Thanks for your response. The policy definition ID of the policy we use is:
/providers/Microsoft.Management/managementGroups/mg-pg-prd/providers/Microsoft.Authorization/policyDefinitions/Deploy-Nsg-FlowLogs
Thanks

Any update on this one?

@jtracey93 Do you need more input from my side? Are you able to reproduce this one?

Hi @neok-g,
I think we are all good, just some time to investigate amongst some other items that we are working on.
Hopefully will get a chance to look this week 👍

@neok-g, are you able to test this version of the policy please and let us know if it works? https://www.azadvertizer.net/azpolicyadvertizer/Deploy-Nsg-FlowLogs-to-LA.html

@jtracey93 Thanks! I will take a look at it today

Perfect @neok-g let us know how it goes

@jtracey93 I guess you shared the wrong one. We use the "Deploys NSG flow logs and traffic analytics" instead of "Deploys NSG flow logs and traffic analytics to Log Analytics" since we want provide our own storageaccount.

@jtracey93 No problem. The thing is we would like to specify retention period in combination with a self-chosen storage account. The only policy that seems to offer both is "Deploys NSG flow logs and traffic analytics". The built-in "Configure network security groups to use specific workspace for traffic analytics" has retention hardcoded 0 days and disabled.

Any update on this one?

Could you please provide an update on this one?

Hey @neok-g,
We are awaiting to review and merge PR #1022 before working on these. We hope to review and merge this PR this week.

Trigger ADO Sync 1

Trigger ADO Sync 2

@neok-g been a long time since we've provided updates, apologies. Please note, we have deprecated the ALZ custom policies for "Deploy NSG flow logs *" and they have been superseded by the built-in policy https://www.azadvertizer.net/azpolicyadvertizer/e920df7f-9a64-4066-9b58-52684c02a091.html.
This should address your issue.


UserGuide: remove note on partial collapse of auxcoords.

Since #3028, this line in the user guide is no longer true.

#3319 fixed this in the v2.2.x branch, so think this is now redundant.


Put every vhost (site) on a separate network.

@mbtamuli Not sure how you are planning to do it! 🤞

We are already doing it. If you don't have the latest version, just run ee4 update and check.


Should deep() be deep_flatten() in deep_flatten.py ?

deep is an undefined name in this context.
<https://github.com/kriadmin/30-seconds-of-python-code/blob/master/test/deep_flatten/deep_flatten.py#L14
./test/deep_flatten/deep_flatten.py:14:35: F821 undefined name 'deep'
        spread(list(map(lambda x: deep(x) if type(x) == list else x, arr))))
                                  ^

It has been updated.  Thanks


ptpDefaultDataset stepsRemoved parameter type

ITU profiles and IEEE specifications define stepsRemoved as part of the currentDS, as Uint16.
In current model, the parameter is included in both ptDefaultDataset and ptpSourceDatasets. Not sure if its meaningful in both, but in any case the type should be consistent.
Taking as a reference the latest shared gendoc file (v.220404.1830_AlWe_TH) in the ptpSourceDataset the type has already been marked as INT16, but in the ptpDefaultDataset the parameter seems to keep in the description the original INT8
NOTE: to be reviewed in parallel to issue #41

Had already been corrected to INT16 in both occurrences.

Proposal to the 5G-xhaul call on 7th of September:
Deleting the occurrence of the stepsRemoved attribute in the PtpDefaultDataset.


📚 Documentation: Updated Website Information

What does this PR do?
This PR updates the latest images in README.md file.
Fixes #1348
Additional Information
Hi @akshitagupta15june, If you consider this PR to get merged, please merge it.

I've updated the latest images in the README.md file.

I've updated the latest images in the README.md file.
Images can be seen here: https://github.com/akshitagupta15june/PetMe/pull/1349/files

Hi @akshitagupta15june, I've updated the latest images in the README.md file.
Images can be seen here: https://github.com/akshitagupta15june/PetMe/pull/1349/files


added vscode auto detection in macOS

This PR adds vscode auto detection for macOS so we can use the vcpkg edit command

LGTM pending CI! Thanks for the PR!


Update package.json

update the version number, according the npm release

Thank you @bassjobsen
Unfortunately there was a build error, but it has nothing to do with your commit. Could you close this pull request and make another one. The build should pass :-)

The latest version will be 1.4.0


Autosplitter doesn't work on Epic Game version of messenger

Hello,
I'm curious to know why autosplitter doesn't work on epic store version of the game?
Does the issue come from th ASL script or from the LiveSplit project ?
Thank you in advance
Basile

Fixed in new splitter


Add support for upgraded wilderness weapons

#20
Added tracking of the upgraded wilderness weapons

Also, is there a purpose to separating the upgraded and non-upgraded variant?
It is possible to have them share config values (see crystal armor, .configKeyName("crystal_body").settingsConfigKey("crystal_armour")), which sounds good since most people probably won't want different settings for the upgraded vs non-upgraded variants.

Ok going point by point,
I have tested with both the webweaver and the accursed scepter. And tracking has been working with both of them no .
For the (a) variant sure I'll include it and yes the messages do popup with these as well.
Sure I'll rebase and include the new config, it does look promising to use the shift menu.
No problem on merging the config of the upgraded and non-upgraded versions.


Make sure financing percentages are sorted as expected

It seems that something in the Semantic Works stack doesn't handle sorting values with the xsd:floats type properly. The frontend receives the records in the wrong order.
Explicitly converting the floats to a xsd:decimal solves the problem so we use that as a workaround for now.

I used this query from the Virtuoso admin interface to convert the percentages. Running the migration now to see if it works there.

Ok, it seems that the query never worked as-is. When I executed it I made a mistake in the second query so it didn't actually do anything. After I fixed it I ran the query again and everything works.
Executing the 2 queries at separately works, running them together has the same issue as the single query solution (not everything would be converted to a decimal). The only thing I can think of now is splitting this into 2 separate migration files..


SimPyramid has a fixture that is too large

This shows up in https://deploy-preview-52--fruk-simulator-core.netlify.app/
The robot contact sensor triggers before it even gets close to the pyramid. The fixture looks like it's double the intended size

Matts PR which adds debug mode fixes this issue, I think the debug mode actually caught this issue!


Unsupported provider

{"code":400,"msg":"Unsupported provider: provider is not enabled"}
Not working GitHub signin button after install and first visit.

Hi @paveltaran this looks like an issue we've been discussing on our Discord.
It's a problem with our local setup that isn't ideal at the moment. We're working on it. Thank you for reporting

Hey @Strajk, this indeed should be the "solution". Sorry for this roadblock! We thought by sharing different envs with it should've been fixed


[2448] Update accessibility page

Context
Updating the accessibility page in line with DAC's audit and adding a back link.
Changes proposed in this pull request

Update the accessibility page content in line with the Trello ticket
Add a back link

Guidance to review

Visit /accessibility

 [S] Update Register's accessibility statement

Looks good @avinhurry


Training on 1.4.1 hangs

Hi,
Since the upgrade to 1.4 I trained a few runs and each hung after a few hours.
seems to be a comparable issue related here #494 and here #496
Anyone with similar problem ?
Just to be clear, it goes up to freezing the machine need a hard reboot.
I trained without any issue on another toolkit (just to check it was not a hard drive / gpu issue)

I have the same issue and it happens all the time.


optimized mybatis statement, "where 1=1" replace to label

// Describe your PR here; eg. Fixes #issueNo

Make sure that:

[ ] You have read the contribution guidelines.
[ ] You submit test cases (unit or integration tests) that back your changes.
[ ] Your local test passed mvn clean install -Dmaven.javadoc.skip=true.

Codecov Report

Merging #1107 (44c6c1e) into master (8b843d9) will decrease coverage by 0.84%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #1107      +/-   ##
============================================
- Coverage     74.64%   73.79%   -0.85%
+ Complexity     2181     2174       -7
============================================
  Files           365      365
  Lines          8202     8202
  Branches        906      906
============================================
- Hits           6122     6053      -69
- Misses         1623     1698      +75
+ Partials        457      451       -6

Impacted Files
Coverage Δ
Complexity Δ

...soul/client/tars/TarsServiceBeanPostProcessor.java
28.76% <0.00%> (-49.32%)
8.00% <0.00%> (-4.00%)

...soul/client/sofa/SofaServiceBeanPostProcessor.java
18.91% <0.00%> (-40.55%)
5.00% <0.00%> (-3.00%)

.../soul/plugin/httpclient/NettyHttpClientPlugin.java
57.14% <0.00%> (-2.05%)
10.00% <0.00%> (ø%)

...omara/soul/sync/data/http/HttpSyncDataService.java
63.72% <0.00%> (-1.97%)
12.00% <0.00%> (ø%)

Continue to review full report at Codecov.

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


How do I get hdevtools to check files within stack projects?

I don't know when exactly this took place. Within the last couple weeks I have noticed this error message when Neomake invokes hdevtools: Neomake: hdevtools completed with exit code 1. I decided to do something about it today. I figured it might have something to do with GHC 8.0.1. So I've reinstalled hdevtools with stack and the resolver is nightly-2016-06-21. It works just fine on my XMonad config and even shows a warning about a shadow binding in my file. Anytime I try to check any of my files in a stack project it seems to have issues.
If I run hdevtools without --no-ghc-package-path it prints Cabal error: ghc-pkg dump failed. I killed the server and tried running check to which I am greeted with hdevtools: <socket: 4>: hGetLine: end of file. I've tried using absolute paths to check, src/Main.hs and -g -isrc Main.hs which results in the same thing.
Here is the direct output from my shell:
~/workspace/learning/battleship > stack exec -- hdevtools check src/Main.hs
Cabal error: ghc-pkg dump failed
~/workspace/learning/battleship > stack exec hdevtools -- --status
Server is running.
~/workspace/learning/battleship > stack exec hdevtools -- --stop-server
Shutting down server.
~/workspace/learning/battleship > stack exec --no-ghc-package-path hdevtools -- check src/Main.hs
hdevtools: <socket: 4>: hGetLine: end of file
~/workspace/learning/battleship > stack exec hdevtools -- --status
hdevtools: connect: does not exist (No such file or directory)
~/workspace/learning/battleship > stack exec --no-ghc-package-path hdevtools -- --start-server
~/workspace/learning/battleship > stack exec --no-ghc-package-path hdevtools -- --status
Server is running.
~/workspace/learning/battleship > stack exec --no-ghc-package-path hdevtools -- check src/Main.hs
hdevtools: <socket: 3>: hGetLine: end of file
~/workspace/learning/battleship > stack exec --no-ghc-package-path hdevtools -- check -g -irsc src/Main.hs
hdevtools: <socket: 4>: hGetLine: end of file
~/workspace/learning/battleship > stack exec --no-ghc-package-path hdevtools -- check -g -irsc Main.hs
hdevtools: <socket: 4>: hGetLine: end of file
~/workspace/learning/battleship > stack exec --no-ghc-package-path hdevtools -- check /home/swilliams/workspace/learning/battleship/src/Main.hs
hdevtools: <socket: 4>: hGetLine: end of file

Here's what I'm using and versions:

Neovim 0.1.4 (and Neomake)
GHC 8.0.1 (System wide for XMonad)
stack 1.1.2
hdevtools <IP_ADDRESS> (ghc-8.0.1-x86-64-linux, cabal-<IP_ADDRESS>)
Arch Linux x86_64 (updated on June 23 2016 in the morning Eastern Daylight Time)

Also something else I'm wondering about is if there is a place on IRC, mailing-list, forum or any other appropriate means for addressing user configuration issues because I'm guessing it's my fault and not the program.

Hey,
currently Github issues is the way I try to support people on such topics.
First of all, hdevtools spawns a server if no one is running, and keeps it alive until the client is called with --stop-server or the unix domain socket (created in the working dir by default) is deleted. So if you try to run hdevtools in different configurations / versions, always make sure you start a fresh server.
Next, hdevtools has to be compiled with the same ghc version as the modules it loads / checks. The hGetLine error is in the client when the server is not responding correctly, you can probably get an error message by startng the server in non-daemon mode with `--start-server -n.
So, stop the server, maybe re-install hdevtools with the stack resolver of your project and have a look whether you get server errors.
Btw, today I fixed an issue in finding the stack.yaml, maybe you could also try the cloned master branch?
Sent from TypeApp
On Jun 23, 2016, 10:10 PM, at 10:10 PM, Steven Michael Williams<EMAIL_ADDRESS>wrote:

I don't know when exactly this took place. Within the last couple weeks
I have noticed this error message when Neomake invokes hdevtools:
Neomake: hdevtools completed with exit code 1. I decided to do
something about it today. I figured it might have something to do with
GHC 8.0.1. So I've reinstalled hdevtools with stack and the resolver is
nightly-2016-06-21. It works just fine on my XMonad config and even
shows a warning about a shadow binding in my file. Anytime I try to
check any of my files in a stack project it seems to have issues.
If I run hdevtools without --no-ghc-package-path it prints Cabal error: ghc-pkg dump failed. I killed the server and tried running
check to which I am greeted with hdevtools: <socket: 4>: hGetLine: end of file. I've tried using absolute paths to check, src/Main.hs and -g
-isrc Main.hs which results in the same thing.
Here is the direct output from my shell:
~/workspace/learning/battleship > stack exec -- hdevtools check
src/Main.hs
Cabal error: ghc-pkg dump failed
~/workspace/learning/battleship > stack exec hdevtools -- --status
Server is running.
~/workspace/learning/battleship > stack exec hdevtools -- --stop-server
Shutting down server.
~/workspace/learning/battleship > stack exec --no-ghc-package-path
hdevtools -- check src/Main.hs
hdevtools: <socket: 4>: hGetLine: end of file
~/workspace/learning/battleship > stack exec hdevtools -- --status
hdevtools: connect: does not exist (No such file or directory)
~/workspace/learning/battleship > stack exec --no-ghc-package-path
hdevtools -- --start-server
~/workspace/learning/battleship > stack exec --no-ghc-package-path
hdevtools -- --status

Server is running.
~/workspace/learning/battleship > stack exec --no-ghc-package-path
hdevtools -- check src/Main.hs

hdevtools: <socket: 3>: hGetLine: end of file
~/workspace/learning/battleship > stack exec --no-ghc-package-path
hdevtools -- check -g -irsc src/Main.hs
hdevtools: <socket: 4>: hGetLine: end of file
~/workspace/learning/battleship > stack exec --no-ghc-package-path
hdevtools -- check -g -irsc Main.hs
hdevtools: <socket: 4>: hGetLine: end of file
~/workspace/learning/battleship > stack exec --no-ghc-package-path
hdevtools -- check
/home/swilliams/workspace/learning/battleship/src/Main.hs
hdevtools: <socket: 4>: hGetLine: end of file

Here's what I'm using and versions:

Neovim 0.1.4 (and Neomake)
GHC 8.0.1 (System wide for XMonad)
stack 1.1.2
hdevtools <IP_ADDRESS> (ghc-8.0.1-x86-64-linux, cabal-<IP_ADDRESS>)
Arch Linux x86_64 (updated on June 23 2016 in the morning Eastern
Daylight Time)

Also something else I'm wondering about is if there is a place on IRC,
mailing-list, forum or any other appropriate means for addressing user
configuration issues because I'm guessing it's my fault and not the
program.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/hdevtools/hdevtools/issues/25

Outside of stack projects it's working fine with stackage build that has GHC 8.0.1. Otherwise I get this message when I run hdevtools in non-daemon mode: hdevtools: /usr/lib/ghc-7.10.3/settings: openFile: does not exist (No such file or directory) If I run the hdevtools that I have built with 8.0.1 inside a stack project I get the same thing. I have tried using the same resolver as I have on my project and that doesn't seem to make a difference.
Based on what you have said regarding hdevtools needing to be compiled with the same version of GHC as my projects does that mean I will need to have sandboxed versions of it in all of my projects if the resolvers differ?
I did try the master branch and it doesn't seem to have any effect.

Using the same resolvers (or installing hdevtools again from within your project) just ensures it is compiled against the same GHC as your project is using.
So in order to use the same GHC it has to be invoked via stack as well (as stack knows where GHC versions installed by it reside - i.e. ~/.stack/programs). Have a look at the alias I added to the readme. Does that help?

I've been running the command that is aliased which is stack exec --no-ghc-package-path hdevtools -- and it seems to be running into /usr/lib/ghc-{version}/settings: openFile: does not exist with GHC versions prior to 8.0.1 if I start the server within the stack environment using no-daemon mode, or I just get the opaque end of line message otherwise. The issue seems to be in it finding that settings file for older versions. I just set it as an alias to be sure and that hasn't changed anything except when I run it without no-daemon mode it just hangs and never tells me why it isn't working. Attempting to start the server manually with the -n flag doesn't produce an error until you go to check status and it says connect: does not exist. How do I setup things up for it to see the settings file in ~/.stack/programs/?

Hm..never needed to point to settings files, probably some mismatch of ghc-pkg and package databases. Any concrete steps on how to reproduce your problem? Is the project open source? Which resolver? From where is hdevtools invoked?
Sent from TypeApp
On Jun 28, 2016, 10:33 PM, at 10:33 PM, Steven Michael Williams<EMAIL_ADDRESS>wrote:

I've been running the command that is aliased which is stack exec --no-ghc-package-path hdevtools -- and it seems to be running into
/usr/lib/ghc-{version}/settings: openFile: does not exist with GHC
versions prior to 8.0.1 if I start the server within the stack
environment using no-daemon mode, or I just get the opaque end of line
message otherwise. The issue seems to be in it finding that settings
file for older versions. I just set it as an alias to be sure and that
hasn't changed anything except when I run it without no-daemon mode it
just hangs and never tells me why it isn't working. Attempting to start
the server manually with the -n flag doesn't produce an error until you
go to check status and it says connect: does not exist. How do I
setup things up for it to see the settings file in ~/.stack/programs/?

You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/hdevtools/hdevtools/issues/25#issuecomment-229174135

I just checked with one of my other projects and it gets the same error messages plus this:
stack exec --no-ghc-package-path hdevtools -- --start-server -n
Run from outside a project, using implicit global project config
Compiler version mismatched, found ghc-7.10.3 (x86_64), but expected minor version match with ghc-8.0.1 (x86_64) (based on resolver setting in /home/swilliams/.stack/global-project/stack.yaml).
Try running "stack setup" to install the correct GHC into /home/swilliams/.stack/programs/x86_64-linux/
hdevtools: /usr/lib/ghc-7.10.3/settings: openFile: does not exist (No such file or directory)

This is invoked in my project directory for LambdaPass. The directory I've been trying this in is for another project I haven't put on GitHub yet.
Here are the steps:

Build and install git clone of hdevtools using lts-5.13 resolver and stack install.
Change into my LambdaPass project directory at ~/workspace/active_proects/LambdaPass
Run stack exec --no-ghc-package-path hdevtools -- --start-server -n in the LambdaPass base project directory.

These steps result in the input I pasted above.

So your global config (which was used in your first invocation) defaults to a ghc-8.0.1 while lts-5.13 (ghc-7.10.3) was used to build hdevtools?
This could explain an error of the GHC library looking for 7.10.3/settings in a 8.0.1 environment.
But you describe steps in which hdevtools also not works from within LamdaPass, which is built with lts-5.13, am I right? I will try to reproduce this tomorrow.
Sent from TypeApp
On Jun 29, 2016, 12:10 AM, at 12:10 AM, Steven Michael Williams<EMAIL_ADDRESS>wrote:

I just checked with one of my other projects and it gets the same error
messages plus this:
stack exec --no-ghc-package-path hdevtools -- --start-server -n
Run from outside a project, using implicit global project config
Compiler version mismatched, found ghc-7.10.3 (x86_64), but expected
minor version match with ghc-8.0.1 (x86_64) (based on resolver setting
in /home/swilliams/.stack/global-project/stack.yaml).
Try running "stack setup" to install the correct GHC into
/home/swilliams/.stack/programs/x86_64-linux/
hdevtools: /usr/lib/ghc-7.10.3/settings: openFile: does not exist (No
such file or directory)

This is invoked in my project directory for
LambdaPass. The directory
I've been trying this in is for another project I haven't put on GitHub
yet.
Here are the steps:

Build and install git clone of hdevtools using lts-5.13 resolver and
stack install.
Change into my LambdaPass project directory at
~/workspace/active_proects/LambdaPass
Run stack exec --no-ghc-package-path hdevtools -- --start-server -n in the LambdaPass base project directory.

These steps result in the input I pasted above.

You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/hdevtools/hdevtools/issues/25#issuecomment-229199868

I just changed the resolver to lts-5.13 for global and it didn't seem to have an effect. You are correct regarding LambdaPass.

Alright, could even reproduce the error with the hdevtools repo itself. Seems like the ghc-paths module provides the /usr/lib/ghc-7.10.3 path (hardcoded into it) and when distros now move to system wide ghc-8.0.1 this path is obviously wrong. I pushed a fix to branch stack-ghc-libdir if you like to try it.
Thanks for reporting by the way!

You're welcome. It seems to be working fine on the command-line now. It looks like Neomake is still having issues with it, but I guess it isn't wrapping the command in stack exec, so I should be able to straighten that out on my own.

May I ask you to contribute a section about neomake in the README.md if you get it running? :)
Sent from TypeApp
On Jun 30, 2016, 12:46 AM, at 12:46 AM, Steven Michael Williams<EMAIL_ADDRESS>wrote:

You're welcome. It seems to be working fine on the command-line now. It
looks like Neomake is still having issues with it, but I guess it isn't
wrapping the command in stack exec, so I should be able to straighten
that out on my own.

You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/hdevtools/hdevtools/issues/25#issuecomment-229511917

Yeah I'd be happy to contribute. It may take me a bit to figure out how plugins and Vim script work first, though.

I'm working on neomake + stack + hdevtools support here: https://github.com/neomake/neomake/pull/522

Just recently an issue with neomake has  been resolved. I don't use it though.
Anyway I think that the necessity of running hdevtoola via stack exec can be resolved easily, which should streamline use alot.
Sent from TypeApp
On Jul 29, 2016, 8:56 PM, at 8:56 PM, Scott Bonds<EMAIL_ADDRESS>wrote:

I'm working on neomake + stack + hdevtools support here:
https://github.com/neomake/neomake/pull/522

You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/hdevtools/hdevtools/issues/25#issuecomment-236264961

ping @flounders @bonds
I just fixed stack support such that it is NOT required to run hdevtools via stack exec anymore. If you fancy you can try that branch and provide some feedback. Thanks in advance!
Hopefully we can resolve this issue once that branch is merged.

I just built the latest commit from master, and tried hdevtools --start-server-n and it's giving the following:
Run from outside a project, using implicit global project config
hdevtools: /usr/lib/ghc-7.10.3/settings: openFile: does not exist (No such file or directory)

Same result whether I run it in lambdaPass or the hdevtools repo itself.
Trying the same with stack exec  yields the same.

Sorry forgot to mention that I have not yet merged into master and the improvement should still be on stack-ghc-libdir branch.
Sent from TypeApp
On Aug 7, 2016, 2:07 PM, at 2:07 PM, Steven Michael Williams<EMAIL_ADDRESS>wrote:

I just built the latest commit from master, and tried hdevtools
--start-server-n and it's giving the following:
Run from outside a project, using implicit global project config
hdevtools: /usr/lib/ghc-7.10.3/settings: openFile: does not exist (No
such file or directory)

Same result whether I run it in lambdaPass or the hdevtools repo
itself.
Trying the same with stack exec  yields the same.

You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/hdevtools/hdevtools/issues/25#issuecomment-238078805

Seems to be working perfectly. Nice work.

Cool, btw its released as version <IP_ADDRESS>


Optimize Energy Management

Just did a few Measurements with the actual Firmware:
Current was measured in between Battery and the Cubecell Board without USB Power.

LCD on, GPS: on: 50-63mA
LCD on, GPS off: 17.9mA
LCD and GPS off: 11.27mA
LCD, GPS and Radio off, CPU Sleepmode : 11.17 mA

As there is no On/Off switch on the Device itself, we have to fully rely on the Sleepmode for Standby use.
The advertised 21uA from the Datasheet is not nearly reached, so the Battery gets drained fast.

Found the missing piece.. with https://github.com/dj1an/Cubecell_LoRa_APRS_Tracker/commit/d469cacb4cd4dc6e7c0299b997047383ecdebfe3 the sleep current is now down to 448uA.
Not exactly as advertised, but going in the right direction ;)