You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/05/08 03:45:25 UTC

[GitHub] jlahoda commented on issue #504: Skip CoS copying of class files when the target is already newer, such as from an external compilation

jlahoda commented on issue #504: Skip CoS copying of class files when the target is already newer, such as from an external compilation
URL: https://github.com/apache/incubator-netbeans/pull/504#issuecomment-387275561
 
 
   On Tue, May 8, 2018 at 3:57 AM, Jesse Glick <no...@github.com>
   wrote:
   
   > *@jglick* commented on this pull request.
   > ------------------------------
   >
   > In java.source.base/src/org/netbeans/modules/java/source/usages/
   > BuildArtifactMapperImpl.java
   > <https://github.com/apache/incubator-netbeans/pull/504#discussion_r186599280>
   > :
   >
   > > +            LOG.log(Level.FINER, "#227791: ignoring non-file-based source {0}", approximateSource);
   > +            return false;
   > +        }
   > +        if (!target.isFile()) {
   > +            LOG.log(Level.FINER, "#227791: {0} does not even exist", target);
   > +            return false;
   > +        }
   > +        long targetLastMod = target.lastModified();
   > +        File mockSrc;
   > +        try {
   > +            mockSrc = BaseUtilities.toFile(approximateSource.toURI());
   > +        } catch (URISyntaxException x) {
   > +            LOG.log(Level.FINER, "#227791: cannot convert " + approximateSource, x);
   > +            return false;
   > +        }
   > +        File src = new File(mockSrc.getParentFile(), mockSrc.getName().replaceFirst("([$].+)*[.]sig$", ".java"));
   >
   > -uncomment the line in CosTest, wait 5+seconds
   > -go to Dep, uncomment the method in Dep
   >
   > Are you saving the sources here, or letting the save be done by F6? If the
   > latter, that does sound like a race condition here: you would want to let
   > all newly saved sources be scanned
   >
   
   Yes, I am saving, sorry for not being explicit. The steps would be:
   
   -do a clean build
   -(CoS) run
   -uncomment the line in CosTest, save CosTest, wait 5+seconds
   -go to Dep, uncomment the method in Dep
   -save Dep, wait a few seconds, (CoS) run
   
   
   > into sig files before the run starts, which the IDE normally ensures, and
   > perhaps that is getting broken by this change? Or if the former (manual
   > saves in reverse order), then, well, do not do that. Either way, you can
   > simply touch CosTest again to work around.
   >
   
   So the users need to do dependency tracking themselves. So far, this was
   IDE's job.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists