-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
VS2012: Allow For the Ignoring of unpredictable and Unnecessary Outputs #182
Comments
On Fri, Apr 25, 2014 at 4:09 PM, Austin Hicks notifications@github.comwrote:
Can you clarify what command-line you're trying to run that causes this There isn't currently the ability in a Tupfile to list a file that should Thanks, |
Actually, looking at it, it appears I was being an idiot when I wrote it-it's vs2013 professional, not 2012. My bad. I'll have to see if I still have the tup build file, but don't think so; I hadn't yet pushed the commits and, after an afternoon of trying, I'm pretty sure I locally reverted them. I'll have to hunt and see if they've been garbage collected yet for the exact command, but it wasn't anything super tricky. If I recall, not even optimizations. |
Just started on using 'tup' and experienced the thing camlorn describes here. This makes the tup job fail. |
I just installed vs2013 and tried to reproduce the issue, but I was unable Thanks, On Fri, Jun 6, 2014 at 1:15 PM, Dirk Steenpass notifications@github.com
|
On Tue, Apr 29, 2014 at 3:08 PM, Austin Hicks notifications@github.com
cd cmake-proj; cmake
If you manage dependencies yourself, you're pretty much guaranteed to get Thanks, |
I was already running on VS2013 Update 2, so it's likely unrelated to "prevent-new-local-user-accounts-to-login-to-windows" (I like that one :). I looked around a bit and learned that SQM stands for Software Quality Metrics. This data is send to MS if you opt into the "Customer Experience Improvement Program", which I did. I opted out, but the data is still generated, it is just not send. Right now, I have no idea how to turn writing off. Opting into the "Customer Experience Improvement Program" may trigger the writing for you ... or not. I used procmon (process monitor, sysinternals) to follow the activity of cl.exe and discovered that link.exe also writes to 'sqmcpp.log'. Sadly, the event log did not convey any clue about the cause for this annoyance to me. Maybe somebody else has an idea? |
I have moved on to cmake because I needed to make progress. That is not to say I couldn't move back, however, and I kind of want to simply because cmake is monolithic, archaic, and just painful. I've done the build script thing before for another project. It is nice that Tup manages dependencies. Software may eventually become as smart as a human, but it isn't currently. Tup protects me, but if I know that I am safe and that the tool is wrong, it should be my option to tell it so. I have had to deal with dependency problems before and get where you're coming from, but being able to say "This command makes a bunch of extra output that I don't use" would fix this case and any cases in future, as well as allowing for stuff like building documentation (the output of doxygen comes to mind here). If we start implementing special rules for specific tools, it starts making the build system specific to those tools-instead, let me loosen the requirements as I need to. I may waste time when I get it wrong, but I did waste time figuring out that Tup wouldn't work on my setup because Tup insists on telling me that I'm wrong even when I know I'm not. This could be fixed in the specific case of visual studio, but I think that a more general fix is applicable; if I'm warned not to use it in the documentation unless I really need it, it's my fault for wasting my time and not the fault of the tool. Anyhow, that's my two cents and tup isn't my project. |
I am very interested in using tup to manage the build process for extremely large Verilog ASIC designs at my company. Unfortunately, the compilers and toolchains involved in this process (mostly Cadence and Synopsys software) are very guilty of creating lots of extraneous or unpredictably named outputs. I understand that this is an extremely uncommon use case for build systems, and that probably no-one else using tup even touches these tools. As such, I would never expect support for ignoring the unnecessary outputs of these fringe programs to be built into tup, so the ability to manually configure what is ignored is critical. I love the design of tup, especially the way it will refuse to run if you have implicit dependencies on generated files. That feature combined with the automatic dependency detection would save us so many headaches and bugs in our thousands of lines of makefiles. But the sad fact is that closed-source commercial tools can be stupid and/or do unpredictable things, and without the ability to manually compensate for these idiosyncrasies, many people will never be able to use tup. |
On Sun, Jun 8, 2014 at 11:08 AM, Dirk Steenpass notifications@github.com
-Mike |
On Mon, Jun 9, 2014 at 12:31 AM, Connor McKay notifications@github.com
As for the more general case that you are describing, where more rarely My concern with adding an ignore feature is that rather than properly Thanks, |
Just fetched the latest build and run it: the issue is gone. Thanks, |
On Wed, Jun 11, 2014 at 10:24 AM, Dirk Steenpass notifications@github.com
-Mike |
Well, ..., figuring out something like tup is much more useful! Kudos. |
Hi. New version, new files :( |
@gittup actually @xwizard is right, for example on Windows 10, with the latest VS (2015) it is not working because of the above mentioned problem. (Even if "Customer Experience Improvement Program" is turned off! It looks like, you can't really do anything about this, unless you use something else than |
@petervaro Tup works fine with Mingw64 on Windows 10. It's cl.exe's fault in this case. |
@xwizard I know, and I already switched to mingw-w64 as my default windows-compiler, I just wanted to make sure my code-base will also compile via |
For anyone having the same issue @xwizard had with VS2015's cl.exe writing to VCToolsTelemetry.dat: There's a way to disable this unwanted data collection with a registry edit: https://msdn.microsoft.com/en-us/library/ee225238.aspx#Anchor_5 |
I just ran into this issue too, with the VCToolsTelemetry.dat file. In my humble opinion, hard-coding specific file names is the wrong way to go about this because it will lead to new problems with every new version and compiler brand. It's annoying but possibly solvable when the developer hits it, but what if my users who are already struggling to build my software run into this? What if they use some antivirus or similar that hooks into processes and happen to write to some other file that has nothing to do with the build? It's just too much of a usability problem to be worth it. Besides, from a design perspective tup should be compiler agnostic; hardcoding behavior for specific compiler brands and versions is an ugly hack. I would suggest that anything that is written outside the source tree is ignored unless a warning is explicitly enabled. |
I've long since left Tup, but am still subscribed to the thread. I doubt I'll come back as I now have a huge amount of CMake and Python automation (maybe 500-1000 lines and growing) for stuff like automated releasing to Pypi and handling continuous integration and finding libraries. I'm not saying this isn't a good tool, just that I would now have to spend very significant effort to get back to it. But it doesn't matter if I want to, as Tup cannot handle my case. The scenario in my original comment is no longer hypothetical. I now have code that calls Saying "Ignore everything outside the build directory" fixes VC++, but it doesn't fix the actual problem. This is like the |
Agreed, but I think both solutions can and should coexist. |
yes, both is certainly workable. My point is merely that "ignore everything outside the build directory" is fixing a set of symptoms, not an underlying problem. |
Well, I see it more as implementing what you suggested but with a convenient shortcut for a common use case. Edit: And, in the short run, it will work as an initial stopgap for a problem that everyone who uses Visual C++ will run into. |
I'm trying tup with cl.exe, visual studio 2017 on my windows 10 x64 machine. I've tried setting the "OptIn" flag in various registry string keys, but I still get the error:
I've tried setting the value "OptIn" string value in:
No success. I'm hoping somebody else has a work around for this. This is a pretty big blocker for me. |
Try with |
|
Updated Visual Studio 2017 yesterday, and now this problem is back. |
I have sent a report via their feedback button in MSVS now, with a link to this thread. |
I downgraded to 15.5.7 and now it's working again: |
Hi, @datgame i'm replying here and I also replied to the dev-community issue you opened. First, thank you for brining this too my attention and second, i'm sorry for the inconvenience this change has caused you. I have a fix in 15.7 for this issue which will be in 15.7 preview 3 when it's released imminently. You can immediately unblock usage of 15.6 via this workaround: set Below is a simple CMD script that accomplishes this; feel free to cut-and-paste it into a CMD shell on your machine.
Please let me know if you have any more issues or have any questions or concerns regarding this. ian Bearman |
There is some preliminary support for ignoring files in v0.7.8. You can specify files to be ignored in the output section by prefixing it with a '^' character. Eg:
The "ignoredoutput.txt" here is a regular expression used to match against filenames picked up during dependency detection, but just note that the initial carat is not part of the regular expression. The path matching is done against a canonicalized path, so I believe it is always done against a fullpath version of the file access. If you need to match against a path separator, always use '/', even on Windows. Let me know if this helps with any of these issues, and be mindful that it can be easy to shoot yourself in the foot with it by ignoring too much if your pattern is too general. |
Microsoft strikes again, in the latest build of Visual Studio 2019 they generate a different filename per compile in the temp folder: |
report it to the microsoft site i linked above. |
I'd say Microsoft is well in their right to produce any temp files they want during compilation. It is tup that is making unwarranted assumptions about the behavior of a compiler. |
It would be nice if it could be done the same way wildcard inputs are. Take the following hypothetical rule syntax, similar to "order only" inputs
In my opinion, something like this would make tup scale better, be more user-friendly, and make it easier to integrate with complex environments. Currently, the work around I've been using is a custom program which acts as a buffer between tup and executing shell commands, combined with empty bins to direct rule ordering. This way, tup tells the program the command and the program executes it outside of tup's purview, only reporting back either success or failure. I've had good results with this work-around, even using tup to integrate with and compile cmake git submodules. But it's less than ideal and adds another custom tool as a project dependency. An enhancement to this work-around would be to tell the program the expected results and it would touch them so they could be tracked by tup rather than using magic empty bins or groups; but I haven't gotten around to that yet. Anyways; with python cache, C++20 modules, log files, atypical and complex tool-dependent workflows.... This feature is becoming ever more important. I love the low-level power and flexibility of tup; I've even been using tup for lite-weight unit testing in some projects. But this has been a stubborn blemish. I understand not wanting to give the user a gun to shoot themselves in the foot with, but having the option would be nice. |
Currently tup uses this syntax for "extra outputs", which are files created by the program that you don't want included in the %o flag. Sometimes programs write to multiple files, but only specify one on the command-line. The other files that are expected to be created would go after the | in the output section, but aren't passed into the command.
This should work today with the ^ syntax in the output section (see the man page under TUPFILES, :-rule, outputs). It would look something like this:
(The ^ flag denotes a regular expression, so the * can be dropped. All dependency tracking on files that match the pattern is skipped). Somewhat confusingly, the ^ character has a different behavior in the input section where it is used to skip files in glob matching.
This is an interesting idea, and something I've thought about before. I think it would be possible with |
I'm not sure if I'm using the ignore syntax correctly. I'm starting to try tup for generated files from templates but am having two difficulties. One is that I have a bunch of commands that require (and generate if needed) a Python venv, and I'd like for separate rules to all be able to use the same
* 0) mk/reqs.sh
mk/reqs.sh: 15: .: cannot open ./.venv/bin/activate: No such file
*** tup messages ***
*** Command ID=3488 failed with return value 2
[ ] 100%
*** tup: 1 job failed. Of if I manually delete [ ] 0%/home/andy/.../.venv/lib/python3.10/site-packages/pip/_internal: No such file or directory
* 0) mk/reqs.sh
...
*** tup messages ***
tup error: Unable to create directory '/home/andy/.../.venv/lib/python3.10/site-packages/pip/_internal'
[ ] 100%
*** tup: 1 job failed. |
I just tried to move a simple project to Tup because, hey, why not and it looks great. unfortunately, cl.exe, Microsoft's command line C++ compiler, insists on writing a completely meaningless log file somewhere down in the appdata folder. This file is undocumented, cannot be disabled as far as I can tell, and includes the current user's username in the path (and probably varies depending on version of windows). More ironically yet, it contains 5 or 6 characters, one of which is unprintable. It has no bearing on the current build whatsoever, but stops tup from actually building. The file's name is sqmcpp.log, and no documentation as to its function exists anywhere.
Can we add something that will allow me to say "This command's file output is suspect, ignore it because I know better?" As it stands, I cannot use Tup for my project and have had to revert to Cmake. Thank you Microsoft.
If this exists and is undocumented, then this issue is for that instead.
The text was updated successfully, but these errors were encountered: