Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor issues in MSVC projects. #3333

Merged
merged 2 commits into from Jun 9, 2020
Merged

Conversation

irwir
Copy link
Contributor

@irwir irwir commented May 19, 2020

Description

Resolves #3297 - erroneous definition is removed.
Removed preprocessor definitions from project files:
as unused - _WINDOWS WIN32 WIN64
as predefined - _DEBUG

Removed explicit settings with default values:
PrecompiledHeader and ShowProgress

Status

READY

Requires Backporting

NO, but might be considered.
Which branch?
development

Migrations

NO

Additional comments

I left for now, but may also delete _CONSOLE.
This is never referenced anywhere in the repository and probably is not useful in the example programs.

@danh-arm
Copy link
Contributor

Thanks for you contribution. Unfortunately this fails our CI:

******************************************************************

* check_generated_files: Check: freshness of generated source files 

* Tue May 19 17:22:53 UTC 2020

******************************************************************

'visualc/VS2010/mbedTLS.vcxproj' was either modified or deleted by 'scripts/generate_visualc_files.pl'

^^^^check_generated_files: Check: freshness of generated source files: tests/scripts/check-generated-files.sh -> 1^^^^


******************************************************************

* check_generated_files: Done, cleaning up 

* Tue May 19 17:22:53 UTC 2020

******************************************************************


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

FAILED: 1

check_generated_files: Check: freshness of generated source files: tests/scripts/check-generated-files.sh -> 1

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

@danh-arm
Copy link
Contributor

We're still getting a test failure in one of our configs:

./tests/scripts/all.sh --seed 4 --keep-going check_generated_files
******************************************************************

* check_generated_files: Check: freshness of generated source files 

* Wed May 20 12:36:12 UTC 2020

******************************************************************

'visualc/VS2010/zeroize.vcxproj' was either modified or deleted by 'scripts/generate_visualc_files.pl'

^^^^check_generated_files: Check: freshness of generated source files: tests/scripts/check-generated-files.sh -> 1^^^^


******************************************************************

* check_generated_files: Done, cleaning up 

* Wed May 20 12:36:13 UTC 2020

******************************************************************


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

FAILED: 1

check_generated_files: Check: freshness of generated source files: tests/scripts/check-generated-files.sh -> 1

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

@danh-arm danh-arm added needs-review Every commit must be reviewed by at least two team members, and removed needs-ci Needs to pass CI tests labels May 20, 2020
@danh-arm danh-arm added this to To do in Mbed TLS PRs via automation May 20, 2020
@irwir
Copy link
Contributor Author

irwir commented May 20, 2020

In my opinion a more straightforward message saying generated file differs from the one in the library might have been more clear than Check: freshness of generated source files.
Anyway, all the tests passed.
_CONSOLE macro was deleted in this version.

@paul-elliott-arm
Copy link
Member

paul-elliott-arm commented May 20, 2020

Hi!

Apologies, this is admittedly slightly confusing. Only the template files (scripts/data_files/vs2010-(app|main)-template.vcxproj) are supposed to be edited. If you revert (or shelve) your changes to all the other files, and run scripts/generate_visualc_files.pl then you should find the changes you made to the templates propagated to all the other .vcxproj'es.

Once you have done this, tests/scripts/check-generated-files.sh should run without error (it will moan if the generated version doesn't match the version in a given changelist).

Copy link
Member

@paul-elliott-arm paul-elliott-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@paul-elliott-arm paul-elliott-arm moved this from To do to 1 Approval in Mbed TLS PRs May 20, 2020
@irwir
Copy link
Contributor Author

irwir commented May 20, 2020

Thank you, @paul-elliott-arm
Edited projects were messed up somehow, and finally the sure way was taken - generate the projects with the script.

By the way, script/data files has three files for Visual Studio 6.
Is it intentional or the files could be purged as unsupported?

Copy link
Contributor

@danh-arm danh-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of minor things:

Mbed TLS PRs automation moved this from 1 Approval to In progress May 21, 2020
@danh-arm danh-arm added needs-work and removed needs-review Every commit must be reviewed by at least two team members, labels May 21, 2020
defaults. Fixes Mbed-TLS#3297.

Signed-off-by: irwir <irwir@users.noreply.github.com>
Copy link
Member

@paul-elliott-arm paul-elliott-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@paul-elliott-arm paul-elliott-arm moved this from In progress to 1 Approval in Mbed TLS PRs May 28, 2020
@danh-arm danh-arm self-assigned this Jun 2, 2020
Mbed TLS PRs automation moved this from 1 Approval to Approved Jun 9, 2020
Copy link
Contributor

@danh-arm danh-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I'm withdrawing my approval as I've just spotted a CI failure. The ChangeLog didn't assemble:

******************************************************************

* check_changelog: Check: changelog entries 

* Tue Jun  9 03:26:32 UTC 2020

******************************************************************

Traceback (most recent call last):

  File "scripts/assemble_changelog.py", line 505, in <module>

    main()

  File "scripts/assemble_changelog.py", line 502, in main

    merge_entries(options)

  File "scripts/assemble_changelog.py", line 449, in merge_entries

    finish_output(changelog, options.output, options.input, files_to_merge)

  File "scripts/assemble_changelog.py", line 415, in finish_output

    check_output(output_temp, input_file, merged_files)

  File "scripts/assemble_changelog.py", line 399, in check_output

    raise LostContent(merged_file, line)

__main__.LostContent: Lost content from ChangeLog.d/bugfix_PR3333.txt: "b'   * Remove unused macros from MSVC projects. Reported in #3297 and fix submitted in #3333 by irwir.'"

^^^^check_changelog: Check: changelog entries: scripts/assemble_changelog.py -o ChangeLog.new -> 1^^^^

It seems the ChangeLog script can't handle the lack of whitespace at the end of the this ChangeLog entry. We will look into fixing the script but if you want this merge in the meantime, just add a LF to the entry.

Mbed TLS PRs automation moved this from Approved to In progress Jun 9, 2020
@danh-arm danh-arm added the needs-ci Needs to pass CI tests label Jun 9, 2020
Signed-off-by: irwir <irwir@users.noreply.github.com>
@gilles-peskine-arm
Copy link
Contributor

Text files need a LF at the end. The lack of a LF at the end of a changelog entry files breaks the changelog assembly file with a hard-to-understand error. That's low-priority because it's about dealing with ill-formed input that check-files.py now rejects anyway. We only very recently updated check-files.py to check changelog entries, and this branch is too old to have the check, which is why pr-head passes. check_files fails on pr-merge

Missing newline at end of file:
ChangeLog.d/bugfix_PR3333.txt

and fixing this will make check_changelog pass.

@gilles-peskine-arm gilles-peskine-arm added component-platform Portability layer and build scripts enhancement needs-work needs-review Every commit must be reviewed by at least two team members, and removed needs-work labels Jun 9, 2020
@danh-arm
Copy link
Contributor

danh-arm commented Jun 9, 2020

I'm taking Paul's previous approval since there was only the LF change to the ChangeLog entry. All CI passing now.

@danh-arm danh-arm merged commit 5afc4c7 into Mbed-TLS:development Jun 9, 2020
Mbed TLS PRs automation moved this from In progress to Done Jun 9, 2020
@daverodgman daverodgman removed this from Done in Mbed TLS PRs Mar 30, 2022
@irwir irwir deleted the fix_vcxproj2 branch October 6, 2023 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-platform Portability layer and build scripts enhancement needs-ci Needs to pass CI tests needs-review Every commit must be reviewed by at least two team members,
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A bug in .vcxpoj files and suggested fix
4 participants